hugo-theme-stack/layouts/partials/article-list/compact.html

24 lines
772 B
HTML
Raw Normal View History

2020-08-22 13:20:08 +02:00
<article>
<div class="article-details">
<h2 class="article-title">
<a href="{{ .Permalink }}">
{{- .Title -}}
</a>
</h2>
<footer class="article-time">
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
2020-08-22 13:20:08 +02:00
</time>
</footer>
</div>
{{ if .Params.image }}
{{- $image := partial "helper/image" . -}}
{{- $thumbnail := $image.Fill "120x120" -}}
<div class="article-image">
<img src="{{ $thumbnail.RelPermalink }}" width="{{ $thumbnail.Width }}"
height="{{ $thumbnail.Height }}" loading="lazy">
</div>
{{ end }}
</article>