implement sidebar related-posts style

implement remark42 commenting system
This commit is contained in:
Lorenzo Dellacà
2020-08-16 12:25:09 +02:00
parent a1f0fcaf99
commit 3b4b716667
8 changed files with 106 additions and 46 deletions

View File

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