hexo-theme-solitude 1.7.10 → 1.7.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -111,7 +111,7 @@ script.
|
|
111
111
|
)(window)
|
112
112
|
|
113
113
|
console.log(
|
114
|
-
"%c Program: Hexo %c Theme: Solitude %c Version: v1.7.
|
114
|
+
"%c Program: Hexo %c Theme: Solitude %c Version: v1.7.11",
|
115
115
|
"border-radius:5px 0 0 5px;padding: 5px 10px;color:white;background:#ff3842;",
|
116
116
|
"padding: 5px 10px;color:white;background:#3e9f50;",
|
117
117
|
"border-radius:0 5px 5px 0;padding: 5px 10px;background:#0084ff;color:white;"
|
package/package.json
CHANGED
package/scripts/tags/gallery.js
CHANGED
@@ -28,7 +28,7 @@ const gallery = (args, content) => {
|
|
28
28
|
}
|
29
29
|
html += `<div class="gallery-item"><img class="nolazyload" src=${m[2]} alt="${m[1]}" /></div>`
|
30
30
|
}
|
31
|
-
return `<div class="gallery-container
|
31
|
+
return `<div class="gallery-container waterfall">
|
32
32
|
${html}
|
33
33
|
</div>`
|
34
34
|
}
|
package/source/js/main.js
CHANGED
@@ -30,7 +30,7 @@ const sidebarFn = () => {
|
|
30
30
|
if (utils.isHidden($toggleMenu)) {
|
31
31
|
if ($mobileSidebarMenus.classList.contains('open')) closeMobileSidebar()
|
32
32
|
}
|
33
|
-
sco.
|
33
|
+
sco.refreshWaterFall();
|
34
34
|
})
|
35
35
|
}
|
36
36
|
|
@@ -329,14 +329,11 @@ let sco = {
|
|
329
329
|
const el = document.getElementById('console')
|
330
330
|
el && el.classList.remove('show')
|
331
331
|
},
|
332
|
-
|
333
|
-
const
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
el.classList.add('show');
|
338
|
-
}, 500);
|
339
|
-
})();
|
332
|
+
refreshWaterFall: function () {
|
333
|
+
const els = document.querySelectorAll('.waterfall')
|
334
|
+
if (els.length !== 0) {
|
335
|
+
els.forEach(el => waterfall(el) || el.classList.add('show'))
|
336
|
+
}
|
340
337
|
},
|
341
338
|
addRuntime: function () {
|
342
339
|
let el = document.getElementById('runtimeshow')
|
@@ -461,17 +458,13 @@ let sco = {
|
|
461
458
|
categoryBarItems.forEach(item => {
|
462
459
|
item.classList.remove("select");
|
463
460
|
});
|
464
|
-
|
465
|
-
if (decodedPath === "/") {
|
466
|
-
if (categoryBar) {
|
461
|
+
if (decodedPath === "/") {
|
467
462
|
const homeItem = document.getElementById("category-bar-home");
|
468
463
|
homeItem.classList.add("select");
|
469
|
-
}
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
category = category.charAt(0).toUpperCase() + category.slice(1);
|
474
|
-
if (categoryBar) {
|
464
|
+
} else {
|
465
|
+
if (/\/categories\/.*?\//.test(decodedPath)) {
|
466
|
+
let category = decodedPath.split("/").slice(-2, -1)[0];
|
467
|
+
category = category.charAt(0).toUpperCase() + category.slice(1);
|
475
468
|
const categoryItem = document.getElementById(category);
|
476
469
|
if (categoryItem) {
|
477
470
|
categoryItem.classList.add("select");
|
@@ -831,18 +824,21 @@ class tabs {
|
|
831
824
|
}
|
832
825
|
}
|
833
826
|
|
827
|
+
sco.initAdjust()
|
828
|
+
initObserver()
|
829
|
+
addCopyright()
|
830
|
+
sco.initConsoleState()
|
831
|
+
|
834
832
|
window.refreshFn = () => {
|
833
|
+
document.body.setAttribute('data-type', PAGE_CONFIG.page)
|
835
834
|
if (PAGE_CONFIG.is_home || PAGE_CONFIG.is_page) {
|
836
835
|
sco.changeTimeFormat(document.querySelectorAll('#recent-posts time, .webinfo-item time'))
|
837
836
|
GLOBAL_CONFIG.runtime && sco.addRuntime()
|
838
837
|
} else {
|
839
838
|
sco.changeTimeFormat(document.querySelectorAll('#post-meta time'))
|
840
839
|
}
|
841
|
-
|
842
|
-
sco.initAdjust()
|
843
840
|
scrollFn()
|
844
841
|
sidebarFn()
|
845
|
-
initObserver()
|
846
842
|
sco.hideCookie()
|
847
843
|
sco.addPhotoFigcaption()
|
848
844
|
sco.setTimeState()
|
@@ -850,19 +846,16 @@ window.refreshFn = () => {
|
|
850
846
|
sco.categoriesBarActive()
|
851
847
|
sco.listenToPageInputPress()
|
852
848
|
sco.addNavBackgroundInit()
|
853
|
-
sco.
|
849
|
+
sco.refreshWaterFall()
|
854
850
|
GLOBAL_CONFIG.lazyload.enable && utils.lazyloadImg()
|
855
851
|
GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll("#article-container img:not(.flink-avatar,.gallery-group img)"))
|
856
852
|
GLOBAL_CONFIG.randomlink && randomLinksList()
|
857
853
|
PAGE_CONFIG.comment && initComment()
|
858
854
|
PAGE_CONFIG.toc && toc.init();
|
859
855
|
(PAGE_CONFIG.is_post || PAGE_CONFIG.is_page) && ((addHighlight()) || tabs.init())
|
860
|
-
addCopyright()
|
861
856
|
PAGE_CONFIG.is_home && showTodayCard()
|
862
857
|
GLOBAL_CONFIG.covercolor.enable && coverColor()
|
863
|
-
sco.initConsoleState()
|
864
858
|
GLOBAL_CONFIG.comment.commentBarrage && PAGE_CONFIG.comment && initializeCommentBarrage()
|
865
|
-
document.body.setAttribute('data-type', PAGE_CONFIG.page)
|
866
859
|
PAGE_CONFIG.page === "music" && scoMusic.init()
|
867
860
|
GLOBAL_CONFIG.post_ai && PAGE_CONFIG.page === "post" && efu_ai.init()
|
868
861
|
}
|