2020-09-11 12:07:29 -04:00
|
|
|
{{ $image := partial "helper/image" (dict "Context" . "Type" "articleList") }}
|
2020-09-11 10:01:01 -04:00
|
|
|
<article class="{{ if $image.exists }}has-image{{ end }}">
|
2020-09-10 12:53:36 -04:00
|
|
|
{{ if $image.exists }}
|
|
|
|
<div class="article-image">
|
|
|
|
<a href="{{ .Permalink }}">
|
2020-09-11 10:01:01 -04:00
|
|
|
{{ if $image.resource }}
|
|
|
|
{{- $thumbnail := $image.resource.Fill "800x250" -}}
|
|
|
|
{{- $thumbnailRetina := $image.resource.Fill "1600x500" -}}
|
2020-09-10 12:53:36 -04:00
|
|
|
|
|
|
|
<img src="{{ $thumbnail.RelPermalink }}"
|
2020-09-14 07:37:50 -04:00
|
|
|
srcset="{{ $thumbnail.RelPermalink }} 800w, {{ $thumbnailRetina.RelPermalink }} 1600w"
|
2020-09-10 12:53:36 -04:00
|
|
|
width="{{ $thumbnail.Width }}" height="{{ $thumbnail.Height }}" loading="lazy"
|
|
|
|
alt="Featured image of post {{ .Title }}" />
|
|
|
|
{{ else }}
|
2020-09-11 10:01:01 -04:00
|
|
|
<img src="{{ $image.permalink }}" loading="lazy" alt="Featured image of post {{ .Title }}" />
|
2020-09-10 12:53:36 -04:00
|
|
|
{{ end }}
|
|
|
|
</a>
|
|
|
|
</div>
|
2020-08-22 07:20:08 -04:00
|
|
|
{{ end }}
|
|
|
|
|
2020-08-29 05:34:26 -04:00
|
|
|
{{ partial "article/components/details" . }}
|
2020-08-22 07:20:08 -04:00
|
|
|
</article>
|