omegamma/layouts/partials/header.html

47 lines
1.7 KiB
HTML
Raw Normal View History

2021-06-08 14:19:46 +00:00
<nav>
<div class="center nav-flex">
{{ $currentPage := . }}
<div class="nav-mobile">
2021-06-08 16:18:22 +00:00
<a class="navbar-brand" href="{{ .Site.Params.brandWebsite }}" role="button">
2021-06-08 14:19:46 +00:00
<img src="/img/icon.png" class="icon-brand" alt=""></img>
2021-06-08 16:18:22 +00:00
Ad5001
2021-06-08 14:19:46 +00:00
</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 }}
{{ if .HasChildren }}
2021-06-08 16:18:22 +00:00
<a href="#" role="button">
2021-06-08 14:19:46 +00:00
<li class="{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}">
{{ .Pre }}
<span>{{ .Name }}</span>
</li>
</a>
<ul class="sub-menu">
{{ range .Children }}
2021-06-08 16:18:22 +00:00
<a href="{{ .URL }}" role="button">
2021-06-08 14:19:46 +00:00
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
{{ .Name }}
</li>
</a>
{{ end }}
</ul>
{{ else }}
2021-06-08 16:18:22 +00:00
<a href="{{ .URL }}" role="button">
2021-06-08 14:19:46 +00:00
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
{{ .Pre }}
<span>{{ .Name }}</span>
</li>
</a>
{{ end }}
{{ end }}
</ul>
</div>
</div>
</nav>