2021-03-04 18:31:29 -05:00
|
|
|
{{!-- This is a partial file used to generate a post "card"
|
|
|
|
which templates loop over to generate a list of posts. --}}
|
|
|
|
|
2021-03-11 13:44:10 -05:00
|
|
|
<article class="post-card {{post_class}} {{#is "home"}}{{#if feature_image}}{{#has index="0"}}post-card-large{{/has}}{{/if}}{{/is}}">
|
2018-12-17 07:25:57 -05:00
|
|
|
|
2017-06-12 05:01:00 -04:00
|
|
|
{{#if feature_image}}
|
2018-12-17 07:25:57 -05: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-01 20:34:12 -05:00
|
|
|
sizes="(max-width: 1000px) 400px, 800px"
|
2018-12-17 07:25:57 -05:00
|
|
|
src="{{img_url feature_image size="m"}}"
|
|
|
|
alt="{{title}}"
|
2021-03-01 20:34:12 -05:00
|
|
|
loading="lazy"
|
2018-12-17 07:25:57 -05:00
|
|
|
/>
|
|
|
|
</a>
|
2017-06-12 05:01:00 -04:00
|
|
|
{{/if}}
|
2018-12-17 07:25:57 -05:00
|
|
|
|
2017-06-12 05:01:00 -04:00
|
|
|
<div class="post-card-content">
|
2018-12-17 07:25:57 -05:00
|
|
|
|
2017-06-12 05:01:00 -04:00
|
|
|
<a class="post-card-content-link" href="{{url}}">
|
|
|
|
<header class="post-card-header">
|
2017-08-10 10:10:17 -04:00
|
|
|
{{#if primary_tag}}
|
2019-10-21 01:43:34 -04:00
|
|
|
{{#primary_tag}}
|
|
|
|
<div class="post-card-primary-tag">{{name}}</div>
|
|
|
|
{{/primary_tag}}
|
2017-06-12 05:01:00 -04:00
|
|
|
{{/if}}
|
|
|
|
<h2 class="post-card-title">{{title}}</h2>
|
|
|
|
</header>
|
|
|
|
<section class="post-card-excerpt">
|
2021-03-01 20:34:12 -05:00
|
|
|
<p>{{excerpt}}</p>
|
2017-06-12 05:01:00 -04:00
|
|
|
</section>
|
|
|
|
</a>
|
2018-12-17 07:25:57 -05:00
|
|
|
|
2017-06-12 05:01:00 -04:00
|
|
|
<footer class="post-card-meta">
|
2018-04-10 14:19:29 -04:00
|
|
|
<ul class="author-list">
|
2019-10-21 01:43:34 -04:00
|
|
|
{{#foreach authors}}
|
2018-04-10 14:19:29 -04:00
|
|
|
<li class="author-list-item">
|
|
|
|
{{#if profile_image}}
|
2019-10-21 01:43:34 -04:00
|
|
|
<a href="{{url}}" class="static-avatar">
|
|
|
|
<img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" />
|
|
|
|
</a>
|
2018-04-10 14:19:29 -04:00
|
|
|
{{else}}
|
2019-10-21 01:43:34 -04:00
|
|
|
<a href="{{url}}" class="static-avatar author-profile-image">{{> "icons/avatar"}}</a>
|
2018-04-10 14:19:29 -04:00
|
|
|
{{/if}}
|
|
|
|
</li>
|
2019-10-21 01:43:34 -04:00
|
|
|
{{/foreach}}
|
2018-04-10 14:19:29 -04:00
|
|
|
</ul>
|
2019-10-21 01:43:34 -04:00
|
|
|
<div class="post-card-byline-content">
|
|
|
|
<span>{{#has author="count:>2"}}Multiple authors{{else}}{{authors}}{{/has}}</span>
|
2021-03-05 10:13:14 -05: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 01:43:34 -04:00
|
|
|
</div>
|
2017-06-12 05:01:00 -04:00
|
|
|
</footer>
|
2018-12-17 07:25:57 -05:00
|
|
|
|
|
|
|
</div>{{!--/.post-card-content--}}
|
|
|
|
|
2017-06-12 05:01:00 -04:00
|
|
|
</article>
|