This commit is contained in:
34
post.hbs
34
post.hbs
@@ -32,23 +32,6 @@
|
|||||||
{{content fallback="<p>No content provided for this post.</p>"}}
|
{{content fallback="<p>No content provided for this post.</p>"}}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{{!-- Related Posts - Only show on posts, not pages --}}
|
|
||||||
{{#is "post"}}
|
|
||||||
{{#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 --}}
|
{{!-- Next/Prev Navigation --}}
|
||||||
<nav class="hidden has-[a]:grid mt-16 max-w-3xl mx-auto grid-cols-1 md:grid-cols-2 gap-4 pt-12">
|
<nav class="hidden has-[a]:grid mt-16 max-w-3xl mx-auto grid-cols-1 md:grid-cols-2 gap-4 pt-12">
|
||||||
{{#prev_post}}
|
{{#prev_post}}
|
||||||
@@ -69,6 +52,23 @@
|
|||||||
</div>
|
</div>
|
||||||
{{/next_post}}
|
{{/next_post}}
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
{{!-- Related Posts - Only show on posts, not pages --}}
|
||||||
|
{{#is "post"}}
|
||||||
|
{{#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}}
|
||||||
{{/is}}
|
{{/is}}
|
||||||
</article>
|
</article>
|
||||||
{{/post}}
|
{{/post}}
|
||||||
|
|||||||
Reference in New Issue
Block a user