Update index.blade.php

This commit is contained in:
2020-08-17 03:20:07 +05:00
parent 79f3352b3d
commit b80ae190f4

View File

@@ -1,71 +1,85 @@
@extends('layouts.app') @extends('layouts.app')
@section('content') @section('content')
@if(!isset($articles))
<div class="mb-10"> <div class="mb-10">
<div> <div>
<h3 <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> </h3>
</div> </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"> <div class="flex justify-end">
<!-- post cards --> <!-- post cards -->
<div class="w-full lg:w-2/3"> <div class="w-full lg:w-2/3">
@foreach($articles as $article) @foreach($articles as $article)
<div> <div>
<a <a
href="{{route('articles.show', $article->id)}}" href="{{route('articles.show', $article->id)}}"
class="w-full flex mb-10 shadow rounded-lg" 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 <div>
class="bg-white rounded px-4 flex flex-col flex-grow justify-between leading-normal" <div
> class="mt-5 text-gray-700 font-semibold text-1xl mb-2 text-right MvTyper hover:underline"
<div> style="direction:rtl;"
<div >
class="mt-5 text-gray-700 font-semibold text-1xl mb-2 text-right MvTyper hover:underline" {{$article->title}}
style="direction:rtl;" </div>
>
{{$article->title}}
</div>
<div <div
class="flex items-center justify-end mt-3 mb-3" 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')}}
&mdash;
</p>
</div>
<p <p
class="text-gray-700 text-base text-right MvTyper" class="font-semibold text-gray-700 text-sm capitalize MvTyper py-4"
style="direction:rtl;"
> >
{{$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')}}
&mdash;
</p> </p>
</div> </div>
<p
class="text-gray-700 text-base text-right MvTyper"
style="direction:rtl;"
>
{{$article->body[0]}}
</p>
</div> </div>
</div>
<div <div
class="h-48 w-48 flex-none bg-cover text-center overflow-hidden rounded object-right dark-img" 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}}); " style="background-image: url({{$article->featured_image}}); "
></div> ></div>
</a> </a>
</div> </div>
@endforeach @endforeach
</div>
</div> </div>
</div> </div>
</div>
@endif
@endsection @endsection