blackbirdchess-docker-dev/docs/themes/hugo-material-docs/layouts/partials/nav.html
2017-02-22 14:59:06 -05:00

20 lines
428 B
HTML

{{ $currentNode := . }}
{{ range .Site.Menus.main.ByWeight }}
{{ $.Scratch.Set "currentMenuEntry" . }}
<li>
{{ if .HasChildren }}
<span class="section">{{ .Name | title }}</span>
<ul>
{{ range .Children }}
{{ $.Scratch.Set "currentMenuEntry" . }}
{{ partial "nav_link" $currentNode }}
{{ end }}
</ul>
{{ else }}
{{ partial "nav_link" $currentNode }}
{{ end }}
</li>
{{ end }}