hugo-labs/layouts/partials/sidebar.html

33 lines
1.5 KiB
HTML
Raw Normal View History

2018-06-07 14:28:01 +02:00
{{ $currentPage := . }}
<ul>
2018-10-05 17:18:03 +02:00
{{ 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 }}
<li class="sub-item{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a>
2018-06-07 14:28:01 +02:00
{{ if or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .) }}
2018-10-05 17:18:03 +02:00
<ul>
{{ range .Children }}
<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>
2018-06-07 14:28:01 +02:00
{{ end }}
2018-10-05 17:18:03 +02:00
</li>
{{ end }}
</ul>
2018-06-07 14:28:01 +02:00
{{ end }}
2018-10-05 17:18:03 +02:00
</li>
{{ end }}
</ul>
2018-06-07 14:28:01 +02:00
{{ end }}
2018-10-05 17:18:03 +02:00
</li>
2018-06-07 14:28:01 +02:00
{{ end }}
2018-10-05 17:18:03 +02:00
{{ end }}
2018-06-07 14:28:01 +02:00
</ul>