Skip to content

Commit

Permalink
Some minor improvements to blog posts
Browse files Browse the repository at this point in the history
  • Loading branch information
dsbilling committed Dec 7, 2023
1 parent ae35fc8 commit 28330b9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions resources/views/blog/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
Back to the blog
</a>--}}

<h1 class="text-3xl font-semibold sm:text-4xl lg:text-5xl break-word"><x-gradient-text>{{ $post->title }}</x-gradient-text></h1>
<time datetime="{{ $post->published_at->isoFormat('Y-m-d') }}" class="order-first flex items-center text-sm sm:text-base text-slate-400 dark:text-slate-500"><span class="h-4 w-0.5 rounded-full bg-slate-200 dark:bg-slate-500"></span><span class="ml-3">{{ $post->published_at->isoFormat('D. MMMM YYYY') }}</span></time>

<p class="text-sm font-medium text-gray-400">
{{ now()->subMonth(1) > $post->published_at ? $post->published_at->isoFormat('D. MMMM YYYY') : $post->published_at->diffForHumans() }} &middot; {{ read_time($post->body)}} &middot; {{ App\Helpers\NumberHelper::nearestK(views($post)->count()) }} {{ Str::plural('view', views($post)->count()) }}
<h1 class="text-3xl font-semibold sm:text-4xl lg:text-5xl break-word mt-4"><x-gradient-text>{{ $post->title }}</x-gradient-text></h1>

<p class="text-xs sm:text-sm font-medium text-gray-400 mt-2">
{{ read_time($post->body)}} &middot; {{ App\Helpers\NumberHelper::nearestK(views($post)->count()) }} {{ Str::plural('view', views($post)->count()) }} &middot; {{ $post->likes_count }} {{ Str::plural('like', $post->likes_count) }}
{{--@foreach ($post->tags as $tag)
<span class="inline-flex items-center justify-center mr-1 font-semibold leading-none uppercase">{{ $tag->name }}</span>
@endforeach--}}
Expand Down

0 comments on commit 28330b9

Please sign in to comment.