37 lines
1.4 KiB
Handlebars
37 lines
1.4 KiB
Handlebars
{{#if feature_image}}
|
|
<div class="grid-item">
|
|
<figure class="{{post_class}}">
|
|
|
|
<a class="post-link" aria-label="Navigate to {{title}} page" href="{{url}}">
|
|
<img class="post-image" srcset="{{img_url feature_image size="s"}} 300w, {{img_url feature_image size="m" }}
|
|
720w, {{img_url feature_image size="l" }} 960w, {{img_url feature_image size="xl" }} 1200w, {{img_url
|
|
feature_image size="xxl" }} 2000w"
|
|
sizes="(min-width: 1020px) 300px, (min-width: 641px) calc((100vw - 50px) / 3), calc((100vw - 40px) / 2)"
|
|
src="{{img_url feature_image size="s"}}" alt="{{title}}">
|
|
</a>
|
|
|
|
<a class="post-lightbox" aria-label="Expand image" href="{{img_url feature_image}}">
|
|
{{> icons/maximize}}
|
|
</a>
|
|
|
|
<figcaption class="post-caption">
|
|
<h2 class="post-caption-title">{{title}}</h2>
|
|
<div class="post-caption-meta">
|
|
{{#primary_tag}}
|
|
<span class="post-caption-meta-item post-caption-meta-tag">
|
|
<a href="{{url}}">{{name}}</a>
|
|
</span>
|
|
{{/primary_tag}}
|
|
<span class="post-caption-meta-item post-caption-meta-date">
|
|
<time datetime="{{date format="YYYY-MM-DD"}}">{{date published_at}}</time>
|
|
</span>
|
|
<span class="post-caption-meta-item post-caption-meta-link">
|
|
<a href="{{url}}">View post</a>
|
|
</span>
|
|
</div>
|
|
</figcaption>
|
|
|
|
</figure>
|
|
</div>
|
|
{{/if}}
|