mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 05:14:23 +00:00
fix navbar & path highlighting
This commit is contained in:
7
website/dist/nav.html
vendored
7
website/dist/nav.html
vendored
@@ -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