hugo-labs/layouts/partials/sidebar.html

33 lines
1.9 KiB
HTML
Raw Normal View History

2018-06-07 14:28:01 +02:00
{{ $currentPage := . }}
<ul>
{{ range .Site.Menus.main }}
{{ if .HasChildren }}
<li class="item {{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a>
{{ if or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .) }}
<ul>
{{ range .Children }}
2018-09-11 10:21:57 +02:00
<li class="sub-item{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a>
{{ if or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .) }}
<ul>
{{ range .Children }}
2018-10-01 16:37:19 +02:00
<li class="subsub-item{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a>
{{ if or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .) }}
<ul>
{{ range .Children }}
<li class="subsubsub-item{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
{{ end }}
</li>
2018-09-11 10:21:57 +02:00
{{ end }}
</ul>
{{ end }}
</li>
2018-06-07 14:28:01 +02:00
{{ end }}
</ul>
{{ end }}
</li>
{{ end }}
{{ end }}
</ul>