25 lines
1.1 KiB
Handlebars
25 lines
1.1 KiB
Handlebars
{{!--
|
|
Re-usable card for linking to posts
|
|
--}}
|
|
|
|
<article class="post-card {{post_class}} {{#if feature_image}}with-image{{else}}no-image{{/if}}">
|
|
<a class="post-card-link" href="{{url}}">
|
|
{{#if feature_image}}
|
|
<img class="post-card-image"
|
|
srcset="{{img_url feature_image size="s"}} 300w,
|
|
{{img_url feature_image size="m"}} 600w,
|
|
{{img_url feature_image size="l"}} 1000w,
|
|
{{img_url feature_image size="xl"}} 2000w"
|
|
sizes="(max-width: 1000px) 400px, 700px"
|
|
src="{{img_url feature_image size="m"}}"
|
|
alt="{{title}}"
|
|
/>
|
|
{{/if}}
|
|
<div class="post-card-content">
|
|
<span class="post-card-meta"><time datetime="{{date format="YYYY-MM-DD"}}">{{date format="D MMM YYYY"}}</time> <span class="bull">•</span> {{reading_time}}</span>
|
|
<h2 class="post-card-title">{{title}}</h2>
|
|
<p>{{excerpt}}</p>
|
|
<strong>Read more</strong>
|
|
</div>
|
|
</a>
|
|
</article> |