2020-09-11 10:27:23 -04:00
|
|
|
{{ $image := partial "helper/image" (dict "Context" .) }}
|
2020-08-29 05:34:26 -04:00
|
|
|
{{ $context := . }}
|
|
|
|
<div class="article-details">
|
|
|
|
{{ with $categories := .Params.categories }}
|
|
|
|
<header class="article-category">
|
|
|
|
{{ range $categories }}
|
2020-09-11 10:01:01 -04:00
|
|
|
{{ if and $image.exists $image.resource }}
|
|
|
|
{{- $imageRaw := $image.resource | resources.Fingerprint "md5" -}}
|
2020-09-10 12:53:36 -04:00
|
|
|
{{- $20x := $imageRaw.Fill "20x20 smart" -}}
|
2020-08-29 05:34:26 -04:00
|
|
|
<a href="/categories/{{ . | urlize }}" class="color-tag"
|
2020-09-10 12:53:36 -04:00
|
|
|
data-image="{{ $20x.RelPermalink }}" data-key="{{ $context.Slug }}" data-hash="{{ $imageRaw.Data.Integrity }}">{{ . | humanize }}</a>
|
2020-08-29 05:34:26 -04:00
|
|
|
{{ else }}
|
|
|
|
<a href="/categories/{{ . | urlize }}">{{ . | humanize }}</a>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</header>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
<h2 class="article-title">
|
|
|
|
<a href="{{ .Permalink }}">
|
|
|
|
{{- .Title -}}
|
|
|
|
</a>
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
{{ with .Params.description }}
|
|
|
|
<h3 class="article-subtitle">
|
|
|
|
{{ . }}
|
|
|
|
</h3>
|
|
|
|
{{ end }}
|
|
|
|
|
2020-09-06 14:10:25 -04:00
|
|
|
{{- if not .Date.IsZero -}}
|
2020-08-29 05:34:26 -04:00
|
|
|
<footer class="article-time">
|
|
|
|
{{ (resources.Get "icons/clock.svg").Content | safeHTML }}
|
2020-09-06 14:10:25 -04:00
|
|
|
<time class="article-time--published">
|
2020-09-09 11:35:22 -04:00
|
|
|
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
2020-08-29 05:34:26 -04:00
|
|
|
</time>
|
|
|
|
</footer>
|
2020-09-06 14:10:25 -04:00
|
|
|
{{- end -}}
|
2020-08-29 05:34:26 -04:00
|
|
|
</div>
|