mind-overflow-website-ghost.../partials/post-card-small.hbs
Lorenzo Dellacà 2858f82b3a Start implementing post info at bottom
Now, all posts show info about: author, updated date, tags.
However, styling is needed and also the tags part has to be fixed (we need to add a comma after every tag's name, excluding the last one)
2021-01-03 15:56:27 +01:00

26 lines
1.1 KiB
Handlebars

{{!-- Gest the 3 most recent related posts --}}
{{#get "posts" limit="3" filter="id:-{{post.id}}+tags:[{{post.tags}}]" include="tags" as |related|}}
<h4>Similar posts</h4>
{{#foreach related}}
<article class="{{post_class}}">
<a class="mind-post-card-sidebar_main" href="{{url}}">
{{#if feature_image}}
<img class="mind-post-card-sidebar_feature-image" src="{{img_url feature_image size="s"}}"
alt="Feature Image"/>
{{/if}}
<header class="mind-post-card-sidebar_header">
<p class="mind-post-card-sidebar_meta"><span
class="mind-post-card-sidebar_tag">{{primary_tag.name}}</span> •
<time class="post-date" datetime="{{date published_at format='YYYY-MM-DD'}}">{{date
published_at format="DD MMMM YYYY"}}</time>
</p>
<h5>{{title}}</h5>
</header>
</a>
</article>
{{/foreach}}
{{else}}
<h4>No related posts</h4>
{{/get}}