2019-10-28 15:28:25 +00:00
|
|
|
<article class="post-card {{post_class}} {{#unless feature_image}}no-image{{else}}{{#is "home"}}{{#has index="nth:6"}}post-card-large{{/has}}{{/is}}{{/unless}}">
|
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"
|
|
|
|
sizes="(max-width: 1000px) 400px, 700px"
|
|
|
|
src="{{img_url feature_image size="m"}}"
|
|
|
|
alt="{{title}}"
|
|
|
|
/>
|
|
|
|
</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}}">
|
2018-12-17 12:25:57 +00:00
|
|
|
|
2017-06-12 09:01:00 +00:00
|
|
|
<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>
|
2018-12-17 12:25:57 +00:00
|
|
|
|
2017-06-12 09:01:00 +00:00
|
|
|
<section class="post-card-excerpt">
|
2019-10-21 05:43:34 +00:00
|
|
|
{{#if feature_image}}
|
|
|
|
<p>{{excerpt words="30"}}</p>
|
|
|
|
{{else}}
|
|
|
|
<p>{{excerpt words="44"}}</p>
|
|
|
|
{{/if}}
|
2017-06-12 09:01:00 +00:00
|
|
|
</section>
|
2018-12-17 12:25:57 +00:00
|
|
|
|
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">
|
2019-10-21 05:43:34 +00:00
|
|
|
|
2018-04-10 18:19:29 +00:00
|
|
|
<div class="author-name-tooltip">
|
|
|
|
{{name}}
|
|
|
|
</div>
|
2019-10-21 05:43:34 +00:00
|
|
|
|
2018-04-10 18:19:29 +00:00
|
|
|
{{#if profile_image}}
|
2019-10-21 05:43:34 +00: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 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">
|
|
|
|
<span>{{#has author="count:>2"}}Multiple authors{{else}}{{authors}}{{/has}}</span>
|
|
|
|
<span class="post-card-byline-date"><time datetime="{{date format="YYYY-MM-DD"}}">{{date format="D MMM YYYY"}}</time> <span class="bull">•</span> {{reading_time}}</span>
|
|
|
|
</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>
|