diff options
Diffstat (limited to 'themes/danix-xyz-hacker/layouts/partials')
| -rw-r--r-- | themes/danix-xyz-hacker/layouts/partials/tag-cloud.html | 7 |
1 files changed, 5 insertions, 2 deletions
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 -}} |
