2024-03-25 07:02:47 +08:00
|
|
|
<article id="{{ with .File }}{{ .UniqueID }}{{ end }}">
|
2020-11-01 06:24:58 +08:00
|
|
|
<a href="{{ .RelPermalink }}">
|
2020-09-25 05:59:00 +08:00
|
|
|
<div class="article-details">
|
|
|
|
<h2 class="article-title">
|
2020-08-22 19:20:08 +08:00
|
|
|
{{- .Title -}}
|
2020-09-25 05:59:00 +08:00
|
|
|
</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>
|
2020-09-11 00:53:36 +08:00
|
|
|
</div>
|
2020-09-25 05:59:00 +08:00
|
|
|
|
|
|
|
{{- $image := partialCached "helper/image" (dict "Context" . "Type" "articleList") .RelPermalink "articleList" -}}
|
|
|
|
{{ if $image.exists }}
|
|
|
|
<div class="article-image">
|
|
|
|
{{ if $image.resource }}
|
2020-12-24 04:02:35 +08:00
|
|
|
{{- $Permalink := $image.resource.RelPermalink -}}
|
|
|
|
{{- $Width := $image.resource.Width -}}
|
|
|
|
{{- $Height := $image.resource.Height -}}
|
|
|
|
|
2022-06-12 21:51:46 +08:00
|
|
|
{{- if .Page.Site.Params.imageProcessing.cover.enabled -}}
|
2020-12-24 04:02:35 +08:00
|
|
|
{{- $thumbnail := $image.resource.Fill "120x120" -}}
|
|
|
|
{{- $Permalink = $thumbnail.RelPermalink -}}
|
|
|
|
{{- $Width = $thumbnail.Width -}}
|
|
|
|
{{- $Height = $thumbnail.Height -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
<img src="{{ $Permalink }}"
|
|
|
|
width="{{ $Width }}"
|
|
|
|
height="{{ $Height }}"
|
2021-12-05 04:05:53 +08:00
|
|
|
alt="{{ .Title }}"
|
2020-12-24 04:02:35 +08:00
|
|
|
loading="lazy">
|
2020-09-25 05:59:00 +08:00
|
|
|
{{ else }}
|
|
|
|
<img src="{{ $image.permalink }}" loading="lazy" alt="Featured image of post {{ .Title }}" />
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</a>
|
2020-08-22 19:20:08 +08:00
|
|
|
</article>
|