From 1520f2065a67a14eaef56233b337fe4c02622b03 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 26 Jun 2026 17:13:04 +0200 Subject: feat: slackware project single layout with project-header partial --- layouts/partials/project-header.html | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 layouts/partials/project-header.html (limited to 'layouts/partials') diff --git a/layouts/partials/project-header.html b/layouts/partials/project-header.html new file mode 100644 index 0000000..c727458 --- /dev/null +++ b/layouts/partials/project-header.html @@ -0,0 +1,46 @@ +{{ $status := .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 }} +{{ if eq $status "wip" }}{{ $bgVar = "--type-life" }}{{ $txtVar = "--type-life-text" }}{{ end }} +{{ if eq $status "archived" }}{{ $bgVar = "--text-dim" }}{{ $txtVar = "--bg" }}{{ end }} + +{{ $imageURL := "" }} +{{ if .Params.image }} + {{ $res := .Resources.GetMatch .Params.image }} + {{ if $res }}{{ $imageURL = $res.RelPermalink }}{{ else }}{{ $imageURL = .Params.image }}{{ end }} +{{ end }} + +
+ {{ if $imageURL }} + {{ .Title }} + {{ end }} + +
+

{{ .Title }}

+ + {{ i18n (printf "status-%s" $status) }} + +
+ + {{ with .Params.tagline }} +

{{ . }}

+ {{ end }} + +
+ {{ with .Params.repo_url }} + + {{ i18n "viewRepo" }} + + {{ i18n "opensInNewTab" }} + + {{ end }} + {{ with .Params.tags }} +
    + {{ range . }} +
  • {{ . }}
  • + {{ end }} +
+ {{ end }} +
+
-- cgit v1.2.3