2020-02-13 18:30:33 +01:00
|
|
|
{{- /* Desktop header */ -}}
|
2020-02-16 09:42:14 +01:00
|
|
|
<header class="desktop" id="header-desktop">
|
2020-02-13 18:30:33 +01:00
|
|
|
<div class="header-wrapper">
|
|
|
|
<div class="header-title animated bounceIn">
|
2020-02-19 11:48:37 +01:00
|
|
|
<a href="{{ `/` | relLangURL }}">
|
2020-01-31 15:53:04 +01:00
|
|
|
{{- .Site.Title -}}
|
|
|
|
</a>
|
2019-02-03 12:30:44 +01:00
|
|
|
</div>
|
2020-02-13 18:30:33 +01:00
|
|
|
<div class="menu">
|
2020-01-31 15:53:04 +01:00
|
|
|
{{- range .Site.Menus.main -}}
|
2020-02-20 04:52:13 +01:00
|
|
|
<a class="menu-item{{ if $.IsMenuCurrent "main" . | or ($.HasMenuCurrent "main" .) | or (.URL | relLangURL | string | eq $.RelPermalink ) }} active{{ end }}" href="{{ .URL | relLangURL }}"{{ with .Title }} title="{{ . }}"{{ end }}>
|
2020-02-03 19:19:05 +01:00
|
|
|
{{- .Pre | safeHTML }}{{ .Name -}}
|
2020-01-31 15:53:04 +01:00
|
|
|
</a>
|
|
|
|
{{- end -}}
|
2020-03-03 17:41:14 +01:00
|
|
|
{{- if .Site.IsMultiLingual -}}
|
|
|
|
|
|
2020-03-08 14:02:21 +01:00
|
|
|
<a href="javascript:void(0);" class="menu-item">
|
2020-03-03 17:41:14 +01:00
|
|
|
<i class="fas fa-language fa-fw"></i>
|
|
|
|
<select class="select-language" onchange="location = this.value;">
|
|
|
|
{{- range .Page.AllTranslations -}}
|
|
|
|
{{- $translation := . -}}
|
|
|
|
{{- range $.Site.Languages -}}
|
|
|
|
{{- if eq $translation.Lang .Lang -}}
|
|
|
|
{{- if eq $.Page.Lang .Lang -}}
|
2020-03-09 13:25:55 +01:00
|
|
|
<option value="{{ $translation.RelPermalink }}" selected>{{ .LanguageName }}</option>
|
2020-03-03 17:41:14 +01:00
|
|
|
{{- else -}}
|
2020-03-09 13:25:55 +01:00
|
|
|
<option value="{{ $translation.RelPermalink }}">{{ .LanguageName }}</option>
|
2020-03-03 17:41:14 +01:00
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
</select>
|
2020-03-08 14:02:21 +01:00
|
|
|
</a>
|
2020-03-03 17:41:14 +01:00
|
|
|
{{- end -}}
|
2020-02-17 14:02:27 +01:00
|
|
|
<a href="javascript:void(0);" class="theme-switch" title="{{ T "switchTheme" }}">
|
|
|
|
<i class="fas fa-adjust fa-rotate-180 fa-fw"></i>
|
|
|
|
</a>
|
2019-02-03 12:30:44 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-13 18:30:33 +01:00
|
|
|
</header>
|
2020-01-30 06:17:42 +01:00
|
|
|
|
2020-02-13 18:30:33 +01:00
|
|
|
{{- /* Mobile header */ -}}
|
2020-02-16 09:42:14 +01:00
|
|
|
<header class="mobile" id="header-mobile">
|
2020-02-13 18:30:33 +01:00
|
|
|
<div class="header-wrapper">
|
|
|
|
<div class="header-container">
|
|
|
|
<div class="header-title animated bounceIn">
|
2020-02-19 11:48:37 +01:00
|
|
|
<a href="{{ `/` | relLangURL }}">
|
2020-01-31 15:53:04 +01:00
|
|
|
{{- .Site.Title -}}
|
|
|
|
</a>
|
2019-11-23 09:22:42 +01:00
|
|
|
</div>
|
2020-02-21 04:11:56 +01:00
|
|
|
<div class="menu-toggle" id="menu-toggle-mobile">
|
2019-02-03 12:30:44 +01:00
|
|
|
<span></span><span></span><span></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-13 18:30:33 +01:00
|
|
|
<div class="menu" id="menu-mobile">
|
2020-01-31 15:53:04 +01:00
|
|
|
{{- $currentPage := . -}}
|
|
|
|
{{- range .Site.Menus.main -}}
|
2020-02-21 05:49:55 +01:00
|
|
|
<a class="menu-item" href="{{ .URL | relLangURL }}" title="{{ .Title }}">
|
2020-02-18 09:22:24 +01:00
|
|
|
{{- .Pre | safeHTML }}{{ .Name -}}
|
2020-01-31 15:53:04 +01:00
|
|
|
</a>
|
|
|
|
{{- end -}}
|
2020-03-03 17:41:14 +01:00
|
|
|
{{- if .Site.IsMultiLingual -}}
|
2020-03-08 14:02:21 +01:00
|
|
|
<a href="javascript:void(0);" class="menu-item">
|
2020-03-03 17:41:14 +01:00
|
|
|
<i class="fas fa-language fa-fw"></i>
|
|
|
|
<select class="select-language" onchange="location = this.value;">
|
2020-03-04 04:55:33 +01:00
|
|
|
{{- range .Page.AllTranslations -}}
|
2020-03-03 17:41:14 +01:00
|
|
|
{{- $translation := . -}}
|
|
|
|
{{- range $.Site.Languages -}}
|
|
|
|
{{- if eq $translation.Lang .Lang -}}
|
|
|
|
{{- if eq $.Page.Lang .Lang -}}
|
2020-03-09 13:25:55 +01:00
|
|
|
<option value="{{ $translation.RelPermalink }}" selected>{{ .LanguageName }}</option>
|
2020-03-03 17:41:14 +01:00
|
|
|
{{- else -}}
|
2020-03-09 13:25:55 +01:00
|
|
|
<option value="{{ $translation.RelPermalink }}">{{ .LanguageName }}</option>
|
2020-03-03 17:41:14 +01:00
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
</select>
|
2020-03-08 14:02:21 +01:00
|
|
|
</a>
|
2020-03-03 17:41:14 +01:00
|
|
|
{{- end -}}
|
2020-02-17 14:02:27 +01:00
|
|
|
<a href="javascript:void(0);" class="theme-switch" title="{{ T "switchTheme" }}">
|
|
|
|
<i class="fas fa-adjust fa-rotate-180 fa-fw"></i>
|
|
|
|
</a>
|
2019-02-03 12:30:44 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-13 18:30:33 +01:00
|
|
|
</header>
|
2020-02-16 13:36:36 +01:00
|
|
|
|
|
|
|
<script>
|
2020-02-16 19:19:55 +01:00
|
|
|
window.desktopHeaderMode = {{ .Site.Params.header.desktopMode }};
|
|
|
|
window.mobileHeaderMode = {{ .Site.Params.header.mobileMode }};
|
2020-02-16 13:36:36 +01:00
|
|
|
</script>
|