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-card.html | 92 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 layouts/partials/article-card.html (limited to 'layouts/partials/article-card.html') diff --git a/layouts/partials/article-card.html b/layouts/partials/article-card.html new file mode 100644 index 0000000..d803464 --- /dev/null +++ b/layouts/partials/article-card.html @@ -0,0 +1,92 @@ +{{ $articleType := .Params.type | default "life" }} +{{ $typeConfig := .Site.Params.articleTypes }} +{{ $typeData := index $typeConfig $articleType }} +{{ $excerpt := .Description | default .Summary }} + +{{ $imageURL := "" }} +{{ $useDefaultThumbnail := false }} +{{ if .Params.image }} + {{ $resource := .Resources.GetMatch .Params.image }} + {{ if $resource }} + {{ $imageURL = $resource.RelPermalink }} + {{ else }} + {{ $imageURL = .Params.image }} + {{ end }} +{{ else }} + {{ $useDefaultThumbnail = true }} +{{ end }} + +
+ + {{ if or $imageURL $useDefaultThumbnail }} + + {{ if $useDefaultThumbnail }} + + + {{ .Title }} + + {{ else }} + {{ .Title }} + {{ end }} + + {{ if $typeData }} +
+ {{ i18n $articleType }} +
+ {{ end }} +
+ {{ end }} + + +
+ + {{ if .Params.pinned }} +
+ 📌 PINNED +
+ {{ end }} + + +

+ + {{ .Title }} + +

+ + +
+ +
+ + + {{ if $excerpt }} +

+ {{ $excerpt | plainify }} +

+ {{ end }} + + + + {{ i18n "readMore" }} + + +
+
-- cgit v1.2.3