]> danix's work - danix.xyz-2.git/commitdiff
feat: add article count badge to taxonomy list items
authorDanilo M. <redacted>
Thu, 16 Apr 2026 10:49:38 +0000 (12:49 +0200)
committerDanilo M. <redacted>
Thu, 16 Apr 2026 10:49:38 +0000 (12:49 +0200)
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 <redacted>
themes/danix-xyz-hacker/layouts/taxonomy/list.html

index b923aba9924d97d454bf864db60aba8d489836af..b3ab6124e1cd6ca56ef7c63e3db70f44647757b5 100644 (file)
 
     <!-- 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 -->