Files
Blog/layouts/partials/article/components/details.html
Vezpi 1fccae5cd9
Some checks failed
Blog Test / Check-Rebuild (push) Successful in 8s
Blog Test / Build (push) Successful in 11s
Blog Test / Deploy-Test (push) Successful in 21s
Blog Test / Test (push) Failing after 3s
fix: .GetTerms
2026-04-02 19:06:37 +00:00

63 lines
2.1 KiB
HTML

{{- $IsList := .IsList -}}
{{- $Page := .Page -}}
<div class="article-details">
{{ if $Page.Params.categories }}
<header class="article-category">
{{ range ($Page.GetTerms "tags") }}
<a href="{{ .RelPermalink }}" {{ with $Page.Params.style }}style="background-color: {{ .background }}; color: {{ .color }};"{{ end }}>
{{ .LinkTitle }}
</a>
{{ end }}
</header>
{{ end }}
<div class="article-title-wrapper">
<h2 class="article-title">
<a href="{{ .RelPermalink }}">
{{- $Page.Title -}}
</a>
</h2>
{{ with $Page.Params.description }}
<h3 class="article-subtitle">
{{ . }}
</h3>
{{ end }}
</div>
{{ $showReadingTime := $Page.Params.readingTime | default ($Page.Site.Params.article.readingTime) }}
{{ $showDate := not $Page.Date.IsZero }}
{{ $showTime := or $showDate $showReadingTime }}
{{ if $showTime }}
<footer class="article-meta">
<div class="inline-meta">
{{ if $showDate }}
{{ partial "helper/icon" "date" }}
<time class="article-time--published" datetime='{{ $Page.Date.Format "2006-01-02T15:04:05Z07:00" }}'>
{{- $Page.Date | time.Format $Page.Site.Params.dateFormat.published -}}
</time>
{{ end }}
{{ if $showReadingTime }}
{{ partial "helper/icon" "clock" }}
<time class="article-time--reading">
{{ T "article.readingTime" $Page.ReadingTime }}
</time>
{{ end }}
</div>
{{- $date := .Date.Format "20060102" | int -}}
{{- $lastmod := .Lastmod.Format "20060102" | int -}}
{{- if gt $lastmod $date -}}
<div class="article-lastmod">
{{ partial "helper/icon" "refresh" }}
<time>
{{ T "article.lastUpdatedOn" }} {{ .Lastmod | time.Format ( or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }}
</time>
</div>
{{- end -}}
</footer>
{{ end }}
</div>