This repository has been archived on 2023-08-03. You can view files and clone it, but cannot push or open issues or pull requests.
sito-web/layouts/partials/header.html

40 lines
1.5 KiB
HTML
Raw Normal View History

2022-12-19 22:37:47 +01:00
<nav class="navigation">
<section class="container">
<a class="navigation-title" href="{{ .Site.BaseURL | relLangURL }}">
<i class="fa fa-terminal"></i> {{ .Site.Title }}
</a>
{{ if or .Site.Menus.main .Site.IsMultiLingual }}
<input type="checkbox" id="menu-toggle" />
<label class="menu-button float-right" for="menu-toggle">
<i class="fa fa-bars fa-fw" aria-hidden="true"></i>
</label>
<ul class="navigation-list">
{{ with .Site.Menus.main}}
{{ range sort . }}
<li class="navigation-item">
<a class="navigation-link" href="{{ index (apply (slice .URL) (.Params.urlFunc | default "relLangURL") ".") 0 }}">{{ .Name }}</a>
</li>
{{ end }}
{{ end }}
{{ if .Site.IsMultiLingual }}
{{ $node := . }}
{{ .Scratch.Set "separator" true }}
{{ range (default .Site.Home.AllTranslations .Translations) }}
{{ 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 | emojify }}</a>
</li>
{{ end }}
{{ end }}
{{ end }}
</ul>
{{ end }}
</section>
</nav>