{{- /* Desktop header */ -}} {{- with .Site.Params.header.title -}} {{- with .logo -}} {{- partial "plugin/image.html" (dict "src" . "alt" $.Site.Title "class" "logo") -}} {{- end -}} {{- .pre | safeHTML }}{{ .name }}{{ .post | safeHTML -}} {{- 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 -}} {{- partial "plugin/image.html" (dict "src" . "alt" $.Site.Title "class" "logo") -}} {{- end -}} {{- .pre | safeHTML }}{{ .name }}{{ .post | safeHTML -}} {{- 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 -}}