From 323f1122b740de7575563ef4ae2de94c2f936bb3 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Fri, 24 Oct 2025 23:39:42 +0100 Subject: [PATCH] feat: improve card view footer Moves read more link to new link to prevent squash when long (author etc) metadata in footer. --- .../layouts/_partials/views/card.html | 47 +++++++++++++------ 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/modules/blox-tailwind/layouts/_partials/views/card.html b/modules/blox-tailwind/layouts/_partials/views/card.html index 8592f413..5ed8583a 100644 --- a/modules/blox-tailwind/layouts/_partials/views/card.html +++ b/modules/blox-tailwind/layouts/_partials/views/card.html @@ -140,19 +140,33 @@ {{ end }} -
-
+ {{ if $hasMeta }} +
+
{{ if $item.Params.authors }}
- {{ with index ($item.GetTerms "authors") 0 }} -
- {{ $avatar := (.Resources.ByType "image").GetMatch "*avatar*" }} - {{ if $avatar }} - {{ $avatar_48 := $avatar.Process "Fill 48x48 Center webp" }} - avatar - {{ end }} -
- {{ .Page.LinkTitle }} + {{ $authorTerm := index ($item.GetTerms "authors") 0 }} + {{ if $authorTerm }} + {{/* Author page exists - show avatar or default icon */}} +
+ {{ $avatar := ($authorTerm.Resources.ByType "image").GetMatch "*avatar*" }} + {{ if $avatar }} + {{ $avatar_48 := $avatar.Process "Fill 48x48 Center webp" }} + avatar + {{ else }} + {{/* Default avatar icon when no image */}} +
+ {{ partial "functions/get_icon" (dict "name" "hero/user" "attributes" "class=\"w-4 h-4 text-gray-500 dark:text-gray-400\"") }} +
+ {{ end }} +
+ {{ $authorTerm.Page.LinkTitle }} + {{ else }} + {{/* No author page - just show team icon and first author name */}} +
+ {{ partial "functions/get_icon" (dict "name" "hero/user-group" "attributes" "class=\"w-4 h-4 text-primary-600 dark:text-primary-400\"") }} +
+ {{ index $item.Params.authors 0 }} {{ end }}
• @@ -174,16 +188,19 @@ {{ end }}
- + {{ if $showReadMore }} - - {{ i18n "read_more" }} - {{ end }}
+ {{ end }} {{ if $item.Params.ai_insights }}