Files
rancher-docs/layouts/partials/docs-nav.html
T
2018-04-25 15:58:59 -07:00

45 lines
1.4 KiB
HTML

{{ $.Scratch.Set "topLevel" . }}
{{ $.Scratch.Set "secondLevel" . }}
<nav>
<!-- tabs -->
<ul class="tabs row middle-xs">
<div class="pull-left p-v-xs">
<ul class="dropdown sub-menu unstyled">
<li>
<a href="{{ .URL }}" class="btn bg-link p-a-0">
<span class="p-h-xs">
{{ range .Site.Sections }}
{{if $.CurrentSection}}
{{ if .IsAncestor $.CurrentSection }}
{{ $.Scratch.Set "topLevel" . }}
{{ .Params.shortTitle }}
{{end}}
{{end}}
{{end}}
</span>
<i class="material-icons darken p-a-xs">keyboard_arrow_down</i>
</a>
<ul class="sub dropdown-menu bg-white unstyled">
{{ range .Site.Sections }}
<li><a href="{{ .Permalink }}">{{ .Params.shortTitle }}</a></li>
{{ end }}
<li><a href="https://rancher.com/docs/rancher/v1.6/en/" target="blank">Rancher 1.6</a></li>
</ul>
</li>
</ul>
</div>
{{ $topLevel := .Scratch.Get "topLevel"}}
{{ if $topLevel }}
{{ range $topLevel.Sections }}
{{ if .IsAncestor $.CurrentSection }}
{{ $.Scratch.Set "secondLevel" . }}
{{ end }}
<li><a href="{{ .Permalink }}" class="">{{ .Title }}</a></li>
{{ end }}
{{ end }}
</ul>
</nav>