mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-18 18:33:42 +00:00
Remove muse.js
This commit is contained in:
parent
1b2b0040b4
commit
372940305c
@ -40,10 +40,6 @@ hexo.extend.filter.register('after_generate', () => {
|
||||
hexo.route.remove('js/comments-buttons.js');
|
||||
}
|
||||
|
||||
if (theme.scheme === 'Pisces' || theme.scheme === 'Gemini') {
|
||||
hexo.route.remove('js/schemes/muse.js');
|
||||
}
|
||||
|
||||
if (theme.sidebar.display === 'remove') {
|
||||
hexo.route.remove('js/sidebar.js');
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ NexT.boot.registerEvents = function() {
|
||||
|
||||
NexT.utils.registerScrollPercent();
|
||||
NexT.utils.registerCanIUseTag();
|
||||
NexT.utils.updateFooterPosition();
|
||||
|
||||
// Mobile top menu bar.
|
||||
document.querySelector('.site-nav-toggle .toggle').addEventListener('click', event => {
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
function updateFooterPosition() {
|
||||
const footer = document.querySelector('.footer');
|
||||
const containerHeight = document.querySelector('.main').offsetHeight + footer.offsetHeight;
|
||||
footer.classList.toggle('footer-fixed', containerHeight <= window.innerHeight);
|
||||
}
|
||||
|
||||
updateFooterPosition();
|
||||
window.addEventListener('resize', updateFooterPosition);
|
||||
window.addEventListener('scroll', updateFooterPosition, { passive: true });
|
||||
});
|
||||
@ -415,6 +415,19 @@ NexT.utils = {
|
||||
sidebar.classList.replace(activeClassNames[1 - index], activeClassNames[index]);
|
||||
},
|
||||
|
||||
updateFooterPosition: function() {
|
||||
if (CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') return;
|
||||
function updateFooterPosition() {
|
||||
const footer = document.querySelector('.footer');
|
||||
const containerHeight = document.querySelector('.main').offsetHeight + footer.offsetHeight;
|
||||
footer.classList.toggle('footer-fixed', containerHeight <= window.innerHeight);
|
||||
}
|
||||
|
||||
updateFooterPosition();
|
||||
window.addEventListener('resize', updateFooterPosition);
|
||||
window.addEventListener('scroll', updateFooterPosition, { passive: true });
|
||||
},
|
||||
|
||||
getScript: function(src, options = {}, legacyCondition) {
|
||||
if (typeof options === 'function') {
|
||||
return this.getScript(src, {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user