summaryrefslogtreecommitdiffstats
path: root/layouts/partials/project-row.html
diff options
context:
space:
mode:
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 }}