|
1 | 1 | <x-app-layout> |
2 | 2 | <div class="fixed bg-dark-200 bg-doodles h-full w-full -z-10"></div> |
3 | | - <div class="bg-dark-100 max-w-(--breakpoint-lg) mt mx-auto px-4 lg:px-12 py-12 lg:my-48"> |
| 3 | + <div class="bg-dark-100 max-w-(--breakpoint-lg) mx-auto px-4 lg:px-12 py-12 lg:mt-48 lg:mb-12"> |
4 | 4 | <h1 class="text-4xl font-medium text-neutral-200 leading-snug">{{ $post->title }}</h1> |
5 | 5 | <div class="flex flex-col md:flex-row md:items-center mb-4 mt-3 md:space-x-3 space-y-2 md:space-y-0"> |
6 | 6 | @if($post->is_published) |
|
21 | 21 | <section class="markup images-centered border-neutral-700 border-t pt-8"> |
22 | 22 | @markdown($post->text ?? '') |
23 | 23 | </section> |
24 | | - |
25 | | - @if($relatedPosts->isNotEmpty()) |
26 | | - <section class="border-neutral-700 border-t pt-8 mt-8"> |
27 | | - <h3 class="text-xl text-neutral-200 font-medium mb-6">Related Posts</h3> |
28 | | - <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"> |
29 | | - @foreach($relatedPosts as $relatedPost) |
30 | | - <a href="{{ route('posts.show', $relatedPost) }}" class="block group"> |
31 | | - @if($relatedPost->getFirstMedia('thumbnail')) |
32 | | - <img |
33 | | - src="{{ $relatedPost->getFirstMedia('thumbnail')->getUrl('thumbnail') }}" |
34 | | - alt="{{ $relatedPost->title }}" |
35 | | - class="w-full h-40 object-cover rounded-lg mb-3" |
36 | | - > |
37 | | - @else |
38 | | - <div class="w-full h-40 bg-neutral-800 rounded-lg mb-3 flex items-center justify-center"> |
39 | | - <span class="text-neutral-500 text-sm">No image</span> |
40 | | - </div> |
41 | | - @endif |
42 | | - <h4 class="text-neutral-200 group-hover:text-ocean transition-colors">{{ $relatedPost->title }}</h4> |
43 | | - <span class="text-sm text-neutral-400">{{ $relatedPost->published_at->format('d M Y') }}</span> |
44 | | - </a> |
45 | | - @endforeach |
46 | | - </div> |
47 | | - </section> |
48 | | - @endif |
49 | 24 | </div> |
| 25 | + |
| 26 | + @if($relatedPosts->isNotEmpty()) |
| 27 | + <section class="max-w-(--breakpoint-lg) mx-auto px-4 lg:px-0 py-12 lg:mb-48"> |
| 28 | + <h3 class="text-3xl text-neutral-200 text-center font-medium uppercase font-heading">Related Posts</h3> |
| 29 | + <div class="border-b-2 border-ocean w-32 mx-auto mt-2 mb-10"></div> |
| 30 | + |
| 31 | + <ul class="grid grid-cols-1 lg:grid-cols-3"> |
| 32 | + @foreach($relatedPosts as $post) |
| 33 | + <x-post :post="$post" /> |
| 34 | + @endforeach |
| 35 | + </ul> |
| 36 | + </section> |
| 37 | + @endif |
50 | 38 | </x-app-layout> |
0 commit comments