2020-08-22 07:20:08 -04:00
|
|
|
<article class="{{ if .Params.image }}has-image{{ end }}">
|
2020-09-10 12:53:36 -04:00
|
|
|
{{ $image := partial "helper/image" . }}
|
2020-09-06 13:51:16 -04:00
|
|
|
|
2020-09-10 12:53:36 -04:00
|
|
|
{{ if $image.exists }}
|
|
|
|
<div class="article-image">
|
|
|
|
<a href="{{ .Permalink }}">
|
|
|
|
{{ if $image.local }}
|
|
|
|
{{- $thumbnail := $image.src.Fill "800x250" -}}
|
|
|
|
{{- $thumbnailRetina := $image.src.Fill "1600x500" -}}
|
|
|
|
|
|
|
|
<img src="{{ $thumbnail.RelPermalink }}"
|
|
|
|
srcset="{{ $thumbnail.RelPermalink }} 1x, {{ $thumbnailRetina.RelPermalink }} 2x"
|
|
|
|
width="{{ $thumbnail.Width }}" height="{{ $thumbnail.Height }}" loading="lazy"
|
|
|
|
alt="Featured image of post {{ .Title }}" />
|
|
|
|
{{ else }}
|
|
|
|
<img src="{{ $image.src }}" loading="lazy" alt="Featured image of post {{ .Title }}" />
|
|
|
|
{{ 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>
|