southwestradio-site/themes/swr/layouts/partials/nav.html

27 lines
606 B
HTML
Raw Normal View History

2022-10-29 03:08:38 +00:00
<aside>
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
{{ if .HasChildren }}
<p>
<a href="#">
{{ .Pre }}
<span>{{ .Name }}</span>
</a>
</p>
<ul class="sub-menu">
{{ range .Children }}
<li class="{{ if $currentPage.IsMenuCurrent " main" . }}active{{ end }}">
<a href="{{ .URL }}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
{{ else }}
<p>
<a href="{{ .URL }}">
{{ .Pre }}
<span>{{ .Name }}</span>
</a>
</p>
{{ end }}
{{ end }}
</aside>