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 7878 < script src ="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.3.0/anchor.min.js "> </ script >
7979 < script src ="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js "> </ script >
8080 < script src ="/assets/js/app.js "> </ script >
81+ < script src ="/assets/js/navigation.js "> </ script >
8182 < script src ="/assets/js/search.js "> </ script >
8283</ body >
8384</ html >
Original file line number Diff line number Diff line change @@ -5,19 +5,4 @@ $(() => {
55
66 // highlight.js
77 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- } )
238} ) ;
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