diff options
| -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 -}} |
