2020-09-18 06:12:26 +08:00
|
|
|
{{ $image := partialCached "helper/image" (dict "Context" . "Type" "article") .RelPermalink "article" }}
|
2020-09-18 06:00:39 +08:00
|
|
|
{{- $context := . -}}
|
2020-08-29 17:34:26 +08:00
|
|
|
<div class="article-details">
|
2020-10-10 01:26:28 +08:00
|
|
|
{{ if .Params.categories }}
|
2020-08-29 17:34:26 +08:00
|
|
|
<header class="article-category">
|
2020-10-10 01:26:28 +08:00
|
|
|
{{ range (.GetTerms "categories") }}
|
2020-09-19 02:05:19 +08:00
|
|
|
{{ if and $image.exists $image.resource }}
|
|
|
|
{{- $imageRaw := $image.resource | resources.Fingerprint "md5" -}}
|
|
|
|
{{- $20x := $imageRaw.Fill "20x20 smart" -}}
|
2020-11-01 06:24:58 +08:00
|
|
|
<a href="{{ .RelPermalink }}"
|
2020-10-10 15:13:40 +08:00
|
|
|
class="color-tag"
|
|
|
|
data-image="{{ $20x.RelPermalink }}"
|
|
|
|
data-key="{{ $context.Slug }}"
|
|
|
|
data-hash="{{ $imageRaw.Data.Integrity }}">
|
|
|
|
{{ .LinkTitle }}
|
|
|
|
</a>
|
2020-09-19 02:05:19 +08:00
|
|
|
{{ else }}
|
2020-11-01 06:24:58 +08:00
|
|
|
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
|
2020-08-29 17:34:26 +08:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</header>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
<h2 class="article-title">
|
2020-11-01 06:24:58 +08:00
|
|
|
<a href="{{ .RelPermalink }}">
|
2020-08-29 17:34:26 +08:00
|
|
|
{{- .Title -}}
|
|
|
|
</a>
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
{{ with .Params.description }}
|
|
|
|
<h3 class="article-subtitle">
|
|
|
|
{{ . }}
|
|
|
|
</h3>
|
|
|
|
{{ end }}
|
|
|
|
|
2020-09-07 02:10:25 +08:00
|
|
|
{{- if not .Date.IsZero -}}
|
2020-08-29 17:34:26 +08:00
|
|
|
<footer class="article-time">
|
2020-10-10 06:27:56 +08:00
|
|
|
{{ partial "helper/icon" "clock" }}
|
2020-09-07 02:10:25 +08:00
|
|
|
<time class="article-time--published">
|
2020-09-09 23:35:22 +08:00
|
|
|
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
2020-08-29 17:34:26 +08:00
|
|
|
</time>
|
|
|
|
</footer>
|
2020-09-07 02:10:25 +08:00
|
|
|
{{- end -}}
|
2020-08-29 17:34:26 +08:00
|
|
|
</div>
|