mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-05-31 14:04:14 +00:00
deploy: bcd4b2694b
This commit is contained in:
parent
d171066c37
commit
c2801b9776
310 changed files with 6476 additions and 6472 deletions
js
|
@ -427,6 +427,7 @@ function initToc(){
|
|||
function showToc(){
|
||||
var b = document.querySelector( 'body' );
|
||||
b.classList.toggle( 'toc-flyout' );
|
||||
pst && pst.update();
|
||||
}
|
||||
|
||||
document.querySelector( '#sidebar-overlay' ).addEventListener( 'click', showNav );
|
||||
|
@ -434,10 +435,12 @@ function initToc(){
|
|||
document.querySelector( '#toc-overlay' ).addEventListener( 'click', showToc );
|
||||
var t = document.querySelector( '#toc-menu' );
|
||||
var p = document.querySelector( '.progress' );
|
||||
var pst;
|
||||
if( t && p ){
|
||||
// we may not have a toc
|
||||
t.addEventListener( 'click', showToc );
|
||||
p.addEventListener( 'click', showToc );
|
||||
pst = new PerfectScrollbar('#TableOfContents');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue