Hugo-theme-stack/layouts/partials/article-list/default.html
2020-08-29 11:34:26 +02:00

16 lines
619 B
HTML

<article class="{{ if .Params.image }}has-image{{ end }}">
{{ if .Params.image }}
{{- $image := partial "helper/image" . -}}
{{- $thumbnailNotDesktop := $image.Resize "x500 smart" -}}
<div class="article-image">
<a href="{{ .Permalink }}">
<img src="{{ $thumbnailNotDesktop.RelPermalink }}"
width="{{ $thumbnailNotDesktop.Width }}" height="{{ $thumbnailNotDesktop.Height }}" loading="lazy"
alt="Featured image of post {{ .Title }}" />
</a>
</div>
{{ end }}
{{ partial "article/components/details" . }}
</article>