summaryrefslogtreecommitdiffstats
path: root/layouts/taxonomy/list.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/taxonomy/list.html')
-rw-r--r--layouts/taxonomy/list.html49
1 files changed, 49 insertions, 0 deletions
diff --git a/layouts/taxonomy/list.html b/layouts/taxonomy/list.html
new file mode 100644
index 0000000..c3a4317
--- /dev/null
+++ b/layouts/taxonomy/list.html
@@ -0,0 +1,49 @@
+{{ define "main" }}
+<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>
+
+ <!-- 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 eq (len $unpinned) 0 }}
+ {{ $unpinned = where .Pages "Params.pinned" "" }}
+ {{ end }}
+ {{ end }}
+
+ <!-- Pinned posts first -->
+ {{ range (sort $pinned "Date" "desc") }}
+ <div class="relative">
+ {{ partial "article-card.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 }}
+
+ <!-- Regular posts -->
+ {{ range (sort $unpinned "Date" "desc") }}
+ <div class="relative">
+ {{ partial "article-card.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 }}
+
+ <!-- Empty state -->
+ {{ if eq (len .Pages) 0 }}
+ <div class="py-12 text-center text-text-dim">
+ {{ i18n "noRelated" }}
+ </div>
+ {{ end }}
+ </div>
+</div>
+{{ end }}