summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--layouts/partials/project-header.html11
-rw-r--r--layouts/partials/project-row.html7
2 files changed, 10 insertions, 8 deletions
diff --git a/layouts/partials/project-header.html b/layouts/partials/project-header.html
index f153a26..17fe7db 100644
--- a/layouts/partials/project-header.html
+++ b/layouts/partials/project-header.html
@@ -7,15 +7,12 @@
{{ if eq $status "archived" }}{{ $bgVar = "--text-dim" }}{{ $txtVar = "--bg" }}{{ end }}
{{ $badgeStyle := printf "background-color: var(%s); color: var(%s);" $bgVar $txtVar | safeCSS }}
-{{ $imageURL := "" }}
-{{ if .Params.image }}
- {{ $res := .Resources.GetMatch .Params.image }}
- {{ if $res }}{{ $imageURL = $res.RelPermalink }}{{ else }}{{ $imageURL = .Params.image }}{{ end }}
-{{ end }}
+{{/* Full-width banner: page resource named header.* in the project bundle. */}}
+{{ $headerImg := .Resources.GetMatch "header.*" }}
<header class="mb-10">
- {{ if $imageURL }}
- <img src="{{ $imageURL }}" alt="{{ .Title }}" class="w-24 h-24 object-contain rounded-lg mb-4 bg-surface/50" loading="lazy" />
+ {{ with $headerImg }}
+ <img src="{{ .RelPermalink }}" alt="" class="w-full h-48 md:h-64 object-cover rounded-lg mb-6" loading="lazy" />
{{ end }}
<div class="flex flex-wrap items-center justify-between gap-3 mb-2">
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 }}