diff options
Diffstat (limited to 'themes/danix-xyz-hacker/layouts/taxonomy/term.html')
| -rw-r--r-- | themes/danix-xyz-hacker/layouts/taxonomy/term.html | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/themes/danix-xyz-hacker/layouts/taxonomy/term.html b/themes/danix-xyz-hacker/layouts/taxonomy/term.html index 5353715..5858f64 100644 --- a/themes/danix-xyz-hacker/layouts/taxonomy/term.html +++ b/themes/danix-xyz-hacker/layouts/taxonomy/term.html @@ -13,10 +13,18 @@ </p> <!-- Articles list --> - <div class="space-y-2 max-w-2xl"> + <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-list-item.html" . }} |
