From 631547a75142326a7c71bdf123e1475217a5ad73 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 22 Apr 2026 12:42:56 +0200 Subject: chore: replace with extracted danix.xyz-hacker theme (danix2-hugo-theme) --- layouts/partials/article-header.html | 71 ++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 layouts/partials/article-header.html (limited to 'layouts/partials/article-header.html') diff --git a/layouts/partials/article-header.html b/layouts/partials/article-header.html new file mode 100644 index 0000000..94c78a5 --- /dev/null +++ b/layouts/partials/article-header.html @@ -0,0 +1,71 @@ +{{ $articleType := .Params.type | default "life" }} +{{ $typeConfig := .Site.Params.articleTypes }} +{{ $typeData := index $typeConfig $articleType }} +{{ $hasType := .Params.type }} + +
+ +
+ + {{ if and $typeData $hasType }} +
+ {{ end }} + + + {{ if and $typeData $hasType }} +
+ {{ end }} + +

+ {{ .Title }} +

+
+ + +
+ + {{ if .PublishDate }} +
+ + +
+ {{ end }} + + + {{ if .Lastmod }} + {{ $lastmodDate := .Lastmod.Format "2006-01-02" }} + {{ $pubDate := .PublishDate.Format "2006-01-02" }} + {{ if ne $lastmodDate $pubDate }} +
+ + +
+ {{ end }} + {{ end }} + + + {{ if .Site.Params.readingTime }} +
+ + {{ .ReadingTime }} {{ i18n "min" }} {{ i18n "readingTime" }} +
+ {{ end }} + + + {{ if and $typeData $hasType }} + + {{ i18n $articleType }} + + {{ end }} +
+
-- cgit v1.2.3