ghost-theme-sd.ai/partials/post-card.hbs

35 lines
1.6 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-11 10:55:58 +01:00
{{#if primary_tag}}
<p class="gh-card-tag">{{primary_tag.name}}</p>
{{/if}}
<h3 class="gh-card-title is-title">{{title}}</h3>
2023-07-31 05:58:56 +01:00
{{#if excerpt}}
<p class="gh-card-excerpt is-body">{{excerpt}}</p>
{{/if}}
<footer class="gh-card-meta"><!--
2023-07-11 10:55:58 +01:00
-->{{#if @custom.show_author}}
2023-07-10 07:03:07 +01:00
<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>
2023-07-11 10:55:58 +01:00
{{/if}}<!--
--></footer>
2023-07-10 04:14:43 +01:00
</div>
</a>
</article>