2020-08-24 13:27:51 -04:00
|
|
|
<header class="article-header">
|
2020-09-17 18:12:26 -04:00
|
|
|
{{- $image := partialCached "helper/image" (dict "Context" . "Type" "article") .RelPermalink "article" -}}
|
2020-09-10 12:53:36 -04:00
|
|
|
{{ if $image.exists }}
|
|
|
|
<div class="article-image">
|
2020-09-11 10:01:01 -04:00
|
|
|
{{ if $image.resource }}
|
|
|
|
{{- $tablet := $image.resource.Resize "1024x" -}}
|
|
|
|
{{- $desktop := $image.resource.Resize "2000x" -}}
|
2020-08-24 13:27:51 -04:00
|
|
|
|
2020-09-10 12:53:36 -04:00
|
|
|
<img srcset="{{ $tablet.RelPermalink }} 1024w, {{ $desktop.RelPermalink }} 2000w"
|
2020-09-11 10:01:01 -04:00
|
|
|
src="{{ $desktop.RelPermalink }}" width="{{ $image.resource.Width }}" height="{{ $image.resource.Height }}" loading="lazy"
|
2020-09-10 12:53:36 -04:00
|
|
|
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 }}
|
|
|
|
</div>
|
2020-08-24 13:27:51 -04:00
|
|
|
{{ end }}
|
|
|
|
|
2020-09-17 17:13:50 -04:00
|
|
|
{{ partialCached "article/components/details" . .RelPermalink }}
|
2020-08-24 13:27:51 -04:00
|
|
|
</header>
|