Files
rancher-docs/layouts/partials/docs-side-nav.html
T
2019-04-25 18:37:05 -07:00

96 lines
3.0 KiB
HTML

{{ $.Scratch.Set "topLevel" . }}
{{ range $product := $.Site.Sections }}
{{ range $version := .Sections }}
{{ range $language := .Sections }}
{{if $.CurrentSection}}
{{ if .IsAncestor $.CurrentSection }}
{{ $.Scratch.Set "topLevel" . }}
{{end}}
{{end}}
{{end}}
{{end}}
{{end}}
<!-- product dropdown -->
<div class="side-menus-container product-select jquery-accordion-menu">
<ul class="side-menus-wrap">
<li class="">
<a href="{{ ($.Scratch.Get "topLevel").Permalink }}" class="">
<span class="">
{{ range $product := $.Site.Sections }}
{{ range $version := .Sections }}
{{ range $language := .Sections }}
{{if $.CurrentSection}}
{{ if .IsAncestor $.CurrentSection }}
{{ .Params.shortTitle }}
{{end}}
{{end}}
{{end}}
{{end}}
{{end}}
</span>
</a>
<ul class="submenu submenus-wrap">
{{ range $product := $.Site.Sections }}
{{ range $version := .Sections }}
{{ range $language := .Sections }}
<li><a href="{{ .Permalink }}">{{ .Params.shortTitle }}</a></li>
{{ if .Params.insertonesix }}
<li><a href="https://rancher.com/docs/rancher/v1.6/en/" target="blank">Rancher 1.6</a></li>
{{end}}
{{end}}
{{end}}
{{end}}
</ul>
</li>
</ul>
</div>
<div class="guide-menus-activator">
{{ if .Title }}
{{.Title}}
{{ else }}
Quick Start Guide
{{end}}
<span class="indicator">
<span class="object1"></span>
<span class="object2"></span>
<span class="object3"></span>
</span>
</div>
<div class="side-menus-container guide-menus jquery-accordion-menu">
<ul class="side-menus-wrap second">
{{ template "section-tree-nav" ($.Scratch.Get "topLevel") }}
<li class="back-to-the-top">
<a href="#" class="submenu-indicator-close">
Back to the top
<svg class="svg-icon" enable-background="new 0 0 34 34" viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg">
<g class="svg-linear" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10">
<path d="m12 14.5 5-5 5 5"></path><path d="m17 9.5v15"></path>
</g>
</svg>
<span class="submenu-indicator"><span class="object1"></span><span class="object2"></span><span class="object3"></span></span>
</a>
</li>
</ul>
</div>
{{ define "section-tree-nav" }}
{{ range .Sections}}
<li class="tree-nav-item"><a href="{{ .RelPermalink}}">{{ .Title }}</a>
{{if gt (len .Sections) 0}}
<ul class="tree-nav-sublist submenu submenus-wrap">
{{ range .Pages }}
<li class="tree-nav-item-child"><a href="{{ .RelPermalink}}">{{ .Title }}</a></li>
{{ end }}
{{ template "section-tree-nav" . }}
</ul>
{{end}}
</li>
{{ end }}
{{ end }}