Fork of the Hugo theme hyde-hyde that introduces some necessary cleanup and changes.
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.
 
 
 

27 lines
667 B

<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>