diff options
Diffstat (limited to 'layouts/taxonomy/term.html')
| -rw-r--r-- | layouts/taxonomy/term.html | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/layouts/taxonomy/term.html b/layouts/taxonomy/term.html new file mode 100644 index 0000000..1b953bc --- /dev/null +++ b/layouts/taxonomy/term.html @@ -0,0 +1,46 @@ +{{ define "main" }} +<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 }} + </h1> + + <!-- Current term heading --> + <p class="text-lg text-text-dim mb-12"> + <span class="inline-flex items-center px-3 py-1 rounded text-sm font-medium border border-accent/30 text-accent"> + {{ .Title }} + </span> + </p> + + <!-- 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") }} + {{ partial "article-card.html" . }} + {{ end }} + + <!-- Regular posts --> + {{ range (sort $unpinned "Date" "desc") }} + {{ partial "article-card.html" . }} + {{ end }} + + <!-- Empty state --> + {{ if eq (len .Pages) 0 }} + <div class="py-12 text-center text-text-dim"> + {{ i18n "noRelated" }} + </div> + {{ end }} + </div> +</div> +{{ end }} |
