summaryrefslogtreecommitdiffstats
path: root/layouts/partials/project-row.html
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-06-26 17:55:30 +0200
committerDanilo M. <danix@danix.xyz>2026-06-26 17:55:30 +0200
commitf5e6e6ecb2fa0dee24b701e53daebaac677687f3 (patch)
tree0d6f4b6009acfaa8fc5e4de51572ca930b6be35f /layouts/partials/project-row.html
parent43edbdb66bc6c8e80deb1b67b688acba21286534 (diff)
downloaddanixxyz-theme-f5e6e6ecb2fa0dee24b701e53daebaac677687f3.tar.gz
danixxyz-theme-f5e6e6ecb2fa0dee24b701e53daebaac677687f3.zip
feat: infer thumbnail.* (2:3 row) and header.* (wide banner) page resources
Row uses a thumbnail.* page resource; project page shows a full-width header.* banner above the title instead of a small inline logo. Both inferred by filename from the project bundle, no front-matter needed (image param kept as thumbnail fallback).
Diffstat (limited to 'layouts/partials/project-row.html')
-rw-r--r--layouts/partials/project-row.html7
1 files changed, 6 insertions, 1 deletions
diff --git a/layouts/partials/project-row.html b/layouts/partials/project-row.html
index 89662ee..5a65f35 100644
--- a/layouts/partials/project-row.html
+++ b/layouts/partials/project-row.html
@@ -10,8 +10,13 @@
{{ if eq $status "archived" }}{{ $bgVar = "--text-dim" }}{{ $txtVar = "--bg" }}{{ end }}
{{ $badgeStyle := printf "background-color: var(%s); color: var(%s);" $bgVar $txtVar | safeCSS }}
+{{/* Row thumbnail (2:3): page resource named thumbnail.* in the project
+ bundle; fall back to an `image` param, else a mono-glyph block. */}}
{{ $imageURL := "" }}
-{{ if $p.Params.image }}
+{{ $thumb := $p.Resources.GetMatch "thumbnail.*" }}
+{{ if $thumb }}
+ {{ $imageURL = $thumb.RelPermalink }}
+{{ else if $p.Params.image }}
{{ $res := $p.Resources.GetMatch $p.Params.image }}
{{ if $res }}{{ $imageURL = $res.RelPermalink }}{{ else }}{{ $imageURL = $p.Params.image }}{{ end }}
{{ end }}