mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 13:24:24 +00:00
update docs website
This commit is contained in:
1
website/dist/docs/js/index.js
vendored
1
website/dist/docs/js/index.js
vendored
@@ -1,7 +1,6 @@
|
||||
$( document ).ready( function () {
|
||||
$( '#nav' ).load( '/nav.html' );
|
||||
$( '#side-bar' ).load( '/docs/side-bar.html' );
|
||||
$( '#footer' ).load( '/footer.html' );
|
||||
} );
|
||||
|
||||
let btn = document.getElementById( 'backToTop' );
|
||||
|
||||
29
website/dist/docs/js/nav.js
vendored
29
website/dist/docs/js/nav.js
vendored
@@ -1,3 +1,28 @@
|
||||
function toggleList( element ) {
|
||||
$( '#' + element ).slideToggle();
|
||||
}
|
||||
$( '#' + element + '-dropdown' ).slideToggle();
|
||||
}
|
||||
|
||||
$( document ).ready( function () {
|
||||
if ( location.pathname.substring( 6 ) ) {
|
||||
let id = '';
|
||||
let path = location.pathname.substring( 6, location.pathname.length - 1 );
|
||||
for ( let letter in path ) {
|
||||
if ( path[ letter ] === '/' ) {
|
||||
id += '-';
|
||||
} else {
|
||||
id += path[ letter ];
|
||||
}
|
||||
}
|
||||
|
||||
if ( path.lastIndexOf( '/' ) >= 0 ) {
|
||||
$( '#' + path.slice( 0, path.lastIndexOf( '/' ) ) + '-dropdown' ).slideDown();
|
||||
$( '#' + path.slice( 0, path.lastIndexOf( '/' ) ) + 'Nav' ).addClass( 'active' );
|
||||
} else {
|
||||
$( '#' + path + '-dropdown' ).slideDown();
|
||||
$( '#' + path + 'Nav' ).addClass( 'active' );
|
||||
}
|
||||
$( '#' + id ).addClass( 'active' );
|
||||
} else {
|
||||
$( '#docs-home' ).addClass( 'active' );
|
||||
}
|
||||
} );
|
||||
Reference in New Issue
Block a user