diff options
| author | Danilo M. <danix@danix.xyz> | 2026-04-21 23:12:53 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-04-21 23:12:53 +0200 |
| commit | 3d8c3aa5a6ffc306758e3d7347f96d7bfbe9dc76 (patch) | |
| tree | 33c07d19edca385db1c76bdc0901f1b9814440d9 | |
| parent | 1780ef52eebfb02112013f99a7402b4d9d0c259b (diff) | |
| download | danixxyz-3d8c3aa5a6ffc306758e3d7347f96d7bfbe9dc76.tar.gz danixxyz-3d8c3aa5a6ffc306758e3d7347f96d7bfbe9dc76.zip | |
build: regenerate CSS and fix tag cloud color rendering
- 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
| -rw-r--r-- | themes/danix-xyz-hacker/assets/css/main.min.css | 6 | ||||
| -rw-r--r-- | themes/danix-xyz-hacker/layouts/partials/tag-cloud.html | 7 |
2 files changed, 8 insertions, 5 deletions
diff --git a/themes/danix-xyz-hacker/assets/css/main.min.css b/themes/danix-xyz-hacker/assets/css/main.min.css index 236b11c..3e3061b 100644 --- a/themes/danix-xyz-hacker/assets/css/main.min.css +++ b/themes/danix-xyz-hacker/assets/css/main.min.css @@ -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; } diff --git a/themes/danix-xyz-hacker/layouts/partials/tag-cloud.html b/themes/danix-xyz-hacker/layouts/partials/tag-cloud.html index 0db75f0..5198ca7 100644 --- a/themes/danix-xyz-hacker/layouts/partials/tag-cloud.html +++ b/themes/danix-xyz-hacker/layouts/partials/tag-cloud.html @@ -54,11 +54,14 @@ {{- $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 -}} |
