feat: blog post show page

This commit is contained in:
Rico van Zelst
2023-12-12 14:32:44 +01:00
parent 87210ccac9
commit 3de5f42860
7 changed files with 90 additions and 4 deletions

View File

@@ -62,7 +62,7 @@
</a>
<a class="block p-8 transition bg-stone-800/40 border shadow-xl border-stone-800 rounded-xl hover:border-orange-500/10 hover:shadow-orange-500/10"
href="#">
href="/posts">
<x-iconsax-bul-receipt-edit class="h-10 text-orange-400"/>
<h2 class="mt-4 text-xl font-bold text-white">Blog Posts</h2>

View File

@@ -61,7 +61,7 @@
Sale Rotation</a>
</li>
<li>
<a href="#"
<a href="{{route('posts.index')}}"
class="flex py-2 pl-3 pr-2 rounded hover:bg-stone-100 md:hover:bg-transparent
md:border-0 md:hover:text-orange-500 md:p-0 md:dark:hover:text-orange-400
dark:hover:bg-stone-700 dark:hover:text-white md:dark:hover:bg-transparent

View File

@@ -0,0 +1,38 @@
@use('Carbon\Carbon')
@extends('layouts.app')
@section('title', $post->title . ' • Heimerdinger.LoL')
@section('description', 'Heimerdinger.LoL: ' . $post->description)
@section('content')
<a href="{{route('posts.index')}}"
class="block mt-8 text-center text-orange-400 text-sm uppercase font-medium hover:underline">Back
to
posts</a>
<article class="max-w-screen-md mx-auto mt-2 prose prose-stone prose-invert" itemscope
itemtype="https://schema.org/BlogPosting"
itemid="https://www.dataliberate.com/2019/05/14/library-metadata-evolution-final-mile/">
<meta itemprop="wordCount" content="{{str_word_count($post->contents)}}">
<h3 class="not-prose text-sm text-center text-orange-100 font-semibold" itemprop="datePublished">
{{ Carbon::parse($post->date)->format('F d, Y') }}
</h3>
<div>
<h1
class="not-prose text-3xl font-bold text-center text-transparent uppercase sm:text-4xl
bg-gradient-to-bl from-orange-300 to-orange-500 bg-clip-text" itemprop="headline">
{{$post->title}}</h1>
<h2 class="not-prose text-center text-orange-400 text-sm italic" itemprop="description">
{{ $post->description }}
</h2>
<p>
{{$post->contents}}
</p>
<p class="mt-3 text-sm text-center">
Tagged with: <span itemprop="keywords"
class="italic">
{{ isset($post->tags) ? implode(', ', $post->tags)
: 'League of Legends' }}</span>
</p>
</div>
</article>
@endsection