69 lines
2.7 KiB
HTML
69 lines
2.7 KiB
HTML
<nav>
|
|
<div class="center nav-flex">
|
|
{{ $currentPage := . }}
|
|
<div class="nav-mobile">
|
|
<a class="navbar-brand" href="{{ .Site.Params.brandWebsite }}" role="button">
|
|
<img src="/img/icon.png" class="icon-brand" alt=""/>
|
|
Ad5001
|
|
</a>
|
|
|
|
<button id="navbar-toggler">
|
|
<img src="/icons/menu.svg" class=""/>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="navbar-menu">
|
|
<ul class="navbar-list">
|
|
{{ range .Site.Menus.main.ByWeight }}
|
|
{{ if .HasChildren }}
|
|
<div class="menu-with-sub">
|
|
<a href="#" role="button">
|
|
<li class="{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}">
|
|
{{ .Pre }}
|
|
<span>{{ .Name }}</span>
|
|
</li>
|
|
</a>
|
|
<ul class="sub-menu">
|
|
{{ range .Children }}
|
|
<a href="{{ .URL }}" role="button">
|
|
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }} background">
|
|
{{ .Name }}
|
|
</li>
|
|
</a>
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
{{ else }}
|
|
<a href="{{ .URL }}" role="button">
|
|
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
|
|
{{ .Pre }}
|
|
<span>{{ .Name }}</span>
|
|
</li>
|
|
</a>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ $currentLang := .Site.Language }}
|
|
{{ if .IsTranslated }}
|
|
<div class="menu-with-sub">
|
|
<a href="#" role="button">
|
|
<li>
|
|
<img src="/icons/lang.svg" class="icon-as-text"/>
|
|
<span>{{ i18n "language" 1 }}</span>
|
|
</li>
|
|
</a>
|
|
<ul class="sub-menu">
|
|
{{ range .Translations }}
|
|
<a href="{{ .Permalink }}" role="button">
|
|
<li class="background">
|
|
<img src="/icons/flag/{{ .Language.Lang }}.svg" class="icon-as-text"/>
|
|
{{ .Language.LanguageName }}
|
|
</li>
|
|
</a>
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|