2021-06-18 17:41:15 +00:00
|
|
|
{{ $white := .Params.HeaderTextWhite }}
|
2021-06-23 01:18:18 +00:00
|
|
|
<nav class="{{ if $white }}text-white{{ end }}">
|
2021-06-08 14:19:46 +00:00
|
|
|
<div class="center nav-flex">
|
|
|
|
{{ $currentPage := . }}
|
2021-07-13 22:18:53 +00:00
|
|
|
<div class="nav-mobile">
|
2021-08-09 12:45:34 +00:00
|
|
|
{{ 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 }}
|
2021-08-08 14:01:07 +00:00
|
|
|
<img src="/img/logo.svg" loading=lazy class="icon-brand" alt="Ad5001's icon"/>
|
2021-06-08 16:18:22 +00:00
|
|
|
Ad5001
|
2021-06-08 14:19:46 +00:00
|
|
|
</a>
|
|
|
|
|
2021-07-16 22:36:59 +00:00
|
|
|
<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>
|
2021-06-08 14:19:46 +00:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
|
2021-06-23 01:18:18 +00:00
|
|
|
<div class="navbar-menu">
|
2021-06-08 14:19:46 +00:00
|
|
|
<ul class="navbar-list">
|
2021-06-10 22:20:10 +00:00
|
|
|
{{ range .Site.Menus.main.ByWeight }}
|
2021-06-08 14:19:46 +00:00
|
|
|
{{ if .HasChildren }}
|
2021-07-13 22:18:53 +00:00
|
|
|
<li class="menu-with-sub">
|
|
|
|
<li class="{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}">
|
|
|
|
<a href="#" role="button">
|
2021-06-08 14:19:46 +00:00
|
|
|
{{ .Pre }}
|
|
|
|
<span>{{ .Name }}</span>
|
2021-07-13 22:18:53 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
2021-06-08 14:19:46 +00:00
|
|
|
<ul class="sub-menu">
|
|
|
|
{{ range .Children }}
|
2021-07-13 22:18:53 +00:00
|
|
|
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }} background">
|
2021-08-10 20:58:31 +00:00
|
|
|
<a href="{{ .URL }}" role="button" rel="noreferrer">
|
2021-06-08 14:19:46 +00:00
|
|
|
{{ .Name }}
|
2021-07-13 22:18:53 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
2021-06-08 14:19:46 +00:00
|
|
|
{{ end }}
|
|
|
|
</ul>
|
2021-07-13 22:18:53 +00:00
|
|
|
</li>
|
2021-06-08 14:19:46 +00:00
|
|
|
{{ else }}
|
2021-07-13 22:18:53 +00:00
|
|
|
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
|
2021-08-10 20:58:31 +00:00
|
|
|
<a href="{{ .URL }}" role="button" rel="noreferrer">
|
2021-06-09 18:00:57 +00:00
|
|
|
{{ .Pre }}
|
|
|
|
<span>{{ .Name }}</span>
|
2021-07-13 22:18:53 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
2021-06-09 18:00:57 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ $currentLang := .Site.Language }}
|
|
|
|
{{ if .IsTranslated }}
|
2021-07-13 22:18:53 +00:00
|
|
|
<li class="menu-with-sub">
|
2021-06-09 18:00:57 +00:00
|
|
|
<a href="#" role="button">
|
2021-07-16 22:36:59 +00:00
|
|
|
<i class="icon-lang icon-as-text" alt="{{ i18n "language" }} language flag"></i>
|
2021-07-13 22:18:53 +00:00
|
|
|
<span>{{ i18n "language" }}</span>
|
2021-06-08 14:19:46 +00:00
|
|
|
</a>
|
2021-06-23 01:18:18 +00:00
|
|
|
<ul class="sub-menu center">
|
2021-06-09 18:00:57 +00:00
|
|
|
{{ range .Translations }}
|
2021-07-13 22:18:53 +00:00
|
|
|
<li class="background">
|
|
|
|
<a href="{{ .Permalink }}" role="button">
|
2021-08-08 23:07:03 +00:00
|
|
|
<img src="/icons/flag/{{ .Language.Lang }}.svg" class="icon-as-text" loading=lazy width=21 height=21/>{{ .Language.LanguageName }}
|
2021-07-13 22:18:53 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
2021-06-09 18:00:57 +00:00
|
|
|
{{ end }}
|
|
|
|
</ul>
|
2021-07-13 22:18:53 +00:00
|
|
|
</li>
|
2021-06-08 14:19:46 +00:00
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</nav>
|