websiteOwn/layouts/partials/header.html

36 lines
1.2 KiB
HTML
Raw Permalink Normal View History

2019-09-20 07:51:22 +02:00
<nav class="navigation">
<section class="container">
<a class="navigation-title" href="{{ .Site.BaseURL | absLangURL }}">
{{ .Site.Title }}
</a>
<input type="checkbox" id="menu-toggle" />
2020-01-09 07:23:09 +01:00
<label class="menu-button float-right" for="menu-toggle"><i class="fa fa-bars"></i></label>
2019-09-20 07:51:22 +02:00
<ul class="navigation-list">
{{ with .Site.Menus.main}}
2019-09-22 13:55:57 +02:00
{{ range sort . "Weight" }}
2019-09-20 07:51:22 +02:00
<li class="navigation-item">
<a class="navigation-link" href="{{ .URL | relLangURL }}">{{ .Name }}</a>
</li>
{{ end }}
{{ end }}
{{ if .Site.IsMultiLingual }}
{{ $node := . }}
{{ .Scratch.Set "separator" true }}
{{ range .Site.Home.AllTranslations }}
{{ if ne $.Site.Language .Language }}
{{ if $node.Scratch.Get "separator" }}
<li class="navigation-item menu-separator">
<span>|</span>
</li>
{{ $node.Scratch.Set "separator" false }}
{{ end }}
<li class="navigation-item">
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
</li>
{{ end }}
{{ end }}
{{ end }}
</ul>
</section>
</nav>