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.html10
1 files changed, 6 insertions, 4 deletions
diff --git a/layouts/partials/project-row.html b/layouts/partials/project-row.html
index 82a3481..89662ee 100644
--- a/layouts/partials/project-row.html
+++ b/layouts/partials/project-row.html
@@ -2,11 +2,13 @@
{{ $reverse := eq (mod .index 2) 1 }}
{{ $status := $p.Params.status | default "active" }}
-{{/* status -> theme-aware bg/text var pair (all defined in main.css) */}}
-{{ $bgVar := "--type-tech" }}{{ $txtVar := "--type-tech-text" }}
-{{ if eq $status "maintained" }}{{ $bgVar = "--type-quote" }}{{ $txtVar = "--type-quote-text" }}{{ end }}
+{{/* status -> theme-aware bg/text var pair (all defined in main.css).
+ active=green, maintained=blue, wip=amber, archived=muted. */}}
+{{ $bgVar := "--type-quote" }}{{ $txtVar := "--type-quote-text" }}
+{{ if eq $status "maintained" }}{{ $bgVar = "--type-link" }}{{ $txtVar = "--type-link-text" }}{{ end }}
{{ if eq $status "wip" }}{{ $bgVar = "--type-life" }}{{ $txtVar = "--type-life-text" }}{{ end }}
{{ if eq $status "archived" }}{{ $bgVar = "--text-dim" }}{{ $txtVar = "--bg" }}{{ end }}
+{{ $badgeStyle := printf "background-color: var(%s); color: var(%s);" $bgVar $txtVar | safeCSS }}
{{ $imageURL := "" }}
{{ if $p.Params.image }}
@@ -31,7 +33,7 @@
<h2 class="text-2xl font-bold font-oxanium">
<a href="{{ $p.RelPermalink }}" class="group-hover:text-accent transition-colors rounded focus:outline-none focus:ring-2 focus:ring-accent">{{ $p.Title }}</a>
</h2>
- <span class="flex-shrink-0 px-3 py-1 rounded-full text-xs font-semibold" style="background-color: var({{ $bgVar }}); color: var({{ $txtVar }});">
+ <span class="flex-shrink-0 px-3 py-1 rounded-full text-xs font-semibold" style="{{ $badgeStyle }}">
{{ i18n (printf "status-%s" $status) }}
</span>
</div>