mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-18 19:00:24 +00:00
chore: update perfect-scrollbar #210
This commit is contained in:
parent
cc64579117
commit
b0ded62b1f
1 changed files with 3 additions and 5 deletions
|
@ -27,7 +27,7 @@ function getScrollBarWidth() {
|
||||||
|
|
||||||
function setMenuHeight() {
|
function setMenuHeight() {
|
||||||
$('#sidebar .highlightable').height($('#sidebar').innerHeight() - $('#header-wrapper').height() - 40);
|
$('#sidebar .highlightable').height($('#sidebar').innerHeight() - $('#header-wrapper').height() - 40);
|
||||||
$('#sidebar .highlightable').perfectScrollbar('update');
|
ps && ps.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
function fallbackMessage(action) {
|
function fallbackMessage(action) {
|
||||||
|
@ -228,6 +228,7 @@ $(window).scroll(function() {
|
||||||
|
|
||||||
})(jQuery, 'smartresize');
|
})(jQuery, 'smartresize');
|
||||||
|
|
||||||
|
var ps = null;
|
||||||
jQuery(function() {
|
jQuery(function() {
|
||||||
restoreTabSelections();
|
restoreTabSelections();
|
||||||
initMermaid();
|
initMermaid();
|
||||||
|
@ -240,20 +241,17 @@ jQuery(function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
var sidebarStatus = searchStatus = 'open';
|
var sidebarStatus = searchStatus = 'open';
|
||||||
$('#sidebar .highlightable').perfectScrollbar();
|
ps = new PerfectScrollbar('#sidebar .highlightable');
|
||||||
setMenuHeight();
|
setMenuHeight();
|
||||||
|
|
||||||
jQuery('#overlay').on('click', function() {
|
jQuery('#overlay').on('click', function() {
|
||||||
jQuery(document.body).toggleClass('sidebar-hidden');
|
jQuery(document.body).toggleClass('sidebar-hidden');
|
||||||
sidebarStatus = (jQuery(document.body).hasClass('sidebar-hidden') ? 'closed' : 'open');
|
sidebarStatus = (jQuery(document.body).hasClass('sidebar-hidden') ? 'closed' : 'open');
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
jQuery('[data-sidebar-toggle]').on('click', function() {
|
jQuery('[data-sidebar-toggle]').on('click', function() {
|
||||||
jQuery(document.body).toggleClass('sidebar-hidden');
|
jQuery(document.body).toggleClass('sidebar-hidden');
|
||||||
sidebarStatus = (jQuery(document.body).hasClass('sidebar-hidden') ? 'closed' : 'open');
|
sidebarStatus = (jQuery(document.body).hasClass('sidebar-hidden') ? 'closed' : 'open');
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
jQuery('[data-clear-history-toggle]').on('click', function() {
|
jQuery('[data-clear-history-toggle]').on('click', function() {
|
||||||
|
|
Loading…
Reference in a new issue