36 lines
1.5 KiB
PHP
36 lines
1.5 KiB
PHP
<article class="flex gap-5 border-b border-neutral-200 py-8 first:pt-0">
|
|
@if ($post->featured_image)
|
|
<a href="{{ route('blog.show', $post) }}" class="hidden shrink-0 sm:block">
|
|
<img
|
|
src="{{ asset('storage/'.$post->featured_image) }}"
|
|
alt="{{ $post->title }}"
|
|
class="h-28 w-40 rounded-lg object-cover"
|
|
loading="lazy"
|
|
>
|
|
</a>
|
|
@endif
|
|
|
|
<div class="min-w-0">
|
|
@if ($post->category)
|
|
<a href="{{ route('blog.category', $post->category) }}" class="text-xs font-medium uppercase tracking-wide text-neutral-500 hover:text-neutral-900">
|
|
{{ $post->category->name }}
|
|
</a>
|
|
@endif
|
|
|
|
<h2 class="mt-2 text-2xl font-semibold tracking-tight">
|
|
<a href="{{ route('blog.show', $post) }}" class="hover:underline">{{ $post->title }}</a>
|
|
</h2>
|
|
|
|
<p class="mt-2 text-neutral-600">{{ $post->excerpt_or_summary }}</p>
|
|
|
|
<div class="mt-4 flex flex-wrap items-center gap-3 text-sm text-neutral-500">
|
|
<time datetime="{{ $post->published_at->toIso8601String() }}">{{ $post->published_at->format('M j, Y') }}</time>
|
|
<span aria-hidden="true">·</span>
|
|
<span>{{ $post->user->name }}</span>
|
|
@foreach ($post->tags as $tag)
|
|
<a href="{{ route('blog.tag', $tag) }}" class="rounded-full bg-neutral-100 px-2 py-0.5 text-xs hover:bg-neutral-200">#{{ $tag->name }}</a>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
</article>
|