highlight current language in language selector

This commit is contained in:
deneb 2025-02-19 02:14:59 +01:00
parent 06f672dd21
commit bbc2149d8b
3 changed files with 15 additions and 3 deletions
assets/css
layouts/partials
themes

View file

@ -1,3 +1,5 @@
{{- $highlightColor := .Site.Params.style.vars.highlightColor | default (.Site.Params.highlightColor | default "#e22d30") -}}
:root {
--nixie-orange: orange;
--nixie-orange-glow: #ffa500;
@ -37,6 +39,10 @@
color: white;
}
.languages-compact a.current-lang {
color: {{ $highlightColor }};
}
#main-banner {
position: relative;
}

View file

@ -3,9 +3,15 @@
<div class="languages-compact">
{{- range $index, $lang := $translations }}
{{- if ne $index 0}}<span> | </span>{{end}}
<a class="" href="{{ .RelPermalink }}">
<a class="
{{- if eq $lang.Language $.Site.Language -}}
current-lang
{{- end -}}
"
href="{{ .RelPermalink }}"
>
{{ $lang.Language | upper }}
</a>
{{- end }}
</div>
{{- end }}
{{- end }}

@ -1 +1 @@
Subproject commit 3a1878d608d1261e9fef271eb5cc8074bfcc4cd8
Subproject commit 67036fc5f2fcb31117c6219c0610f75dac643de1