71 lines
3.1 KiB
HTML
71 lines
3.1 KiB
HTML
{{ $white := .Params.HeaderTextWhite }}
|
|
<nav class="{{ if $white }}text-white{{ end }}">
|
|
<div class="center nav-flex">
|
|
{{ $currentPage := . }}
|
|
<div class="nav-mobile">
|
|
{{ if eq .Site.Language.Lang "en" }}
|
|
<a class="navbar-brand" href="{{ .Site.Params.brandWebsite }}" role="button">
|
|
{{ else }}
|
|
<a class="navbar-brand" href="{{ .Site.Params.brandWebsite }}{{ .Site.Language.Lang }}/" role="button">
|
|
{{ end }}
|
|
<img src="/img/logo.svg" loading=lazy class="icon-brand" alt="Ad5001's icon"/>
|
|
Ad5001
|
|
</a>
|
|
|
|
<button id="navbar-toggler" aria-label="Show menu" class="{{ if $white }}text-white{{ end }}">
|
|
<i class="icon-menu icon-larger2-text" alt="Menu icon"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="navbar-menu">
|
|
<ul class="navbar-list">
|
|
{{ range .Site.Menus.main.ByWeight }}
|
|
{{ if .HasChildren }}
|
|
<li class="menu-with-sub">
|
|
<li class="{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}">
|
|
<a href="#" role="button">
|
|
{{ .Pre }}
|
|
<span>{{ .Name }}</span>
|
|
</a>
|
|
</li>
|
|
<ul class="sub-menu">
|
|
{{ range .Children }}
|
|
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }} background">
|
|
<a href="{{ .URL }}" role="button" rel="noreferrer">
|
|
{{ .Name }}
|
|
</a>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</li>
|
|
{{ else }}
|
|
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
|
|
<a href="{{ .URL }}" role="button" rel="noreferrer">
|
|
{{ .Pre }}
|
|
<span>{{ .Name }}</span>
|
|
</a>
|
|
</li>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ $currentLang := .Site.Language }}
|
|
{{ if .IsTranslated }}
|
|
<li class="menu-with-sub">
|
|
<a href="#" role="button">
|
|
<i class="icon-lang icon-as-text" alt="{{ i18n "language" }} language flag"></i>
|
|
<span>{{ i18n "language" }}</span>
|
|
</a>
|
|
<ul class="sub-menu center">
|
|
{{ range .Translations }}
|
|
<li class="background">
|
|
<a href="{{ .Permalink }}" role="button">
|
|
<img src="/icons/flag/{{ .Language.Lang }}.svg" class="icon-as-text" loading=lazy width=21 height=21/>{{ .Language.LanguageName }}
|
|
</a>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|