You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
667 B
28 lines
667 B
3 years ago
|
<div>
|
||
|
<ul class="sidebar-nav">
|
||
|
{{ $currentPage := . }}
|
||
|
{{ range .Site.Menus.main }}
|
||
|
{{ if .HasChildren }}
|
||
|
<li {{ if $currentPage.HasMenuCurrent "main" . }}class="active"{{ end }}>
|
||
|
<a href="#">{{ .Pre }}
|
||
|
<span>{{ .Name }}</span>
|
||
|
</a>
|
||
|
<ul class="sidebar-nav">
|
||
|
{{ range .Children }}
|
||
|
<li {{ if $currentPage.IsMenuCurrent "main" . }}class="active"{{ end }}>
|
||
|
<a href="{{ .URL }}">{{ .Name | title }}</a>
|
||
|
</li>
|
||
|
{{ end }}
|
||
|
</ul>
|
||
|
</li>
|
||
|
{{ else }} <!-- No children -->
|
||
|
<li>
|
||
|
<a href="{{.URL}}">{{ .Pre }}
|
||
|
<span>{{ .Name | title }}</span>
|
||
|
</a>
|
||
|
</li>
|
||
|
{{ end }}
|
||
|
{{ end }}
|
||
|
</ul>
|
||
|
</div>
|