docs-v2/layouts/partials/sidebar.html

94 lines
6.4 KiB
HTML
Raw Normal View History

2019-01-03 00:18:01 +00:00
{{ $currentPage := . }}
2018-12-21 17:12:28 +00:00
{{ $currentVersion := (index (findRE "[^/]+.*?" .RelPermalink) 0) }}
2019-01-03 00:18:01 +00:00
<aside class="sidebar">
2018-12-21 17:12:28 +00:00
<div class="sidebar--search">
<input class="sidebar--search-field"
id="algolia-search-input"
type="text"
accesskey="s"
autocomplete="off"
autocorrect="off"
autocapitalize="off"
spellcheck="false"
dir="auto"
placeholder="Search {{ $currentVersion }}">
</div>
2019-01-03 00:18:01 +00:00
<ul id="nav-tree">
{{ $menuID := replaceRE "[.]" "_" $currentVersion }}
{{ range (index .Site.Menus $menuID) }}
<!-- Nested Navigation -->
<li class="nav-category {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}active{{end}}">
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ if .HasChildren }}
<ul class="children {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}">
{{ range .Children }}
<li class="nav-item {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}active{{end}}">
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ if .HasChildren }}
<ul class="children {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}">
{{ range .Children }}
<li class="nav-item {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}active{{end}}">
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ if .HasChildren }}
<ul class="children {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}">
{{ range .Children }}
<li class="nav-item {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}active{{end}}">
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ if .HasChildren }}
<ul class="children {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}">
{{ range .Children }}
<li class="nav-item {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}active{{end}}">
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ if .HasChildren }}
<ul class="children {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}">
{{ range .Children }}
<li class="nav-item {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}active{{end}}">
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
<a href="{{ .URL }}">{{ .Name }}</a>
<!-- Begin nested block -->
{{ if .HasChildren }}
<ul class="children {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}">
{{ range .Children }}
<li class="nav-item {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}active{{end}}">
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
<a href="{{ .URL }}">{{ .Name }}</a>
<!-- To add more nested layers, copy the nested block and paste it here -->
</li>
{{ end }}
</ul>
{{ end }}
<!-- End nested block -->
</li>
{{ end }}
</ul>
{{ end }}
</li>
{{ end }}
</ul>
{{ end }}
</li>
{{ end }}
</ul>
{{ end }}
</li>
{{ end }}
</ul>
{{ end }}
</li>
{{ end }}
</ul>
{{ end }}
</li>
{{end}}
</ul>
</aside>