{{- /* Desktop header */ -}} {{- with .Site.Params.header.title -}} {{- with .logo -}} {{- dict "Src" . "Class" "logo" | partial "plugin/image.html" -}} {{- end -}} {{- with .pre -}} {{ . | safeHTML }} {{- end -}} {{- if .typeit -}} {{- $id := dict "Content" .name "Scratch" $.Scratch | partial "function/id.html" -}} {{- dict $id (slice $id) | dict "typeitMap" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}} {{- else -}} {{- .name -}} {{- end -}} {{- with .post -}} {{ . | safeHTML }} {{- end -}} {{- else -}} {{- .Site.Title -}} {{- end -}} {{- range .Site.Menus.main -}} {{- $url := .URL | relLangURL -}} {{- with .Page -}} {{- $url = .RelPermalink -}} {{- end -}} {{- .Pre | safeHTML }} {{ .Name }} {{ .Post | safeHTML -}} {{- end -}} {{- if .Site.Menus.main -}} {{- end -}} {{- if .Site.IsMultiLingual -}} {{- .Language.LanguageName -}} {{- if eq .Kind "404" -}} {{- range .Sites -}} {{- $link := printf "%v/404.html" .LanguagePrefix -}} {{- .Language.LanguageName -}} {{- end -}} {{- else -}} {{- range .AllTranslations -}} {{- .Language.LanguageName -}} {{- end -}} {{- end -}} {{- end -}} {{- if .Site.Params.search.enable -}} {{- end -}} {{- /* Mobile header */ -}} {{- with .Site.Params.header.title -}} {{- with .logo -}} {{- dict "Src" . "Class" "logo" | partial "plugin/image.html" -}} {{- end -}} {{- with .pre -}} {{ . | safeHTML }} {{- end -}} {{- if .typeit -}} {{- $id := dict "Content" .name "Scratch" $.Scratch | partial "function/id.html" -}} {{- dict $id (slice $id) | dict "typeitMap" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}} {{- else -}} {{- .name -}} {{- end -}} {{- with .post -}} {{ . | safeHTML }} {{- end -}} {{- else -}} {{- .Site.Title -}} {{- end -}} {{- if .Site.Params.search.enable -}} {{ T `cancel` }} {{- end -}} {{- $currentPage := . -}} {{- range .Site.Menus.main -}} {{- $url := .URL | relLangURL -}} {{- with .Page -}} {{- $url = .RelPermalink -}} {{- end -}} {{- .Pre | safeHTML }}{{ .Name }}{{ .Post | safeHTML -}} {{- end -}} {{- if .Site.IsMultiLingual -}} {{- .Language.LanguageName -}} {{- if eq .Kind "404" -}} {{- range .Sites -}} {{- $link := printf "%v/404.html" .LanguagePrefix -}} {{- .Language.LanguageName -}} {{- end -}} {{- else -}} {{- range .AllTranslations -}} {{- .Language.LanguageName -}} {{- end -}} {{- end -}} {{- end -}}