All checks were successful
Deploy Theme / deploy (push) Successful in 13s
76 lines
3.5 KiB
Handlebars
76 lines
3.5 KiB
Handlebars
{{!< default}}
|
|
|
|
{{#post}}
|
|
<article class="container mx-auto px-4 py-12">
|
|
<header class="text-center mb-8">
|
|
<h1 class="text-6xl font-bold tracking-tight text-[var(--text-primary)] mb-4">{{title fallback="No Title Provided"}}</h1>
|
|
<section class="post-meta text-[var(--text-secondary)] text-lg">
|
|
<time datetime="{{date format="YYYY-MM-DD"}}">{{date format="MMMM DD, YYYY"}}</time>
|
|
{{#if primary_tag}}
|
|
<span class="mx-2">•</span>
|
|
<a href="{{primary_tag.url}}" class="text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition duration-200">{{primary_tag.name}}</a>
|
|
{{/if}}
|
|
</section>
|
|
</header>
|
|
|
|
{{#if feature_image}}
|
|
<figure class="mb-12 rounded-lg overflow-hidden shadow-xl">
|
|
<img
|
|
class="w-full h-auto object-cover"
|
|
src="{{img_url feature_image size="xl"}}"
|
|
srcset="{{img_url feature_image size="l"}} 1000w,
|
|
{{img_url feature_image size="xl"}} 2000w"
|
|
sizes="(max-width: 1000px) 1000px, 2000px"
|
|
alt="{{title fallback="No Title"}}"
|
|
>
|
|
</figure>
|
|
{{/if}}
|
|
|
|
<section class="post-content max-w-3xl mx-auto text-[var(--text-primary)] leading-relaxed text-lg prose">
|
|
{{content fallback="<p>No content provided for this post.</p>"}}
|
|
</section>
|
|
|
|
{{!-- Related Posts --}}
|
|
{{#if primary_tag}}
|
|
{{#get "posts" filter="tags:{{primary_tag.slug}}+id:-{{id}}" limit="3" as |related_posts|}}
|
|
{{#if related_posts}}
|
|
<section class="mt-16 pt-12 border-t border-[var(--bg-tertiary)]">
|
|
<h3 class="text-3xl font-bold mb-8 text-center">You might also like</h3>
|
|
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8">
|
|
{{#foreach related_posts}}
|
|
{{> "post-card"}}
|
|
{{/foreach}}
|
|
</div>
|
|
</section>
|
|
{{/if}}
|
|
{{/get}}
|
|
{{/if}}
|
|
|
|
{{!-- Next/Prev Navigation --}}
|
|
<nav class="mt-16 grid grid-cols-1 md:grid-cols-2 gap-4 border-t border-[var(--bg-tertiary)] pt-12">
|
|
<div class="prev-post-nav">
|
|
{{#prev_post}}
|
|
<a href="{{url}}" class="group block p-6 bg-[var(--bg-secondary)] rounded-lg hover:bg-[var(--bg-tertiary)] transition-all duration-300">
|
|
<span class="text-xs uppercase tracking-widest text-[var(--text-tertiary)] mb-2 block">← Previous Post</span>
|
|
<h4 class="text-xl font-bold group-hover:text-[var(--brand-primary)] transition-colors duration-300">{{title}}</h4>
|
|
</a>
|
|
{{/prev_post}}
|
|
</div>
|
|
<div class="next-post-nav md:text-right">
|
|
{{#next_post}}
|
|
<a href="{{url}}" class="group block p-6 bg-[var(--bg-secondary)] rounded-lg hover:bg-[var(--bg-tertiary)] transition-all duration-300">
|
|
<span class="text-xs uppercase tracking-widest text-[var(--text-tertiary)] mb-2 block">Next Post →</span>
|
|
<h4 class="text-xl font-bold group-hover:text-[var(--brand-primary)] transition-colors duration-300">{{title}}</h4>
|
|
</a>
|
|
{{/next_post}}
|
|
</div>
|
|
</nav>
|
|
|
|
<footer class="mt-12 pt-8 border-t border-[var(--bg-tertiary)] text-center">
|
|
<a href="/" class="btn-primary">
|
|
← Back to Home
|
|
</a>
|
|
</footer>
|
|
</article>
|
|
{{/post}}
|