28 lines
1.0 KiB
HTML
28 lines
1.0 KiB
HTML
<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") -}}
|
|
</time>
|
|
</footer>
|
|
</div>
|
|
|
|
{{ $image := partial "helper/image" (dict "Context" . "Type" "articleList") }}
|
|
|
|
{{ if $image.exists }}
|
|
<div class="article-image">
|
|
{{ if $image.resource }}
|
|
{{- $thumbnail := $image.resource.Fill "120x120" -}}
|
|
<img src="{{ $thumbnail.RelPermalink }}" width="{{ $thumbnail.Width }}"
|
|
height="{{ $thumbnail.Height }}" loading="lazy">
|
|
{{ else }}
|
|
<img src="{{ $image.permalink }}" loading="lazy" alt="Featured image of post {{ .Title }}" />
|
|
{{ end }}
|
|
</div>
|
|
{{ end }}
|
|
</article> |