mirror of https://github.com/istio/istio.io.git
36 lines
1.4 KiB
HTML
36 lines
1.4 KiB
HTML
{{ $pages := .pages }}
|
|
{{ $parent := .parent }}
|
|
{{ $current := .current }}
|
|
{{ $collapse := .collapse }}
|
|
|
|
<ul class="tree{{ if $collapse }} collapse{{ end }}">
|
|
{{ range $pages }}
|
|
{{ if eq .Parent $parent }}
|
|
{{ if not .IsPage }}
|
|
<li class="sublist">
|
|
{{ $collapse := not (.IsAncestor $current) }}
|
|
|
|
<label class='tree-toggle'>
|
|
{{ if $collapse }}
|
|
<i class='fa fa-lg fa-caret-right'></i>
|
|
{{ else }}
|
|
<i class='fa fa-lg fa-caret-down'></i>
|
|
{{ end }}
|
|
<a {{ if eq $current.Permalink .Permalink }}class="current"{{ end }} title="{{ .Description }}" href="{{ .Permalink }}">{{ .LinkTitle}} </a>
|
|
</label>
|
|
|
|
{{ partial "sidebar-level.html" (dict "pages" $pages "parent" . "current" $current "collapse" $collapse) }}
|
|
</li>
|
|
{{ else }}
|
|
<li>
|
|
{{ if eq $current.Permalink .Permalink }}
|
|
<span class="current" title="{{ .Description }}">{{ .LinkTitle }}</span>
|
|
{{ else }}
|
|
<a title="{{ .Description }}" href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
|
{{ end }}
|
|
</li>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
</ul>
|