mirror of
https://github.com/janishutz/libreevent.git
synced 2026-09-22 13:15:25 +02:00
fix navbar & path highlighting
This commit is contained in:
1 parent
1b794e0742
commit
2d6911b324
26 files changed
+436
-265
No files matched your search
Vendored
+6
-1
@@ -30,10 +30,15 @@
|
||||
} else {
|
||||
$( '.nav-wrapper' ).css( 'display', 'none' );
|
||||
}
|
||||
|
||||
if ( location.pathname === '/' ) {
|
||||
$( '#home' ).removeClass( 'inactive' );
|
||||
} else {
|
||||
} else if( !location.pathname.substring( 1, location.pathname.length - 1 ).includes( '/' ) ) {
|
||||
$( '#' + location.pathname.slice( 1, location.pathname.length - 1 ) ).removeClass( 'inactive' );
|
||||
} else if ( location.pathname.slice( 1, location.pathname.substring( 1 ).indexOf( '/' ) + 1 ) === 'docs' ) {
|
||||
$( '#docs' ).removeClass( 'inactive' );
|
||||
} else {
|
||||
console.error( 'an error occurred whilst highlighting the path' );
|
||||
}
|
||||
sessionStorage.setItem( 'menuOpen', 'false' );
|
||||
} );
|
||||
|
||||
Reference in new issue
Block a user