{{- /* Desktop header */ -}} {{- with .Site.Params.header.title -}} {{- with .logo -}} {{- dict "src" . "alt" $.Site.Title "class" "logo" | partial "plugin/image.html" -}} {{- end -}} {{- with .pre -}} {{ . | safeHTML }} {{- end -}} {{- .name -}} {{- with .post -}} {{ . | safeHTML }} {{- end -}} {{- else -}} {{- .Site.Title -}} {{- end -}} {{- range .Site.Menus.main -}} {{- $url := "" -}} {{- with .Page -}} {{- $url = .RelPermalink -}} {{- else -}} {{- $url = .URL | relLangURL -}} {{- end -}} {{- .Pre | safeHTML }} {{ .Name }} {{ .Post | safeHTML -}} {{- end -}} {{- if .Site.IsMultiLingual -}} {{- .Language.LanguageName -}} {{- range .Page.AllTranslations -}} {{- $translation := . -}} {{- range $.Site.Languages -}} {{- if eq $translation.Lang .Lang -}} {{- if eq $.Page.Lang .Lang -}} {{ .LanguageName }} {{- else -}} {{ .LanguageName }} {{- end -}} {{- end -}} {{- end -}} {{- end -}} {{- end -}} {{- if .Site.Params.search.enable -}} {{- end -}} {{- /* Mobile header */ -}} {{- with .Site.Params.header.title -}} {{- with .logo -}} {{- dict "src" . "alt" $.Site.Title "class" "logo" | partial "plugin/image.html" -}} {{- end -}} {{- with .pre -}} {{ . | safeHTML }} {{- end -}} {{- .name -}} {{- with .post -}} {{ . | safeHTML }} {{- end -}} {{- else -}} {{- .Site.Title -}} {{- end -}} {{- if .Site.Params.search.enable -}} {{ T `cancel` }} {{- end -}} {{- $currentPage := . -}} {{- range .Site.Menus.main -}} {{- $url := "" -}} {{- with .Page -}} {{- $url = .RelPermalink -}} {{- else -}} {{- $url = .URL | relLangURL -}} {{- end -}} {{- .Pre | safeHTML }}{{ .Name }}{{ .Post | safeHTML -}} {{- end -}} {{- if .Site.IsMultiLingual -}} {{- .Language.LanguageName -}} {{- range .Page.AllTranslations -}} {{- $translation := . -}} {{- range $.Site.Languages -}} {{- if eq $translation.Lang .Lang -}} {{- if eq $.Page.Lang .Lang -}} {{ .LanguageName }} {{- else -}} {{ .LanguageName }} {{- end -}} {{- end -}} {{- end -}} {{- end -}} {{- end -}}