diff options
| author | Danilo M. <danix@danix.xyz> | 2026-04-16 12:49:38 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-04-16 12:49:38 +0200 |
| commit | 631505e0c403c9e2e4e5687ee121f0d1bd371b8c (patch) | |
| tree | 23ffd5c75c429ff6b42327d90e1526f646a1c49d | |
| parent | 8c32ae9e73d34c66284466641610b25d319347db (diff) | |
| download | danixxyz-631505e0c403c9e2e4e5687ee121f0d1bd371b8c.tar.gz danixxyz-631505e0c403c9e2e4e5687ee121f0d1bd371b8c.zip | |
feat: add article count badge to taxonomy list items
Each term card on the tags/categories list page now shows a count
badge (top-right) with the number of articles in that term.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
| -rw-r--r-- | themes/danix-xyz-hacker/layouts/taxonomy/list.html | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/themes/danix-xyz-hacker/layouts/taxonomy/list.html b/themes/danix-xyz-hacker/layouts/taxonomy/list.html index b923aba..b3ab612 100644 --- a/themes/danix-xyz-hacker/layouts/taxonomy/list.html +++ b/themes/danix-xyz-hacker/layouts/taxonomy/list.html @@ -20,12 +20,22 @@ <!-- Pinned posts first --> {{ range (sort $pinned "Date" "desc") }} - {{ partial "article-list-item.html" . }} + <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"> + {{ .Pages.Len }} + </span> + </div> {{ end }} <!-- Regular posts --> {{ range (sort $unpinned "Date" "desc") }} - {{ partial "article-list-item.html" . }} + <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"> + {{ .Pages.Len }} + </span> + </div> {{ end }} <!-- Empty state --> |
