mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Adding the site theme to git
This commit is contained in:
24
_site/themes/hyde-hyde/layouts/partials/sidebar_menu.html
Normal file
24
_site/themes/hyde-hyde/layouts/partials/sidebar_menu.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<!-- sidebar start -->
|
||||
<div>
|
||||
<ul class="sidebar-nav">
|
||||
{{ $currentPage := . }}
|
||||
{{ range .Site.Menus.main -}}
|
||||
{{ if .HasChildren -}}
|
||||
<li class="{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}">
|
||||
<a href="#">{{ .Pre }}<span>{{ .Name }}</span></a>
|
||||
<ul class="sidebar-nav">
|
||||
{{ range .Children -}}
|
||||
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
|
||||
<a href="{{ .URL }}">{{ .Name | title }}</a>
|
||||
</li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
{{- else -}} <!-- No Children-->
|
||||
<li>
|
||||
<a href="{{.URL}}">{{ .Pre }} <span>{{ .Name | title }}</span></a>
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
Reference in New Issue
Block a user