File tree Expand file tree Collapse file tree 4 files changed +23
-2
lines changed Expand file tree Collapse file tree 4 files changed +23
-2
lines changed Original file line number Diff line number Diff line change
1
+ document . addEventListener ( "DOMContentLoaded" , function ( ) {
2
+ function expandToCurrentPage ( ) {
3
+ var currentPage = document . getElementById ( "current-page" ) ;
4
+ if ( currentPage ) {
5
+ var parentLabel = currentPage . closest ( "li" ) ;
6
+ while ( parentLabel ) {
7
+ var checkbox = parentLabel . querySelector ( ".toggle-checkbox" ) ;
8
+ if ( checkbox ) {
9
+ checkbox . checked = true ;
10
+ }
11
+ parentLabel = parentLabel . closest ( "ul" ) . closest ( "li" ) ;
12
+ }
13
+ }
14
+ }
15
+
16
+ expandToCurrentPage ( ) ;
17
+ } )
Original file line number Diff line number Diff line change 68
68
<!-- Load Product Selector javascript -->
69
69
{{ $jsProductSelector := resources.Get "js/product-selector.js" | minify | fingerprint "sha512" }}
70
70
< script src ="{{ $jsProductSelector.RelPermalink }} " type ="text/javascript " integrity ="{{ $jsProductSelector.Data.Integrity }} "> </ script >
71
+
72
+ <!-- Load Sidebar v2 javascript -->
73
+ {{ $jsSidebarV2 := resources.Get "js/sidebar-v2.js" | minify | fingerprint "sha512" }}
74
+ < script src ="{{ $jsSidebarV2.RelPermalink }} " type ="text/javascript " integrity ="{{ $jsSidebarV2.Data.Integrity }} "> </ script >
Original file line number Diff line number Diff line change 15
15
{{ partial "sidebar-list-pages.html" (dict "context" . "currentUrl" $currentUrl) }}
16
16
{{ else if eq .Kind "page" }}
17
17
{{ if eq $currentUrl .Permalink }}
18
- < span class ="box current partial "> </ span >
18
+ < span class ="box current partial " id =" current-page " > </ span >
19
19
{{ else }}
20
20
< span class ="box-link partial "> </ span >
21
21
{{ end }}
Original file line number Diff line number Diff line change 37
37
< ul >
38
38
{{ range $products }}
39
39
< li >
40
- < a href ="{{ .url }} " target =" _blank " > {{ .title }}</ a >
40
+ < a href ="{{ .url }} "> {{ .title }}</ a >
41
41
</ li >
42
42
{{ end }}
43
43
</ ul >
You can’t perform that action at this time.
0 commit comments