refactor: extract partials for post components and create separate page template
All checks were successful
Deploy Theme / deploy (push) Successful in 13s
All checks were successful
Deploy Theme / deploy (push) Successful in 13s
This commit is contained in:
12
partials/related-posts.hbs
Normal file
12
partials/related-posts.hbs
Normal file
@@ -0,0 +1,12 @@
|
||||
{{#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}}
|
||||
Reference in New Issue
Block a user