Add new locale picker and related improvements

Closes: #583
This commit is contained in:
James Panther
2023-09-12 09:22:49 +10:00
parent 1e90d7f077
commit ad8a1b0390
31 changed files with 255 additions and 107 deletions
+4 -2
View File
@@ -3,11 +3,10 @@
{{/* Site logo/title */}}
<div class="flex flex-row items-center">
{{ partial "logo.html" . }}
{{ partial "translations.html" . }}
</div>
{{/* Main menu */}}
{{ if or .Site.Menus.main (.Site.Params.enableSearch | default false) }}
<ul class="flex list-none flex-col ltr:text-right rtl:text-left sm:flex-row">
<ul class="flex list-none flex-col text-end sm:flex-row">
{{ if .Site.Menus.main }}
{{ range .Site.Menus.main }}
<li class="group mb-1 sm:mb-0 sm:me-7 sm:last:me-0.5">
@@ -68,6 +67,9 @@
{{ end }}
</span>
</button>
{{ else if eq .Params.action "locale" }}
{{ $.Scratch.Add "localeCount" 1 }}
{{ partial "translations.html" . }}
{{ else }}
<a
href="{{ .URL }}"