2022-09-08 16:41:49 +02:00
|
|
|
|
2022-09-06 17:42:59 +02:00
|
|
|
<section class="fixed-top navigation py-3">
|
2022-07-19 09:14:46 +02:00
|
|
|
<div class="container">
|
2022-09-06 17:42:59 +02:00
|
|
|
<nav class="navbar navbar-expand-sm navbar-dark">
|
2022-07-19 09:14:46 +02:00
|
|
|
<a class="navbar-brand p-0" href="{{ .Site.BaseURL | relLangURL }}">
|
|
|
|
{{ if site.Params.logo }}
|
2022-09-13 23:27:16 +02:00
|
|
|
<img src="{{ site.Params.logo | absURL }}" alt="{{ .Site.Title }}" height="42" loading="lazy">
|
2022-07-19 09:14:46 +02:00
|
|
|
{{ else }}
|
|
|
|
{{ site.Title }}
|
|
|
|
{{ end }}
|
|
|
|
</a>
|
|
|
|
|
2022-10-07 22:07:27 +02:00
|
|
|
<button class="navbar-toggler rounded-0" type="button" data-toggle="collapse" data-target="#navigation" onfocusout="this.click()">
|
2022-07-19 09:14:46 +02:00
|
|
|
<span class="navbar-toggler-icon"></span>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<div class="collapse navbar-collapse" id="navigation">
|
2022-09-07 10:21:51 +02:00
|
|
|
<ul class="navbar-nav ml-auto mt-4 mt-sm-0">
|
2022-07-19 09:14:46 +02:00
|
|
|
<!-- menu active -->
|
|
|
|
{{ $currentPage := . }}
|
|
|
|
{{ range site.Menus.main }}
|
|
|
|
{{ $menuURL := .URL | absLangURL }}
|
|
|
|
{{ $pageURL:= $currentPage.Permalink | absLangURL }}
|
|
|
|
{{ $active := eq $menuURL $pageURL }}
|
|
|
|
{{ if .HasChildren }}
|
|
|
|
<li class="nav-item dropdown">
|
|
|
|
<a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true"
|
|
|
|
aria-expanded="false">
|
|
|
|
{{ .Name }}
|
|
|
|
</a>
|
|
|
|
<div class="dropdown-menu">
|
|
|
|
{{ range .Children }}
|
|
|
|
{{ $childURL := .URL | absLangURL }}
|
|
|
|
{{ $active := eq $childURL $pageURL }}
|
|
|
|
<a class="dropdown-item" {{if findRE `^http` .URL}}target="_blank" rel="noopener" {{end}}
|
|
|
|
href="{{if findRE `^#` .URL}}{{if not $.IsHome}}{{site.BaseURL | relLangURL}}{{end}}{{.URL}}{{else}}{{.URL | relLangURL}}{{end}}">{{ .Name }}</a>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
{{ else }}
|
|
|
|
<li class="nav-item">
|
2022-09-08 16:41:49 +02:00
|
|
|
<a onclick="$('#navigation').removeClass('show')" class="nav-link" {{if findRE `^http` .URL}}target="_blank" rel="noopener" {{end}}
|
2022-07-19 09:14:46 +02:00
|
|
|
href="{{if findRE `^#` .URL}}{{if not $.IsHome}}{{site.BaseURL | relLangURL}}{{end}}{{.URL}}{{else}}{{.URL | relLangURL}}{{end}}">{{.Name}}</a>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
<!-- Language List -->
|
|
|
|
{{- if site.IsMultiLingual }}
|
|
|
|
<select id="select-language" onchange="location = this.value;">
|
|
|
|
{{ $siteLanguages := site.Languages}}
|
|
|
|
{{ $pageLang := .Page.Lang}}
|
|
|
|
{{ range .Page.AllTranslations }}
|
|
|
|
{{ $translation := .}}
|
|
|
|
{{ range $siteLanguages }}
|
|
|
|
{{ if eq $translation.Lang .Lang }}
|
|
|
|
{{ $selected := false }}
|
|
|
|
{{ if eq $pageLang .Lang}}
|
|
|
|
<option id="{{ $translation.Language }}" value="{{ $translation.Permalink }}" selected>{{ .LanguageName }}
|
|
|
|
</option>
|
|
|
|
{{ else }}
|
|
|
|
<option id="{{ $translation.Language }}" value="{{ $translation.Permalink }}">{{ .LanguageName }}</option>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</select>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
</section>
|