ghost-theme-sd.ai/partials/loop.hbs

30 lines
1.4 KiB
Handlebars
Raw Normal View History

2023-07-10 04:14:43 +01:00
<article class="gh-card {{post_class}}">
<a class="gh-card-link" href="{{url}}">
{{#if feature_image}}
<figure class="gh-card-image">
<img
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="(max-width: 1200px) 100vw, 1200px"
src="{{img_url feature_image size="m"}}"
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}"
>
</figure>
{{/if}}
<div class="gh-card-wrapper">
2023-07-10 07:03:07 +01:00
<h3 class="gh-card-title">{{title}}</h3>
2023-07-10 04:14:43 +01:00
<p class="gh-card-excerpt">{{excerpt}}</p>
2023-07-10 07:03:07 +01:00
<footer class="gh-card-meta">
{{#if @custom.show_author}}
<span class="gh-card-author">By {{#foreach authors}}{{#if @first}}{{name}}{{else}}, {{name}}{{/if}}{{/foreach}}</span>
{{/if}}
{{#if @custom.show_post_date}}
<time class="gh-card-date" datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time>
{{/if}}
</footer>
2023-07-10 04:14:43 +01:00
</div>
</a>
</article>