2021-12-30 22:58:11 +00:00
|
|
|
<!--
|
|
|
|
Omegamma - Hugo theme for ad5001.eu and related websites
|
|
|
|
|
|
|
|
Copyright (C) 2021-2022 Ad5001 <mail@ad5001.eu>
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
-->
|
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-09-30 20:51:20 +00:00
|
|
|
<span class="mobile-label">{{ 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">
|
2022-01-21 12:05:46 +00:00
|
|
|
{{ index site.Data.flags .Language.Lang }} {{ .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>
|