{{- $buildDrafts := .Site.BuildDrafts -}} {{- $homeRelPermalink := .Scratch.Get "homeRelPermalink" -}} {{- /* Desktop header */ -}} {{- with .Site.Params.header.title -}} {{- with .logo -}} {{- dict "Src" . "Class" "logo" "Alt" $.Site.Title "Width" 26 "Height" 26 | partial "plugin/image.html" -}} {{- end -}} {{- with .pre -}} {{ . | safeHTML }} {{- end -}} {{- if .typeit -}} {{- $.Store.Set "hasTyped" true -}} {{ .name | default $.Site.Title }} {{- else -}} {{ .name | default $.Site.Title }} {{- end -}} {{- with .post -}} {{ . | safeHTML }} {{- end -}} {{- else -}} {{ .Site.Title }} {{- end -}} {{- with .Site.Params.header.subtitle -}} {{- if .typeit -}} {{- $.Store.Set "hasTyped" true -}} {{ .name }} {{- else -}} {{ .name }} {{- end -}} {{- end -}} {{- range .Site.Menus.main -}} {{- $url := .URL | relLangURL -}} {{- with .Page -}} {{- $url = .RelPermalink -}} {{- end -}} {{- if (ne .Params.Draft true) | or $buildDrafts | and (ne .Params.Type "mobile") -}} {{- with .Pre -}}{{- . | safeHTML }} {{ end }} {{- with .Params.Icon -}}{{ dict "Class" (printf "%v fa-fw fa-sm" .) | partial "plugin/icon.html" }} {{ end }} {{- .Name }} {{- with .Post }} {{ . | safeHTML -}}{{- end -}} {{- if .HasChildren -}} {{ dict "Class" "dropdown-icon fa-solid fa-chevron-down" | partial "plugin/icon.html" }} {{- range $k, $v := .Children -}} {{- $url := $v.URL | relLangURL -}} {{- with $v.Page -}} {{- $url = .RelPermalink -}} {{- end -}} {{- if (ne $v.Params.Draft true) | or $buildDrafts | and (ne $v.Params.Type "mobile") -}} {{- if $k | and $v.Params.Divided -}} {{- end -}} {{- with $v.Pre -}}{{- . | safeHTML }} {{ end }} {{- with $v.Params.Icon -}}{{ dict "Class" (printf "%v fa-fw fa-sm" .) | partial "plugin/icon.html" }} {{ end }} {{- $v.Name }} {{- with $v.Post }} {{ . | safeHTML -}}{{- end -}} {{- end -}} {{- end -}} {{- end -}} {{- end -}} {{- end -}} {{- if .Site.Menus.main -}} {{- end -}} {{- if .Site.Params.search.enable -}} {{ dict "Class" "fa-solid fa-search fa-fw" | partial "plugin/icon.html" }} {{ dict "Class" "fa-solid fa-times-circle fa-fw" | partial "plugin/icon.html" }} {{ dict "Class" "fa-solid fa-spinner fa-fw fa-spin" | partial "plugin/icon.html" }} {{- end -}} {{ dict "Class" "fa-solid fa-adjust fa-fw" | partial "plugin/icon.html" }} {{- if hugo.IsMultilingual -}} {{- dict "Class" "fa-solid fa-language fa-fw" | partial "plugin/icon.html" -}} {{- if (eq .Kind "404") -}} {{- range .Sites -}} {{- if ne . $.Site -}} {{- $link := printf "%v/404.html" .LanguagePrefix -}} {{- .Language.LanguageName -}} {{- end -}} {{- end -}} {{- else if .IsTranslated -}} {{- range .AllTranslations -}} {{- if ne .Lang $.Lang -}} {{- .Language.LanguageName -}} {{- else -}} {{ .Language.LanguageName }} {{- end -}} {{- end -}} {{- else -}} {{- T "header.noMoretTranslations" -}} {{- end -}} {{- end -}} {{- /* Mobile header */ -}} {{- with .Site.Params.header.title -}} {{- with .logo -}} {{- dict "Src" . "Class" "logo" "Alt" $.Site.Title "Width" 26 "Height" 26 | partial "plugin/image.html" -}} {{- end -}} {{- with .pre -}} {{ . | safeHTML }} {{- end -}} {{- if .typeit -}} {{- $.Store.Set "hasTyped" true -}} {{ .name | default $.Site.Title }} {{- else -}} {{ .name | default $.Site.Title }} {{- end -}} {{- with .post -}} {{ . | safeHTML }} {{- end -}} {{- else -}} {{ .Site.Title }} {{- end -}} {{- with .Site.Params.header.subtitle -}} {{- if .typeit -}} {{- $.Store.Set "hasTyped" true -}} {{ .name }} {{- else -}} {{- .name -}} {{- end -}} {{- end -}} {{- if .Site.Params.search.enable -}} {{ dict "Class" "fa-solid fa-search fa-fw" | partial "plugin/icon.html" }} {{ dict "Class" "fa-solid fa-times-circle fa-fw" | partial "plugin/icon.html" }} {{ dict "Class" "fa-solid fa-spinner fa-fw fa-spin" | partial "plugin/icon.html" }} {{ T `assets.cancel` }} {{- end -}} {{- $currentPage := . -}} {{- range .Site.Menus.main -}} {{- $url := .URL | relLangURL -}} {{- with .Page -}} {{- $url = .RelPermalink -}} {{- end -}} {{- if (ne .Params.Draft true) | or $buildDrafts | and (ne .Params.Type "desktop") -}} {{- if .HasChildren -}} {{- with .Pre -}}{{- . | safeHTML }} {{ end }} {{- with .Params.Icon -}}{{ dict "Class" (printf "%v fa-fw fa-sm" .) | partial "plugin/icon.html" }} {{ end }} {{- .Name }} {{- with .Post }} {{ . | safeHTML -}}{{- end -}} {{ dict "Class" "dropdown-icon fa-solid fa-chevron-right" | partial "plugin/icon.html" }} {{- range $k, $v := .Children -}} {{- $url := $v.URL | relLangURL -}} {{- with $v.Page -}} {{- $url = .RelPermalink -}} {{- end -}} {{- if (ne $v.Params.Draft true) | or $buildDrafts | and (ne $v.Params.Type "desktop") -}} {{- if $k | and $v.Params.Divided -}} {{- end -}} {{- with $v.Pre -}}{{- . | safeHTML }} {{ end }} {{- with $v.Params.Icon -}}{{ dict "Class" (printf "%v fa-fw fa-sm" .) | partial "plugin/icon.html" }} {{ end }} {{- $v.Name }} {{- with $v.Post }} {{ . | safeHTML -}}{{- end -}} {{- end -}} {{- end -}} {{- else -}} {{- with .Pre -}}{{- . | safeHTML }} {{ end }} {{- with .Params.Icon -}}{{ dict "Class" (printf "%v fa-fw fa-sm" .) | partial "plugin/icon.html" }} {{ end }} {{- .Name }} {{- with .Post }} {{ . | safeHTML -}}{{- end -}} {{- end -}} {{- end -}} {{- end -}} {{ dict "Class" "fa-solid fa-adjust fa-fw" | partial "plugin/icon.html" }} {{- if hugo.IsMultilingual -}} {{- .Language.LanguageName -}} {{- dict "Class" "dropdown-icon fa-solid fa-chevron-down" | partial "plugin/icon.html" -}} {{- if eq .Kind "404" -}} {{- range .Sites -}} {{- $link := printf "%v/404.html" .LanguagePrefix -}} {{- .Language.LanguageName -}} {{- end -}} {{- else if gt (len .AllTranslations) 1 -}} {{- range .AllTranslations -}} {{- .Language.LanguageName -}} {{- end -}} {{- else -}} {{- T "header.noMoretTranslations" -}} {{- end -}} {{- end -}} {{- if .Site.Params.search.enable -}}