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