mirror of
https://git.sr.ht/~ashkeel/strimertul-website
synced 2024-11-21 21:22:21 +00:00
29 lines
615 B
HTML
29 lines
615 B
HTML
|
<nav>
|
||
|
{{ $currentPage := .context }}
|
||
|
{{ range .menu }}
|
||
|
{{ if .HasChildren }}
|
||
|
<header>{{ .Title }}</header>
|
||
|
<ul class="sub-menu">
|
||
|
{{ range .Children }}
|
||
|
<li
|
||
|
class="{{ if $currentPage.IsMenuCurrent "guides" . }}
|
||
|
active
|
||
|
{{ end }}"
|
||
|
>
|
||
|
<a href="{{ .URL }}">{{ .Name }}</a>
|
||
|
</li>
|
||
|
{{ end }}
|
||
|
</ul>
|
||
|
{{ else }}
|
||
|
<ul>
|
||
|
<li>
|
||
|
<a href="{{ .URL }}">
|
||
|
{{ .Pre }}
|
||
|
<span>{{ .Name }}</span>
|
||
|
</a>
|
||
|
</li>
|
||
|
</ul>
|
||
|
{{ end }}
|
||
|
{{ end }}
|
||
|
</nav>
|