Updated to new theme of TeXt

This commit is contained in:
2021-10-25 11:59:10 -04:00
parent 47c2c2e8a1
commit 296d628d8b
318 changed files with 21116 additions and 6966 deletions
+30
View File
@@ -0,0 +1,30 @@
(function() {
var SOURCES = window.TEXT_VARIABLES.sources;
window.Lazyload.js(SOURCES.jquery, function() {
var $pageMask = $('.js-page-mask');
var $pageRoot = $('.js-page-root');
var $sidebarShow = $('.js-sidebar-show');
var $sidebarHide = $('.js-sidebar-hide');
function freeze(e) {
if (e.target === $pageMask[0]) {
e.preventDefault();
}
}
function stopBodyScrolling(bool) {
if (bool === true) {
window.addEventListener('touchmove', freeze, { passive: false });
} else {
window.removeEventListener('touchmove', freeze, { passive: false });
}
}
$sidebarShow.on('click', function() {
stopBodyScrolling(true); $pageRoot.addClass('show-sidebar');
});
$sidebarHide.on('click', function() {
stopBodyScrolling(false); $pageRoot.removeClass('show-sidebar');
});
});
})();