From: Danilo M. Date: Tue, 21 Apr 2026 21:10:48 +0000 (+0200) Subject: feat: replace tier-based sizing with continuous scaling in tag cloud X-Git-Tag: release_22042026-1342~31 X-Git-Url: https://git.danix.xyz/?a=commitdiff_plain;h=8bcdbe5ab1d02213786b8527d97b60ff7464fb7d;p=danix.xyz-2.git feat: replace tier-based sizing with continuous scaling in tag cloud - Compute size per tag: 0.6rem + (count/maxCount) * 1.2rem - Compute opacity per tag: 0.7 + (count/maxCount) * 0.3 - Color gradient: small tags var(--text-dim), large (>50%) tags var(--accent) - Remove .tag-tier-* classes, use inline style attributes - Update sidebar label to use topTags i18n key --- diff --git a/themes/danix-xyz-hacker/layouts/partials/tag-cloud.html b/themes/danix-xyz-hacker/layouts/partials/tag-cloud.html index 0d59e3c..0db75f0 100644 --- a/themes/danix-xyz-hacker/layouts/partials/tag-cloud.html +++ b/themes/danix-xyz-hacker/layouts/partials/tag-cloud.html @@ -22,16 +22,12 @@ {{/* Early exit if no tags */}} {{- if $tags -}} -{{/* Compute max count for tier thresholds */}} +{{/* Compute max count for continuous scaling */}} {{- $maxCount := 0 -}} {{- range $tags -}} {{- if gt .Count $maxCount -}}{{- $maxCount = .Count -}}{{- end -}} {{- end -}} -{{/* Tier thresholds (integer division) */}} -{{- $tierMedThreshold := div $maxCount 3 -}} -{{- $tierHighThreshold := mul (div $maxCount 3) 2 -}} - {{/* Ordered tag list (descending by count) */}} {{- $orderedTags := $tags.ByCount -}} {{- if gt $maxTags 0 -}} @@ -41,7 +37,7 @@ {{/* Render based on placement mode */}} {{- if $wrapInWidget -}}