File tree Expand file tree Collapse file tree 3 files changed +17
-15
lines changed Expand file tree Collapse file tree 3 files changed +17
-15
lines changed Original file line number Diff line number Diff line change 78
78
< script src ="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.3.0/anchor.min.js "> </ script >
79
79
< script src ="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js "> </ script >
80
80
< script src ="/assets/js/app.js "> </ script >
81
+ < script src ="/assets/js/navigation.js "> </ script >
81
82
< script src ="/assets/js/search.js "> </ script >
82
83
</ body >
83
84
</ html >
Original file line number Diff line number Diff line change @@ -5,19 +5,4 @@ $(() => {
5
5
6
6
// highlight.js
7
7
hljs . highlightAll ( ) ;
8
-
9
- $ ( "#navigation" ) . load ( `${ config . rootPath } navigation.html` , ( ) => {
10
- // Toggle child lists
11
- $ ( ".sidebar-sticky .icon" ) . on ( "click" , function ( ) {
12
- // FIXME: use vanilla JS and CSS instead of jQuery
13
- $ ( this ) . siblings ( "ul" ) . toggle ( 500 ) ;
14
- this . classList . toggle ( "icon-opened" ) ;
15
- } ) ;
16
-
17
- // Activate current page
18
- $ ( `.sidebar-content a[href='${ window . location . pathname } ']` )
19
- . attr ( "class" , "active-link" )
20
- . parents ( 'ul' )
21
- . show ( ) ;
22
- } )
23
8
} ) ;
Original file line number Diff line number Diff line change
1
+ $ ( ( ) => {
2
+ $ ( "#navigation" ) . load ( `${ config . rootPath } navigation.html` , ( ) => {
3
+ // Toggle child lists
4
+ $ ( ".sidebar-sticky .icon" ) . on ( "click" , function ( ) {
5
+ this . classList . toggle ( "icon-opened" ) ;
6
+ // FIXME: use vanilla JS and CSS instead of jQuery
7
+ $ ( this ) . siblings ( "ul" ) . toggle ( 500 ) ;
8
+ } ) ;
9
+
10
+ // Activate current page
11
+ $ ( `.sidebar-content a[href='${ window . location . pathname } ']` )
12
+ . attr ( "class" , "active-link" )
13
+ . parents ( 'ul' )
14
+ . show ( ) ;
15
+ } )
16
+ } ) ;
You can’t perform that action at this time.
0 commit comments