From: Danilo M. Date: Wed, 15 Apr 2026 20:14:02 +0000 (+0200) Subject: Add thumbnail support to article listings X-Git-Tag: release_22042026-1342~238 X-Git-Url: https://git.danix.xyz/?a=commitdiff_plain;h=bdce585ecc814b148827d9fb2a5fa4b2afe546e7;p=danix.xyz-2.git Add thumbnail support to article listings - Add 'image' front matter parameter for article thumbnails - Redesign article-list-item.html as semantic article card: - Large thumbnail (aspect-video, object-cover) at top if image is present - Title linked to article page - Publication date and type badge - Excerpt (from .Description or .Summary with plainify) - "Read more" CTA button with arrow icon and hover animation - Increase list container width (max-w-2xl → max-w-3xl) and spacing (space-y-2 → space-y-6) - Thumbnail image has subtle scale-up hover effect - Arrow icon animates on hover - All three clickable elements (.image, title, CTA) link to article Co-Authored-By: Claude Haiku 4.5 --- diff --git a/themes/danix-xyz-hacker/layouts/_default/list.html b/themes/danix-xyz-hacker/layouts/_default/list.html index 8d2c1ef..357b856 100644 --- a/themes/danix-xyz-hacker/layouts/_default/list.html +++ b/themes/danix-xyz-hacker/layouts/_default/list.html @@ -6,7 +6,7 @@ -
+
{{ $pinned := where .Pages "Params.pinned" true }} {{ $unpinned := where .Pages "Params.pinned" false }} diff --git a/themes/danix-xyz-hacker/layouts/partials/article-list-item.html b/themes/danix-xyz-hacker/layouts/partials/article-list-item.html index 1065f0b..47f3109 100644 --- a/themes/danix-xyz-hacker/layouts/partials/article-list-item.html +++ b/themes/danix-xyz-hacker/layouts/partials/article-list-item.html @@ -1,37 +1,68 @@ {{ $articleType := .Params.type | default "life" }} {{ $typeConfig := .Site.Params.articleTypes }} {{ $typeData := index $typeConfig $articleType }} +{{ $excerpt := .Description | default .Summary }} - - - {{ if .Params.pinned }} -
- 📌 PINNED -
+
+ + {{ if .Params.image }} + + {{ .Title }} + {{ end }} - -

- {{ .Title }} -

+ +
+ + {{ if .Params.pinned }} +
+ 📌 PINNED +
+ {{ end }} + + +

+ + {{ .Title }} + +

- -
- - + +
+ + - - {{ if $typeData }} - - {{ i18n $articleType }} - + + {{ if $typeData }} + + {{ i18n $articleType }} + + {{ end }} +
+ + + {{ if $excerpt }} +

+ {{ $excerpt | plainify }} +

{{ end }} + + + + {{ i18n "readMore" }} + +
- +