2021-10-11 09:52:24 -05:00
|
|
|
<h2 class="header">
|
2021-10-23 00:25:06 -05:00
|
|
|
<a href="{{ .Site.Home.Permalink | absLangURL }}">{{ .Site.Title | markdownify }}</a>
|
2021-10-11 09:52:24 -05:00
|
|
|
</h2>
|
|
|
|
|
2021-11-04 21:04:27 -05:00
|
|
|
<div class="topbar">
|
2021-11-23 19:06:26 -06:00
|
|
|
<nav class="navbar" aria-label="{{ i18n "aria_navbar" }}">
|
2021-11-04 21:04:27 -05:00
|
|
|
{{ with .Site.Home }}
|
2021-11-22 02:21:15 -06:00
|
|
|
<a class="navbar-item{{ if $.IsHome }} active{{ end }}" href="{{ .Permalink | absLangURL }}">{{ .Title | markdownify }}</a>
|
2021-11-04 21:04:27 -05:00
|
|
|
{{ end }}
|
2021-10-11 20:13:20 -05:00
|
|
|
|
2021-11-04 21:04:27 -05:00
|
|
|
{{ range .Site.Menus.main }}
|
2021-11-22 02:21:15 -06:00
|
|
|
{{ $isActive := false }}
|
|
|
|
{{ if or ($.HasMenuCurrent .Menu .) ($.IsMenuCurrent .Menu .) }}
|
|
|
|
{{ $isActive = true }}
|
|
|
|
{{ end }}
|
|
|
|
<a class="navbar-item{{ if $isActive }} active{{ end }}" href="{{ .URL }}">{{ .Name }}</a>
|
2021-11-04 21:04:27 -05:00
|
|
|
{{ end }}
|
|
|
|
</nav>
|
2021-10-11 21:26:23 -05:00
|
|
|
|
2021-11-04 21:04:27 -05:00
|
|
|
{{ if .Site.IsMultiLingual }}
|
2021-11-23 19:06:26 -06:00
|
|
|
<details class="langpicker" aria-label="{{ i18n "aria_langpicker" }}">
|
2021-11-22 02:21:15 -06:00
|
|
|
<summary>
|
|
|
|
{{- partial "icon.html" "world" -}}
|
|
|
|
</summary>
|
2021-11-23 19:06:26 -06:00
|
|
|
<ul class="languages" aria-label="{{ i18n "aria_langpicker_list" }}">
|
2021-11-22 02:21:15 -06:00
|
|
|
{{ range .AllTranslations }}
|
|
|
|
<li>
|
|
|
|
<a class="langpicker-item{{ if eq .Language $.Site.Language }} active{{ end }}" href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ $site_translations := slice }}
|
|
|
|
{{ range .Site.Languages }}
|
|
|
|
{{ $site_translations = $site_translations | append .LanguageName }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ $translation_codes := slice }}
|
|
|
|
{{ range .AllTranslations }}
|
|
|
|
{{ $translation_codes = $translation_codes | append .Language }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ range (.Site.Languages | complement $translation_codes) }}
|
|
|
|
<li>
|
2021-11-23 19:06:26 -06:00
|
|
|
<a class="langpicker-item unavailable" aria-disabled="true">{{ .LanguageName }}</a>
|
2021-11-22 02:21:15 -06:00
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</details>
|
2021-10-11 21:26:23 -05:00
|
|
|
{{ end }}
|
2021-11-04 21:04:27 -05:00
|
|
|
</div>
|