From 4e26aabccc2432b4670e874017f55261506d59bb Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 26 Jun 2026 17:16:10 +0200 Subject: feat: slackware hub list layout with project rows --- layouts/partials/project-row.html | 65 +++++++++++++++++++++++++++++++++++++++ layouts/slackware/list.html | 28 +++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 layouts/partials/project-row.html create mode 100644 layouts/slackware/list.html (limited to 'layouts') diff --git a/layouts/partials/project-row.html b/layouts/partials/project-row.html new file mode 100644 index 0000000..82a3481 --- /dev/null +++ b/layouts/partials/project-row.html @@ -0,0 +1,65 @@ +{{ $p := .page }} +{{ $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 }} +{{ if eq $status "wip" }}{{ $bgVar = "--type-life" }}{{ $txtVar = "--type-life-text" }}{{ end }} +{{ if eq $status "archived" }}{{ $bgVar = "--text-dim" }}{{ $txtVar = "--bg" }}{{ end }} + +{{ $imageURL := "" }} +{{ if $p.Params.image }} + {{ $res := $p.Resources.GetMatch $p.Params.image }} + {{ if $res }}{{ $imageURL = $res.RelPermalink }}{{ else }}{{ $imageURL = $p.Params.image }}{{ end }} +{{ end }} +{{ $glyph := substr (upper $p.Title) 0 2 }} + +
+ + + + +
+
+

+ {{ $p.Title }} +

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

{{ . }}

+ {{ end }} + + {{ with $p.Params.tags }} +
    + {{ range . }} +
  • {{ . }}
  • + {{ end }} +
+ {{ end }} + + +
+
diff --git a/layouts/slackware/list.html b/layouts/slackware/list.html new file mode 100644 index 0000000..e385f89 --- /dev/null +++ b/layouts/slackware/list.html @@ -0,0 +1,28 @@ +{{ define "main" }} +
+
+ {{ partial "breadcrumb.html" . }} + +
+

+ {{ i18n "slackwareTitle" }} +

+

+ {{ i18n "slackwareSubtitle" }} +

+
+ + {{ with .Content }} +
+ {{ . }} +
+ {{ end }} + +
+ {{ range $index, $p := .Pages }} + {{ partial "project-row.html" (dict "page" $p "index" $index) }} + {{ end }} +
+
+
+{{ end }} -- cgit v1.2.3