2021-03-04 23:31:29 +00:00
|
|
|
{{!-- This is a partial file used to generate a post "card"
|
|
|
|
which templates loop over to generate a list of posts. --}}
|
|
|
|
|
2022-04-08 10:04:54 +00:00
|
|
|
<article class="post-card {{post_class}} {{#match @custom.feed_layout "!=" "Simple grid"}}{{#is "home, paged"}}{{#match @custom.feed_layout "Dynamic grid"}}{{#has index="0"}}{{#is "home"}}{{#if feature_image}}post-card-large{{/if}}{{/is}}{{/has}}{{else}}post-card-large{{/match}}{{/is}}{{/match}}">
|
2018-12-17 12:25:57 +00:00
|
|
|
|
2017-06-12 09:01:00 +00:00
|
|
|
{{#if feature_image}}
|
2018-12-17 12:25:57 +00:00
|
|
|
<a class="post-card-image-link" href="{{url}}">
|
|
|
|
{{!-- This is a responsive image, it loads different sizes depending on device
|
|
|
|
https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}}
|
|
|
|
<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"
|
2021-03-02 01:34:12 +00:00
|
|
|
sizes="(max-width: 1000px) 400px, 800px"
|
2018-12-17 12:25:57 +00:00
|
|
|
src="{{img_url feature_image size="m"}}"
|
2021-07-05 02:59:21 +00:00
|
|
|
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}"
|
2021-03-02 01:34:12 +00:00
|
|
|
loading="lazy"
|
2018-12-17 12:25:57 +00:00
|
|
|
/>
|
|
|
|
</a>
|
2017-06-12 09:01:00 +00:00
|
|
|
{{/if}}
|
2018-12-17 12:25:57 +00:00
|
|
|
|
2017-06-12 09:01:00 +00:00
|
|
|
<div class="post-card-content">
|
2018-12-17 12:25:57 +00:00
|
|
|
|
2017-06-12 09:01:00 +00:00
|
|
|
<a class="post-card-content-link" href="{{url}}">
|
|
|
|
<header class="post-card-header">
|
2017-08-10 14:10:17 +00:00
|
|
|
{{#if primary_tag}}
|
2019-10-21 05:43:34 +00:00
|
|
|
{{#primary_tag}}
|
|
|
|
<div class="post-card-primary-tag">{{name}}</div>
|
|
|
|
{{/primary_tag}}
|
2017-06-12 09:01:00 +00:00
|
|
|
{{/if}}
|
|
|
|
<h2 class="post-card-title">{{title}}</h2>
|
|
|
|
</header>
|
2021-09-22 07:26:39 +00:00
|
|
|
<div class="post-card-excerpt">
|
2021-03-02 01:34:12 +00:00
|
|
|
<p>{{excerpt}}</p>
|
2021-09-22 07:26:39 +00:00
|
|
|
</div>
|
2017-06-12 09:01:00 +00:00
|
|
|
</a>
|
2018-12-17 12:25:57 +00:00
|
|
|
|
2017-06-12 09:01:00 +00:00
|
|
|
<footer class="post-card-meta">
|
2018-04-10 18:19:29 +00:00
|
|
|
<ul class="author-list">
|
2019-10-21 05:43:34 +00:00
|
|
|
{{#foreach authors}}
|
2018-04-10 18:19:29 +00:00
|
|
|
<li class="author-list-item">
|
|
|
|
{{#if profile_image}}
|
2019-10-21 05:43:34 +00:00
|
|
|
<a href="{{url}}" class="static-avatar">
|
2021-10-15 03:17:40 +00:00
|
|
|
<img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" loading="lazy" />
|
2019-10-21 05:43:34 +00:00
|
|
|
</a>
|
2018-04-10 18:19:29 +00:00
|
|
|
{{else}}
|
2019-10-21 05:43:34 +00:00
|
|
|
<a href="{{url}}" class="static-avatar author-profile-image">{{> "icons/avatar"}}</a>
|
2018-04-10 18:19:29 +00:00
|
|
|
{{/if}}
|
|
|
|
</li>
|
2019-10-21 05:43:34 +00:00
|
|
|
{{/foreach}}
|
2018-04-10 18:19:29 +00:00
|
|
|
</ul>
|
2019-10-21 05:43:34 +00:00
|
|
|
<div class="post-card-byline-content">
|
2022-01-26 05:10:55 +00:00
|
|
|
<span class="post-card-byline-author">{{#has author="count:>2"}}Multiple authors{{else}}{{authors}}{{/has}}</span>
|
2021-03-05 15:13:14 +00:00
|
|
|
<span class="post-card-byline-date"><time datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time> <span class="bull">•</span> {{reading_time}}</span>
|
2019-10-21 05:43:34 +00:00
|
|
|
</div>
|
2017-06-12 09:01:00 +00:00
|
|
|
</footer>
|
2018-12-17 12:25:57 +00:00
|
|
|
|
|
|
|
</div>{{!--/.post-card-content--}}
|
|
|
|
|
2017-06-12 09:01:00 +00:00
|
|
|
</article>
|