mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-12-21 12:57:54 +01:00
17 lines
No EOL
591 B
HTML
17 lines
No EOL
591 B
HTML
<header class="article-header">
|
|
{{ if .Params.image }}
|
|
{{- $image := partial "helper/image" . -}}
|
|
|
|
{{- $tablet := $image.Resize "1024x" -}}
|
|
{{- $desktop := $image.Resize "2000x" -}}
|
|
|
|
<div class="article-image">
|
|
<img srcset="{{ $tablet.RelPermalink }} 1024w, {{ $desktop.RelPermalink }} 2000w"
|
|
src="{{ $desktop.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}"
|
|
loading="lazy"
|
|
alt="Featured image of post {{ .Title }}" />
|
|
</div>
|
|
{{ end }}
|
|
|
|
{{ partial "article/components/details" . }}
|
|
</header> |