diff --git a/layouts/partials/theme-toggle.html b/layouts/partials/theme-toggle.html index ddb6419..a6e9932 100644 --- a/layouts/partials/theme-toggle.html +++ b/layouts/partials/theme-toggle.html @@ -1,6 +1,10 @@ {{- $navbar := .navbar | default false -}} -{{- $height := 12 -}} -{{- if $navbar -}}{{- $height = 24 -}}{{- end -}} +{{- $height_px := 12 -}} +{{- $height_tw := "hx-text-xs" -}} +{{- if $navbar -}} + {{- $height_px = 24 -}} + {{- $height_tw = "hx-text-sm" -}} +{{- end -}} {{- $hideLabel := .hideLabel | default false -}} {{- $changeTheme := (T "changeTheme") | default "Change theme" -}} @@ -11,14 +15,14 @@ - {{- partial "utils/icon.html" (dict "name" "sun" "attributes" (printf "height=%d class=\"group-data-[theme=light]:hx-hidden\"" $height)) -}} + {{- partial "utils/icon.html" (dict "name" "sun" "attributes" (printf "height=%d class=\"group-data-[theme=light]:hx-hidden\"" $height_px)) -}} {{- if not $hideLabel }}{{ $light }}{{ end -}} - {{- partial "utils/icon.html" (dict "name" "moon" "attributes" (printf "height=%d class=\"group-data-[theme=dark]:hx-hidden\"" $height)) -}} + {{- partial "utils/icon.html" (dict "name" "moon" "attributes" (printf "height=%d class=\"group-data-[theme=dark]:hx-hidden\"" $height_px)) -}} {{- if not $hideLabel }}{{ $dark }}{{ end -}}