🎨 Finish folder structure redesign and add some scripts.
This commit is contained in:
@@ -38,17 +38,17 @@ NexT.boot.refresh = function() {
|
||||
* Need to add config option in Front-End at 'scripts/helpers/next-config.js' file.
|
||||
*/
|
||||
CONFIG.prism && window.Prism.highlightAll();
|
||||
CONFIG.mediumzoom && window.mediumZoom('.post-body :not(a) > img, .post-body > img', {
|
||||
/*CONFIG.mediumzoom && window.mediumZoom('.post-body :not(a) > img, .post-body > img', {
|
||||
background: 'var(--content-bg-color)'
|
||||
});
|
||||
});*/
|
||||
CONFIG.lazyload && window.lozad('.post-body img').observe();
|
||||
CONFIG.pangu && window.pangu.spacingPage();
|
||||
|
||||
CONFIG.exturl && NexT.utils.registerExtURL();
|
||||
NexT.utils.registerCopyCode();
|
||||
NexT.utils.registerTabsTag();
|
||||
NexT.utils.registerActiveMenuItem();
|
||||
NexT.utils.registerLangSelect();
|
||||
/*NexT.utils.registerActiveMenuItem();
|
||||
NexT.utils.registerLangSelect();*/
|
||||
NexT.utils.registerSidebarTOC();
|
||||
NexT.utils.registerPostReward();
|
||||
NexT.utils.wrapTableWithBox();
|
||||
|
||||
@@ -207,7 +207,7 @@ NexT.utils = {
|
||||
}, false);
|
||||
},
|
||||
|
||||
registerActiveMenuItem: function() {
|
||||
/*registerActiveMenuItem: function() {
|
||||
document.querySelectorAll('.menu-item a[href]').forEach(target => {
|
||||
const isSamePath = target.pathname === location.pathname || target.pathname === location.pathname.replace('index.html', '');
|
||||
const isSubPath = !CONFIG.root.startsWith(target.pathname) && location.pathname.startsWith(target.pathname);
|
||||
@@ -228,7 +228,7 @@ NexT.utils = {
|
||||
window.location.href = target.dataset.href;
|
||||
});
|
||||
});
|
||||
},
|
||||
},*/
|
||||
|
||||
registerSidebarTOC: function() {
|
||||
this.sections = [...document.querySelectorAll('.post-toc li a.nav-link')].map(element => {
|
||||
|
||||
Reference in New Issue
Block a user