summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-04-21 12:06:34 +0200
committerDanilo M. <danix@danix.xyz>2026-04-21 12:06:34 +0200
commit60628e3f8e0fca9f19123fcc2148111cc4d8edc1 (patch)
treee7a35f27062e85eb59b457e39ca7bcd3feef1e11
parentd341dd8bd778d46bc312acb93ce365fe7122f554 (diff)
downloaddanixxyz-60628e3f8e0fca9f19123fcc2148111cc4d8edc1.tar.gz
danixxyz-60628e3f8e0fca9f19123fcc2148111cc4d8edc1.zip
revert: restore taxonomy templates to card-stack layout with post-count badge
Reverts commits 79f839d (timeline applied to all list contexts). Timeline remains on /articles/ (_default/list.html). Tags and categories revert to card-stack layout with post-count badge overlay. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
-rw-r--r--themes/danix-xyz-hacker/layouts/taxonomy/list.html61
-rw-r--r--themes/danix-xyz-hacker/layouts/taxonomy/term.html51
2 files changed, 61 insertions, 51 deletions
diff --git a/themes/danix-xyz-hacker/layouts/taxonomy/list.html b/themes/danix-xyz-hacker/layouts/taxonomy/list.html
index 7fd06ab..cd4945a 100644
--- a/themes/danix-xyz-hacker/layouts/taxonomy/list.html
+++ b/themes/danix-xyz-hacker/layouts/taxonomy/list.html
@@ -1,40 +1,49 @@
{{ define "main" }}
-<div class="mx-auto px-4 py-12 max-w-5xl">
+<div class="mx-auto px-4 py-12 max-w-4xl">
<!-- Page title with taxonomy name -->
<h1 class="text-4xl md:text-5xl font-bold text-accent mb-12">
{{ i18n .Data.Plural }}
</h1>
- {{ $pinned := where .Pages "Params.pinned" true }}
- {{ $unpinned := where .Pages "Params.pinned" false }}
+ <!-- Articles list -->
+ <div class="space-y-6 max-w-3xl">
+ {{ $pinned := where .Pages "Params.pinned" true }}
+ {{ $unpinned := where .Pages "Params.pinned" false }}
- <!-- If no unpinned posts found (because param is undefined), get all non-pinned pages -->
- {{ if eq (len $unpinned) 0 }}
- {{ $unpinned = where .Pages "Params.pinned" nil }}
+ <!-- If no unpinned posts found (because param is undefined), get all non-pinned pages -->
{{ if eq (len $unpinned) 0 }}
- {{ $unpinned = where .Pages "Params.pinned" "" }}
+ {{ $unpinned = where .Pages "Params.pinned" nil }}
+ {{ if eq (len $unpinned) 0 }}
+ {{ $unpinned = where .Pages "Params.pinned" "" }}
+ {{ end }}
{{ end }}
- {{ end }}
- {{ if eq (len .Pages) 0 }}
- <div class="py-12 text-center text-text-dim">
- {{ i18n "noRelated" }}
- </div>
- {{ else }}
- <ol class="timeline" aria-label="{{ i18n .Data.Plural }}">
- {{ range $i, $page := (sort $pinned "Date" "desc") }}
- {{ $side := "left" }}
- {{ if eq (mod $i 2) 0 }}{{ $side = "left" }}{{ else }}{{ $side = "right" }}{{ end }}
- {{ partial "article-list-item.html" (dict "Page" $page "side" $side) }}
+ <!-- Pinned posts first -->
+ {{ range (sort $pinned "Date" "desc") }}
+ <div class="relative">
+ {{ partial "article-list-item.html" . }}
+ <span class="absolute top-4 right-4 px-2 py-0.5 rounded text-xs font-mono bg-surface text-text-dim border border-border/30">
+ {{ i18n "postCount" .Pages.Len }}
+ </span>
+ </div>
{{ end }}
- {{ $offset := len $pinned }}
- {{ range $i, $page := (sort $unpinned "Date" "desc") }}
- {{ $idx := add $i $offset }}
- {{ $side := "left" }}
- {{ if eq (mod $idx 2) 0 }}{{ $side = "left" }}{{ else }}{{ $side = "right" }}{{ end }}
- {{ partial "article-list-item.html" (dict "Page" $page "side" $side) }}
+
+ <!-- Regular posts -->
+ {{ range (sort $unpinned "Date" "desc") }}
+ <div class="relative">
+ {{ partial "article-list-item.html" . }}
+ <span class="absolute top-4 right-4 px-2 py-0.5 rounded text-xs font-mono bg-surface text-text-dim border border-border/30">
+ {{ i18n "postCount" .Pages.Len }}
+ </span>
+ </div>
{{ end }}
- </ol>
- {{ end }}
+
+ <!-- Empty state -->
+ {{ if eq (len .Pages) 0 }}
+ <div class="py-12 text-center text-text-dim">
+ {{ i18n "noRelated" }}
+ </div>
+ {{ end }}
+ </div>
</div>
{{ end }}
diff --git a/themes/danix-xyz-hacker/layouts/taxonomy/term.html b/themes/danix-xyz-hacker/layouts/taxonomy/term.html
index a96e107..5858f64 100644
--- a/themes/danix-xyz-hacker/layouts/taxonomy/term.html
+++ b/themes/danix-xyz-hacker/layouts/taxonomy/term.html
@@ -1,5 +1,5 @@
{{ define "main" }}
-<div class="mx-auto px-4 py-12 max-w-5xl">
+<div class="mx-auto px-4 py-12 max-w-4xl">
<!-- Page title with taxonomy type -->
<h1 class="text-4xl md:text-5xl font-bold text-accent mb-2">
{{ i18n .Data.Singular }}
@@ -12,34 +12,35 @@
</span>
</p>
- {{ $pinned := where .Pages "Params.pinned" true }}
- {{ $unpinned := where .Pages "Params.pinned" false }}
- {{ if eq (len $unpinned) 0 }}
- {{ $unpinned = where .Pages "Params.pinned" nil }}
+ <!-- Articles list -->
+ <div class="space-y-6 max-w-3xl">
+ {{ $pinned := where .Pages "Params.pinned" true }}
+ {{ $unpinned := where .Pages "Params.pinned" false }}
+
+ <!-- If no unpinned posts found (because param is undefined), get all non-pinned pages -->
{{ if eq (len $unpinned) 0 }}
- {{ $unpinned = where .Pages "Params.pinned" "" }}
+ {{ $unpinned = where .Pages "Params.pinned" nil }}
+ {{ if eq (len $unpinned) 0 }}
+ {{ $unpinned = where .Pages "Params.pinned" "" }}
+ {{ end }}
{{ end }}
- {{ end }}
- {{ if eq (len .Pages) 0 }}
- <div class="py-12 text-center text-text-dim">
- {{ i18n "noRelated" }}
- </div>
- {{ else }}
- <ol class="timeline" aria-label="{{ .Title }}">
- {{ range $i, $page := (sort $pinned "Date" "desc") }}
- {{ $side := "left" }}
- {{ if eq (mod $i 2) 0 }}{{ $side = "left" }}{{ else }}{{ $side = "right" }}{{ end }}
- {{ partial "article-list-item.html" (dict "Page" $page "side" $side) }}
+ <!-- Pinned posts first -->
+ {{ range (sort $pinned "Date" "desc") }}
+ {{ partial "article-list-item.html" . }}
+ {{ end }}
+
+ <!-- Regular posts -->
+ {{ range (sort $unpinned "Date" "desc") }}
+ {{ partial "article-list-item.html" . }}
{{ end }}
- {{ $offset := len $pinned }}
- {{ range $i, $page := (sort $unpinned "Date" "desc") }}
- {{ $idx := add $i $offset }}
- {{ $side := "left" }}
- {{ if eq (mod $idx 2) 0 }}{{ $side = "left" }}{{ else }}{{ $side = "right" }}{{ end }}
- {{ partial "article-list-item.html" (dict "Page" $page "side" $side) }}
+
+ <!-- Empty state -->
+ {{ if eq (len .Pages) 0 }}
+ <div class="py-12 text-center text-text-dim">
+ {{ i18n "noRelated" }}
+ </div>
{{ end }}
- </ol>
- {{ end }}
+ </div>
</div>
{{ end }}