2020-08-24 13:27:51 -04:00
|
|
|
<header class="article-header">
|
|
|
|
{{ if .Params.image }}
|
|
|
|
{{- $image := partial "helper/image" . -}}
|
|
|
|
|
|
|
|
{{- $tablet := $image.Resize "1024x" -}}
|
|
|
|
{{- $desktop := $image.Resize "2000x" -}}
|
|
|
|
|
|
|
|
<div class="article-image">
|
|
|
|
<img srcset="{{ $tablet.RelPermalink }} 1024w, {{ $desktop.RelPermalink }} 2000w"
|
|
|
|
src="{{ $desktop.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}"
|
|
|
|
loading="lazy"
|
|
|
|
alt="Featured image of post {{ .Title }}" />
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
|
2020-08-28 06:11:02 -04:00
|
|
|
{{ $i := .Params.image }}
|
|
|
|
{{ $context := . }}
|
2020-08-24 13:27:51 -04:00
|
|
|
<div class="article-details">
|
2020-08-28 06:11:02 -04:00
|
|
|
{{ with $categories := .Params.categories }}
|
2020-08-24 13:27:51 -04:00
|
|
|
<header class="article-category">
|
2020-08-28 06:11:02 -04:00
|
|
|
{{ range $categories }}
|
|
|
|
{{ if $i }}
|
|
|
|
{{- $image := partial "helper/image" $context | resources.Fingerprint "md5" -}}
|
|
|
|
{{- $20x := $image.Fill "20x20 smart" -}}
|
2020-08-24 13:27:51 -04:00
|
|
|
<a href="/categories/{{ . | urlize }}" class="color-tag"
|
2020-08-28 06:11:02 -04:00
|
|
|
data-image="{{ $20x.RelPermalink }}" data-id="{{ $context.Slug }}" data-key="{{ $image.Data.Integrity }}">{{ . | humanize }}</a>
|
2020-08-24 13:27:51 -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 }}
|
|
|
|
|
|
|
|
<footer class="article-time">
|
|
|
|
{{ (resources.Get "icons/clock.svg").Content | safeHTML }}
|
|
|
|
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
|
|
|
|
{{- .Date.Format ( or .Site.Params.dateFormat "Jan 02, 2006" ) -}}
|
|
|
|
</time>
|
|
|
|
</footer>
|
|
|
|
</div>
|
|
|
|
</header>
|