11{{ $current := . }}
2-
32< nav class ="bd-links-nav w-100 " aria-label ="Docs navigation ">
4- {{ with .Site.GetPage "section" .Section }}
5- {{ $sectionPages := (.Pages | append .) }}
6- {{ range $sectionPages.ByWeight }}
7- {{ $expand := (eq $current .) }}
8- {{ $expand = (and (eq $current.CurrentSection .) (ne .FirstSection .)) }}
9- {{ $id := substr (sha1 .Permalink) 0 8 }}
10-
11- {{ if not .Page.Params.tocHidden }}
12- < div class ="section-container container pe-0 pt-1 ">
13- < div class ="container nav-container pe-0 d-flex w-100 {{if eq . $current}}active{{ else if $expand }}active-parent{{end}} ">
14- < a class ="d-flex w-100 border-0 " href ="{{.Permalink}} "> {{ .Title }} </ a >
15- {{ if and .IsSection (ne .FirstSection .) }}
16- {{/* Don't put an expand icon on pages that aren't sections or the section index */}}
17- < div class ="d-flex flex-shrink-1 sidebar-control-container align-self-center ">
18- < input type ="checkbox " class ="d-flex sidebar-checkbox " {{if $expand}}checked{{ end }} aria-label ="Close or Expand {{.Title}} Section " />
19- < label for ="collapse-{{$id}} " class ="sidebar-label {{if not $expand}} collapsed {{ end }} " data-bs-toggle ="collapse " data-bs-target ="#collapse-{{$id}} " aria-expanded ="false " aria-label ="Close or Expand {{.Title}} Section ">
20- < svg class ="flex bi sidebar-icon plus " > < use xlink:href ="#plus "> </ use > </ svg >
21- < svg class ="flex bi sidebar-icon x " > < use xlink:href ="#x "> </ use > </ svg >
3+ {{ with .Site.GetPage "section" .Section }} {{ $sectionPages := (.Pages |
4+ append .) }} {{ range $sectionPages.ByWeight }} {{ $expand := (eq $current
5+ .) }} {{ $expand = (and (eq $current.CurrentSection .) (ne .FirstSection .))
6+ }} {{ $id := substr (sha1 .Permalink) 0 8 }} {{ if not
7+ .Page.Params.tocHidden }}
8+ < div class ="section-container container pe-0 pt-1 ">
9+ < div
10+ class ="container nav-container pe-0 d-flex w-100 {{if eq . $current}}active{{ else if $expand }}active-parent{{end}} "
11+ {{ if and .IsSection (ne .FirstSection .) (gt (len .Pages) 0) }}data-bs-toggle ="collapse " data-bs-target ="#collapse-{{$id}} " aria-expanded ="{{if $expand}}true{{else}}false{{end}} "{{ end }}
12+ >
13+ {{ if .Page.Params.nolink }}
14+ < span class ="d-flex w-100 border-0 "> {{ .Title }} </ span >
15+ {{ else }}
16+ < a class ="d-flex w-100 border-0 " href ="{{.Permalink}} "
17+ > {{ .Title }}
18+ </ a >
19+ {{ end }} {{ if and .IsSection (ne .FirstSection .) }} {{/* Don't
20+ put an expand icon on pages that aren't sections or the section
21+ index */}}
22+ < div
23+ class ="d-flex flex-shrink-1 sidebar-control-container align-self-center "
24+ >
25+ < input
26+ type ="checkbox "
27+ class ="d-flex sidebar-checkbox "
28+ {{if
29+ $expand}}checked{{
30+ end
31+ }}
32+ aria-label ="Close or Expand {{.Title}} Section "
33+ />
34+ < label
35+ class ="sidebar-label {{if not $expand}} collapsed {{ end }} "
36+ >
37+ < svg class ="flex bi sidebar-icon plus ">
38+ < use xlink:href ="#plus "> </ use >
39+ </ svg >
40+ < svg class ="flex bi sidebar-icon x ">
41+ < use xlink:href ="#x "> </ use >
42+ </ svg >
2243 </ label >
23- </ div >
44+ </ div >
2445 {{ end }}
25- </ div >
26- {{ if ne .FirstSection . }}
27- {{ range .Pages }}
28- {{ if not .Page.Params.tocHidden }}
29- < div class ="container flex-row collapse {{if $expand}} show {{ end }} " id ="collapse-{{$id }} ">
30- < div class ="d-flex flex-column ">
31- < a class ="bd-links d-flex {{if eq $current . }}active{{end}} " href ="{{ .Permalink }} "> {{.Title }}</ a >
32- </ div >
33- </ div >
34- {{ end }}
35- {{ end }}
36- {{ end }}
3746 </ div >
38- {{ end }}
39- {{ end }}
40- {{ end }}
41-
42- {{ if not ($.Param "docs") }}
43- {{ partialCached "sidebar/user-docs" . }}
44- {{ end }}
45-
46- {{ if ne .Page.Params.product "Contributing Guide" }}
47- {{ partialCached "sidebar/contributing-guide" . }}
48- {{ end }}
49-
50- {{ partialCached "sidebar/roadmap" . }}
51- </ nav >
47+ {{ if ne .FirstSection . }} {{ range .Pages }} {{ if not
48+ .Page.Params.tocHidden }}
49+ < div
50+ class ="container flex-row collapse {{if $expand}} show {{ end }} "
51+ id ="collapse-{{$id }} "
52+ >
53+ < div class ="d-flex flex-column ">
54+ < a
55+ class ="bd-links d-flex {{if eq $current . }}active{{end}} "
56+ href ="{{ .Permalink }} "
57+ > {{.Title }}</ a
58+ >
59+ </ div >
60+ </ div >
61+ {{ end }} {{ end }} {{ end }}
62+ </ div >
63+ {{ end }} {{ end }} {{ end }} {{ if not ($.Param "docs") }} {{ partialCached
64+ "sidebar/user-docs" . }} {{ end }} {{ if ne .Page.Params.product
65+ "Contributing Guide" }} {{ partialCached "sidebar/contributing-guide" . }}
66+ {{ end }} {{ partialCached "sidebar/roadmap" . }}
67+ </ nav >
0 commit comments