2021-12-15 10:09:08 +00:00
|
|
|
<header class="bar" id="top-menu">
|
2022-01-05 12:58:28 +00:00
|
|
|
<h1 class="logo"><a href="/"><img src="{{ .Site.Params.logo }}" alt="{{ .Site.Title }}"/></a></h1>
|
|
|
|
<nav class="menu">
|
|
|
|
<ul>
|
|
|
|
{{ $currentPage := . }}
|
|
|
|
{{ range .Site.Menus.main }}
|
|
|
|
{{ if .HasChildren }}
|
2021-12-15 10:09:08 +00:00
|
|
|
<details class="menu-dropdown">
|
2022-01-05 12:58:28 +00:00
|
|
|
<summary class="menu-nav-item {{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}">
|
|
|
|
<a href="#">
|
|
|
|
{{ .Pre }}
|
|
|
|
<span>{{ .Name }}</span>
|
|
|
|
</a>
|
|
|
|
</summary>
|
|
|
|
<ul class="sub-menu">
|
|
|
|
{{ range .Children }}
|
2021-12-15 10:09:08 +00:00
|
|
|
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
|
|
|
|
<a href="{{ .URL }}">{{ .Name }}</a>
|
|
|
|
</li>
|
2022-01-05 12:58:28 +00:00
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</details>
|
|
|
|
{{ else }}
|
2021-12-15 10:09:08 +00:00
|
|
|
<li class="menu-nav-item">
|
|
|
|
<a href="{{ .URL }}">
|
|
|
|
{{ .Pre }}
|
|
|
|
<span>{{ .Name }}</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
2022-01-05 12:58:28 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</nav>
|
2021-12-15 10:09:08 +00:00
|
|
|
</header>
|