peruna/layouts/partials/menu.html

25 lines
640 B
HTML
Raw Permalink Normal View History

2018-04-03 09:51:11 +00:00
{{ if .Site.Menus.main }}
<nav class="l-nav p-menu">
<ul class="p-menu__lists">
{{ range .Site.Menus.main.ByWeight }}
{{ if .HasChildren }}
<li class="p-menu__listitem p-menu__parent">
<span>{{ .Name }}</span>
<ul>
{{ range .Children }}
<li class="p-menu__listitem p-menu__child"><a href="{{ .URL | relLangURL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
</li>
{{ else }}
<li class="p-menu__listitem">
<a href="{{ .URL }}">
{{- .Name -}}
</a>
</li>
{{ end }}
{{ end }}
</ul>
</nav>
{{ end }}