|
1 | 1 | @extends('site-layout')
|
2 | 2 |
|
| 3 | +@section('meta-title') |
| 4 | + Blog |
| 5 | +@stop |
| 6 | + |
| 7 | +@section('meta-description') |
| 8 | + Here you will find the latest news and updates about us. |
| 9 | +@stop |
| 10 | + |
3 | 11 | @section('bodyEndScripts')
|
4 | 12 | @vite('resources-site/js/blog-app.js')
|
5 | 13 | @endsection
|
6 | 14 |
|
7 | 15 | @section('content')
|
8 |
| - <blog-toolbar :archive-options="{{ json_encode($archiveOptions) }}" :tags="{{ json_encode($tags) }}"> |
9 |
| - </blog-toolbar> |
| 16 | + <blog-toolbar :archive-options="{{ json_encode($archiveOptions) }}" :tags="{{ json_encode($tags) }}"></blog-toolbar> |
10 | 17 |
|
11 |
| - <div class="bg-white py-24 sm:py-32"> |
| 18 | + <div class="bg-skin-neutral-2 py-24 sm:py-32"> |
12 | 19 | <div class="mx-auto max-w-7xl px-6 lg:px-8">
|
13 | 20 | <!-- Section Title -->
|
14 | 21 | <div class="mx-auto max-w-2xl text-center">
|
15 |
| - <h2 class="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">Blog</h2> |
| 22 | + <h2 class="text-3xl font-bold tracking-tight text-skin-neutral-11 sm:text-4xl"> |
| 23 | + Blog |
| 24 | + </h2> |
16 | 25 |
|
17 |
| - <p class="mt-2 text-lg leading-8 text-gray-600"> |
| 26 | + <p class="mt-2 text-lg leading-8 text-skin-neutral-12"> |
18 | 27 | @if (isset($fromArchive))
|
19 |
| - Posts from archive: <span class="font-semibold">{{ $fromArchive }}</span> |
| 28 | + Posts from archive: |
| 29 | + <span class="font-semibold">{{ $fromArchive }}</span> |
20 | 30 | @elseif (isset($fromTag))
|
21 |
| - Posts tagged with: <span class="font-semibold">{{ $fromTag }}</span> |
| 31 | + Posts tagged with: |
| 32 | + <span class="font-semibold">{{ $fromTag }}</span> |
22 | 33 | @elseif (isset($fromSearch))
|
23 |
| - Posts matching: <span class="font-semibold">{{ $fromSearch }}</span> |
| 34 | + Posts matching: |
| 35 | + <span class="font-semibold">{{ $fromSearch }}</span> |
24 | 36 | @else
|
25 |
| - Learn how to grow your business with our expert advice. |
| 37 | + <span> |
| 38 | + Here you will find the latest news and updates about |
| 39 | + us. |
| 40 | + </span> |
26 | 41 | @endif
|
27 | 42 | </p>
|
28 | 43 | </div>
|
29 | 44 |
|
30 | 45 | @if ($posts->count())
|
31 | 46 | <!-- Posts -->
|
32 |
| - <div class="mx-auto mt-16 grid max-w-2xl grid-cols-1 gap-x-8 gap-y-20 lg:mx-0 lg:max-w-none lg:grid-cols-3"> |
33 |
| - |
34 |
| - |
| 47 | + <div |
| 48 | + class="mx-auto mt-16 grid max-w-sm grid-cols-1 gap-x-8 gap-y-16 md:max-w-2xl md:grid-cols-2 lg:mx-0 lg:max-w-none lg:grid-cols-3"> |
35 | 49 | @foreach ($posts as $post)
|
36 |
| - <article class="flex flex-col items-start justify-between"> |
37 |
| - <div class="relative w-full"> |
38 |
| - <a href="/blog/{{ $post->slug }}" class="block"> |
| 50 | + <article class="rounded bg-skin-neutral-11"> |
| 51 | + <a href="/blog/{{ $post->slug }}" |
| 52 | + class="flex flex-col items-start justify-between px-6 py-6 text-skin-neutral-2 transition-all duration-300 ease-out hover:bg-skin-neutral-12 hover:text-skin-neutral-1"> |
| 53 | + <header class="relative w-full"> |
39 | 54 | @if ($post->image_url)
|
40 | 55 | <img src="{{ $post->image_url }}" alt="{{ $post->title }}"
|
41 |
| - class="aspect-[16/9] w-full rounded-2xl bg-gray-100 object-cover sm:aspect-[2/1] lg:aspect-[3/2]"> |
| 56 | + class="aspect-[16/9] w-full object-cover sm:aspect-[2/1] lg:aspect-[3/2]" /> |
42 | 57 | @else
|
43 | 58 | <div
|
44 |
| - class="aspect-[16/9] w-full rounded-2xl sm:aspect-[2/1] lg:aspect-[3/2] flex items-center justify-center bg-gradient-to-bl from-skin-neutral-1 to-skin-neutral-6"> |
45 |
| - <span class="text-lg text-skin-neutral-9">N/A</span> |
| 59 | + class="flex aspect-[16/9] w-full items-center justify-center rounded-2xl bg-gradient-to-bl from-skin-neutral-1 to-skin-neutral-6 sm:aspect-[2/1] lg:aspect-[3/2]"> |
| 60 | + <span class="text-lg text-skin-neutral-9"> |
| 61 | + N/A |
| 62 | + </span> |
46 | 63 | </div>
|
47 | 64 | @endif
|
48 |
| - <div class="absolute inset-0 rounded-2xl ring-1 ring-inset ring-gray-900/10"></div> |
49 |
| - </a> |
50 |
| - </div> |
51 |
| - <div class="max-w-xl"> |
52 |
| - <div class="mt-8 flex items-center gap-2 text-xs"> |
53 |
| - <div class="text-gray-600 italic flex items-center gap-1"> |
54 |
| - |
55 |
| - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" |
56 |
| - class="h-3 w-3"> |
57 |
| - <path |
58 |
| - d="M17 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H7V1H9V3H15V1H17V3ZM4 9V19H20V9H4ZM6 11H8V13H6V11ZM11 11H13V13H11V11ZM16 11H18V13H16V11Z"> |
59 |
| - </path> |
60 |
| - </svg> |
61 |
| - {{ $post->published_at->format('F d, Y') }} |
| 65 | + <div class="absolute inset-0 rounded-2xl ring-1 ring-inset ring-skin-neutral-10/10"> |
62 | 66 | </div>
|
63 |
| - |
64 |
| - <div class="text-gray-600 italic flex items-center gap-1"> |
65 |
| - @if ($post->author) |
66 |
| - @if ($post->author->image_url) |
67 |
| - <img src="{{ $post->author->image_url }}" alt="{{ $post->author->name }}" |
68 |
| - class="h-4 w-4 rounded-md bg-gray-100 object-cover"> |
69 |
| - @else |
70 |
| - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" |
71 |
| - fill="currentColor" class="h-4 w-4"> |
72 |
| - <path |
73 |
| - d="M4 22C4 17.5817 7.58172 14 12 14C16.4183 14 20 17.5817 20 22H4ZM12 13C8.685 13 6 10.315 6 7C6 3.685 8.685 1 12 1C15.315 1 18 3.685 18 7C18 10.315 15.315 13 12 13Z"> |
74 |
| - </path> |
75 |
| - </svg> |
| 67 | + </header> |
| 68 | + <div class="max-w-xl"> |
| 69 | + <div class="mt-8 flex items-center gap-2 text-xs"> |
| 70 | + <div class="flex items-center gap-1 italic"> |
| 71 | + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" |
| 72 | + class="h-3 w-3"> |
| 73 | + <path |
| 74 | + d="M17 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2 3 3 3H7V1H9V3H15V1H17V3ZM4 9V19H20V9H4ZM6 11H8V13H6V11ZM11 11H13V13H11V11ZM16 11H18V13H16V11Z"> |
| 75 | + </path> |
| 76 | + </svg> |
| 77 | + {{ $post->published_at->format('F d, Y') }} |
| 78 | + </div> |
| 79 | + <div class="flex items-center gap-1 italic"> |
| 80 | + @if ($post->author) |
| 81 | + @if ($post->author->image_url) |
| 82 | + <img src="{{ $post->author->image_url }}" |
| 83 | + alt="{{ $post->author->name }}" |
| 84 | + class="h-4 w-4 rounded-md bg-skin-neutral-2 object-cover" /> |
| 85 | + @else |
| 86 | + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" |
| 87 | + fill="currentColor" class="h-4 w-4"> |
| 88 | + <path |
| 89 | + d="M4 22C4 17.5817 7.58172 14 12 14C16.4183 14 20 17.5817 20 22H4ZM12 13C8.685 13 6 10.315 6 7C6 3.685 8.685 1 12 1C15.315 1 18 3.685 18 7C18 10.315 15.315 13 12 13Z"> |
| 90 | + </path> |
| 91 | + </svg> |
| 92 | + @endif |
| 93 | + {{ $post->author->name }} |
76 | 94 | @endif
|
77 |
| - {{ $post->author->name }} |
78 |
| - @endif |
| 95 | + </div> |
79 | 96 | </div>
|
80 |
| - </div> |
81 |
| - |
82 |
| - <div class="group relative mb-2"> |
83 |
| - <h3 |
84 |
| - class="mt-3 text-lg font-semibold leading-6 text-gray-900 group-hover:text-gray-600 min-h-12 "> |
85 |
| - <a href="/blog/{{ $post->slug }}"> |
86 |
| - <span class="absolute |
87 |
| - inset-0"></span> |
| 97 | + <div class="group relative mb-2"> |
| 98 | + <h3 class="mb-2 mt-3 min-h-12 text-lg font-semibold leading-6"> |
| 99 | + <span class="absolute inset-0"></span> |
88 | 100 | {{ $post->title }}
|
89 |
| - </a> |
90 |
| - </h3> |
91 |
| - <p class="mt-5 line-clamp-3 text-sm leading-6 text-gray-600"> |
92 |
| - {{ Str::limit($post->content, 160) }} |
93 |
| - </p> |
94 |
| - </div> |
95 |
| - |
96 |
| - <div class="mt-4 min-h-[44px]"> <!-- Reserve space for tags --> |
97 |
| - @foreach ($post->tags as $tag) |
98 |
| - <a href="/blog/tag/{{ $tag->slug }}" |
99 |
| - class="inline-block rounded px-3 py-1.5 text-sm bg-gray-200 mr-2 hover:bg-gray-100"> |
100 |
| - {{ $tag->name }} |
101 |
| - </a> |
102 |
| - @endforeach |
| 101 | + </h3> |
| 102 | + <div class="line-clamp-3 text-sm leading-6"> |
| 103 | + {!! $post->summary !!} |
| 104 | + </div> |
| 105 | + </div> |
| 106 | + @if ($post->tags->count()) |
| 107 | + <footer class="mt-4 min-h-[44px]"> |
| 108 | + @foreach ($post->tags as $tag) |
| 109 | + <a href="/blog/tag/{{ $tag->slug }}" |
| 110 | + class="mr-2 inline-block rounded bg-skin-neutral-1 px-3 py-1.5 text-sm"> |
| 111 | + {{ $tag->name }} |
| 112 | + </a> |
| 113 | + @endforeach |
| 114 | + </footer> |
| 115 | + @endif |
103 | 116 | </div>
|
104 |
| - |
105 |
| - </div> |
| 117 | + </a> |
106 | 118 | </article>
|
107 | 119 | @endforeach
|
108 |
| - |
109 |
| - |
110 | 120 | </div>
|
111 | 121 | @else
|
112 |
| - <p class="text-gray-600 bg-skin-neutral-3 px-4 py-2 rounded mt-2">No posts found.</p> |
| 122 | + <p class="mt-2 rounded bg-skin-neutral-3 px-4 py-2 text-skin-neutral-9"> |
| 123 | + No posts found. |
| 124 | + </p> |
113 | 125 | @endif
|
114 | 126 |
|
115 | 127 | <div class="mt-12">
|
|
0 commit comments