]> danix's work - danix.xyz-2.git/commitdiff
build: regenerate CSS and fix tag cloud color rendering
authorDanilo M. <redacted>
Tue, 21 Apr 2026 21:12:53 +0000 (23:12 +0200)
committerDanilo M. <redacted>
Tue, 21 Apr 2026 21:12:53 +0000 (23:12 +0200)
- Rebuilt CSS with main.min.css using Tailwind
- Fixed tag-cloud.html template: replaced cond function with if/else to properly render CSS color variables
- All tag cloud instances now render with correct inline styles: var(--accent) and var(--text-dim)
- HTML output verified across homepage, article sidebars, and 404 page
- Language-aware tag URLs confirmed: /tags/* for English, /it/tags/* for Italian

themes/danix-xyz-hacker/assets/css/main.min.css
themes/danix-xyz-hacker/layouts/partials/tag-cloud.html

index 236b11c7a57913192915d4773fcafe814a3a241c..3e3061b25ec188a8da9b2a6fdbc5534a9b6e0556 100644 (file)
@@ -1455,7 +1455,8 @@ button,
 .tag-cloud {
   display: flex;
   flex-wrap: wrap;
-  gap: 0.5rem;
+  justify-content: center;
+  gap: 0.75rem;
   align-items: baseline;
 }
 
@@ -1467,10 +1468,9 @@ button,
   border: 1px solid var(--border);
   border-radius: 0.25rem;
   font-family: var(--font-mono, 'JetBrains Mono', monospace);
-  font-size: 0.75rem;
   color: var(--text-dim);
   text-decoration: none;
-  transition: border-color 150ms ease-out, color 150ms ease-out, background-color 150ms ease-out;
+  transition: border-color 150ms ease-out, color 150ms ease-out, background-color 150ms ease-out, opacity 150ms ease-out;
   white-space: nowrap;
   line-height: 1.4;
 }
index 0db75f09b78815f740fd04dfd431045635c1d526..5198ca788b11d021ce1ca974c553101b8a8cd861 100644 (file)
         {{- $ratio := (div (float $count) (float $maxCount)) -}}
         {{- $size := (add 0.6 (mul $ratio 1.2)) -}}
         {{- $opacity := (add 0.7 (mul $ratio 0.3)) -}}
-        {{- $color := cond (ge $ratio 0.5) "var(--accent)" "var(--text-dim)" -}}
         <a
           href="{{ .Page.RelPermalink }}"
           class="tag-cloud-link"
-          style="font-size: {{ $size }}rem; color: {{ $color }}; opacity: {{ $opacity }};"
+          {{- if ge $ratio 0.5 }}
+          style="font-size: {{ $size }}rem; color: var(--accent); opacity: {{ $opacity }};"
+          {{- else }}
+          style="font-size: {{ $size }}rem; color: var(--text-dim); opacity: {{ $opacity }};"
+          {{- end }}
           aria-label="{{ .Name }}{{- if $showCount }} ({{ i18n "postCount" $count }}){{- end -}}"
         >
           {{- .Name -}}