Files
hugo-theme-stack/layouts/_partials/article-list/compact.html
T

45 lines
1.7 KiB
HTML
Raw Normal View History

2020-08-22 13:20:08 +02:00
<article>
2020-10-31 23:24:58 +01:00
<a href="{{ .RelPermalink }}">
<div class="article-details">
<h2 class="article-title">
2020-08-22 13:20:08 +02:00
{{- .Title -}}
</h2>
{{- $description := .Params.description -}}
{{- $IsTerm := in .Kind "term" -}}
{{- if $IsTerm -}}
{{- $description = $description | default (T "list.page" (len .Pages)) -}}
{{- end -}}
{{- if or $description (not .Date.IsZero) -}}
<footer class="article-meta">
{{- if not .Date.IsZero -}}
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
{{- .Date | time.Format .Site.Params.dateFormat.published -}}
</time>
{{- else if $description -}}
<span class="article-description">{{- $description -}}</span>
{{ end }}
</footer>
{{- end -}}
2020-09-10 18:53:36 +02:00
</div>
{{- $image := partial "helper/image" (dict "Image" .Params.image "Resources" .Resources "Context" .) -}}
{{ if $image }}
<div class="article-image">
2026-03-04 23:32:33 +01:00
{{ partial "helper/thumbnail-image" (dict
"Resource" $image.Resource
"Width" 60
"Height" 60
"Resize" .Site.Params.ImageProcessing.Thumbnail.Enabled
"Attributes" (dict
"src" $image.Permalink
"alt" .Title
"loading" "lazy"
"width" $image.Width
"height" $image.Height
)
) }}
</div>
{{ end }}
</a>
2020-08-22 13:20:08 +02:00
</article>