Update index.blade.php
This commit is contained in:
@@ -1,71 +1,85 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
@if(!isset($articles))
|
||||
<div class="mb-10">
|
||||
<div>
|
||||
<h3
|
||||
class="text-gray-800 font-bold text-3xl text-right mt-3 mb-2 mr-3 MvAamu"
|
||||
class="text-gray-800 font-bold text-3xl text-center mt-3 mb-2 mr-3 MvAamu"
|
||||
style="direction: rtl;"
|
||||
>
|
||||
ރައްކާ ކުރެވިފައިާ ލިޔުންތައް
|
||||
ރައްކާކުރެވިފައި އެއްވެސް ލިޔުމެއް ނެއް
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="mb-10">
|
||||
<div>
|
||||
<h3
|
||||
class="text-gray-800 font-bold text-3xl text-right mt-3 mb-2 mr-3 MvAamu"
|
||||
>
|
||||
ރައްކާ ކުރެވިފައިާ ލިޔުންތައް
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end">
|
||||
<!-- post cards -->
|
||||
<div class="w-full lg:w-2/3">
|
||||
@foreach($articles as $article)
|
||||
<div>
|
||||
<a
|
||||
href="{{route('articles.show', $article->id)}}"
|
||||
class="w-full flex mb-10 shadow rounded-lg"
|
||||
<div class="flex justify-end">
|
||||
<!-- post cards -->
|
||||
<div class="w-full lg:w-2/3">
|
||||
@foreach($articles as $article)
|
||||
<div>
|
||||
<a
|
||||
href="{{route('articles.show', $article->id)}}"
|
||||
class="w-full flex mb-10 shadow rounded-lg"
|
||||
>
|
||||
<div
|
||||
class="bg-white rounded px-4 flex flex-col flex-grow justify-between leading-normal"
|
||||
>
|
||||
<div
|
||||
class="bg-white rounded px-4 flex flex-col flex-grow justify-between leading-normal"
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
class="mt-5 text-gray-700 font-semibold text-1xl mb-2 text-right MvTyper hover:underline"
|
||||
style="direction:rtl;"
|
||||
>
|
||||
{{$article->title}}
|
||||
</div>
|
||||
<div>
|
||||
<div
|
||||
class="mt-5 text-gray-700 font-semibold text-1xl mb-2 text-right MvTyper hover:underline"
|
||||
style="direction:rtl;"
|
||||
>
|
||||
{{$article->title}}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div
|
||||
class="flex items-center justify-end mt-3 mb-3"
|
||||
>
|
||||
<p
|
||||
class="font-semibold text-gray-700 text-sm capitalize MvTyper py-4"
|
||||
>
|
||||
{{$article->source->name}}
|
||||
</p>
|
||||
<p class="text-gray-600 text-xs ml-1 MvTyper" style="direction: rtl;">
|
||||
|
||||
{{$article->published_date->locale('dv')->isoFormat('Do MMMM YYYY')}}
|
||||
|
||||
—
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="flex items-center justify-end mt-3 mb-3"
|
||||
>
|
||||
<p
|
||||
class="text-gray-700 text-base text-right MvTyper"
|
||||
style="direction:rtl;"
|
||||
class="font-semibold text-gray-700 text-sm capitalize MvTyper py-4"
|
||||
>
|
||||
{{$article->body[0]}}
|
||||
{{$article->source->name}}
|
||||
</p>
|
||||
<p class="text-gray-600 text-xs ml-1 MvTyper" style="direction: rtl;">
|
||||
|
||||
{{$article->published_date->locale('dv')->isoFormat('Do MMMM YYYY')}}
|
||||
|
||||
—
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p
|
||||
class="text-gray-700 text-base text-right MvTyper"
|
||||
style="direction:rtl;"
|
||||
>
|
||||
{{$article->body[0]}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="h-48 w-48 flex-none bg-cover text-center overflow-hidden rounded object-right dark-img"
|
||||
style="background-image: url({{$article->featured_image}}); "
|
||||
></div>
|
||||
</a>
|
||||
</div>
|
||||
@endforeach
|
||||
<div
|
||||
class="h-48 w-48 flex-none bg-cover text-center overflow-hidden rounded object-right dark-img"
|
||||
style="background-image: url({{$article->featured_image}}); "
|
||||
></div>
|
||||
</a>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user