hexo-theme-solitude 2.1.1 → 2.1.2
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.
- package/_config.yml +6 -9
- package/languages/zh-CN.yml +1 -1
- package/languages/zh-TW.yml +1 -1
- package/layout/includes/widgets/post/copyright.pug +3 -3
- package/layout/includes/widgets/third-party/news-comment/newest-comment.pug +1 -1
- package/package.json +1 -1
- package/source/css/_layout/article-container.styl +5 -5
- package/source/css/_layout/aside.styl +3 -3
- package/source/css/_layout/rightside.styl +1 -1
- package/source/css/_page/_home/home-top.styl +0 -5
- package/source/css/_page/equipment.styl +0 -1
- package/source/css/_page/other.styl +1 -0
- package/source/css/_page/recentcomment.styl +2 -2
- package/source/css/_post/commentBarrage.styl +4 -1
- package/source/css/_post/copyright.styl +2 -1
- package/source/css/_post/meta.styl +1 -0
- package/source/css/_tags/tabs.styl +1 -1
- package/source/js/main.js +11 -8
- package/source/js/right_menu.js +1 -0
- package/source/js/third_party/waterfall.min.js +1 -1
- package/source/js/utils.js +0 -1
package/_config.yml
CHANGED
@@ -169,15 +169,6 @@ aside:
|
|
169
169
|
backcolor: "var(--efu-blue)" # Background color
|
170
170
|
# --------------------------- end ---------------------------
|
171
171
|
|
172
|
-
# --------------------------- start ---------------------------
|
173
|
-
# recent comments(⚠️ Comments need to be configured first.)
|
174
|
-
# 最新评论(⚠️ 需要先配置评论)
|
175
|
-
newest_comment:
|
176
|
-
enable: true
|
177
|
-
storage: .5 # 缓存时间 1: 1天 / .5 : 半天 / Cache time 1: 1 day .5 : half a day
|
178
|
-
limit: 5 # 评论数 / Number of comments
|
179
|
-
# --------------------------- end ---------------------------
|
180
|
-
|
181
172
|
# --------------------------- start ---------------------------
|
182
173
|
# article table of contents
|
183
174
|
# 文章目录
|
@@ -727,6 +718,12 @@ comment:
|
|
727
718
|
enable: false
|
728
719
|
# Number of hot comments
|
729
720
|
count: 3
|
721
|
+
# recent comments(⚠️ Comments need to be configured first.)
|
722
|
+
# 最新评论(⚠️ 需要先配置评论)
|
723
|
+
newest_comment:
|
724
|
+
enable: true
|
725
|
+
storage: .5 # 缓存时间 1: 1天 / .5 : 半天 / Cache time 1: 1 day .5 : half a day
|
726
|
+
limit: 5 # 评论数 / Number of comments
|
730
727
|
# Twikoo: https://solitude.js.org/comment/twikoo
|
731
728
|
twikoo: # https://twikoo.js.org/
|
732
729
|
envId: # url: https://twikoo.sondy.top/
|
package/languages/zh-CN.yml
CHANGED
package/languages/zh-TW.yml
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
.post-copyright
|
3
3
|
.post-copyright__author_group
|
4
4
|
a.post-copyright__author_img(href=url_for(copyright.author.url))
|
5
|
-
img.post-copyright__author_img_front(src=copyright.author.img || theme.site.icon)
|
6
|
-
.post-copyright__author_name= config.title
|
7
|
-
.post-copyright__author_desc= config.subtitle
|
5
|
+
img.post-copyright__author_img_front(src=page.avatar || copyright.author.img || theme.site.icon)
|
6
|
+
.post-copyright__author_name= page.author || config.title
|
7
|
+
.post-copyright__author_desc= page.desc || config.subtitle
|
8
8
|
.post-tools#post-tools
|
9
9
|
.post-tools-left
|
10
10
|
#quit-box(onclick="RemoveRewardMask()")
|
package/package.json
CHANGED
@@ -136,13 +136,13 @@
|
|
136
136
|
|
137
137
|
&:before
|
138
138
|
margin 0
|
139
|
-
top
|
140
|
-
width
|
141
|
-
height
|
142
|
-
border-radius
|
139
|
+
top .9em
|
140
|
+
width .2em
|
141
|
+
height .2em
|
142
|
+
border-radius 50%
|
143
143
|
background 0 0
|
144
144
|
content ""
|
145
|
-
line-height .
|
145
|
+
line-height .2em
|
146
146
|
border 0.21em solid var(--efu-lighttext)
|
147
147
|
background var(--efu-lighttext)
|
148
148
|
|
@@ -193,7 +193,7 @@
|
|
193
193
|
+maxWidth1200()
|
194
194
|
position: fixed
|
195
195
|
right: 3rem
|
196
|
-
bottom:
|
196
|
+
bottom: 10px
|
197
197
|
z-index: 100
|
198
198
|
max-width: 380px
|
199
199
|
max-height: calc(100% - 60px)
|
@@ -1040,7 +1040,7 @@ backcolor = convert(hexo-config('aside.flip.backcolor'))
|
|
1040
1040
|
.card-widget.card-adsense
|
1041
1041
|
padding 0
|
1042
1042
|
|
1043
|
-
if hexo-config('
|
1043
|
+
if hexo-config('comment.newest_comment.enable')
|
1044
1044
|
.card-recent-comment
|
1045
1045
|
.recent-comment-more
|
1046
1046
|
margin-left auto
|
@@ -1060,7 +1060,7 @@ if hexo-config('aside.newest_comment.enable')
|
|
1060
1060
|
position: relative
|
1061
1061
|
|
1062
1062
|
&:not(:last-child)
|
1063
|
-
border-bottom
|
1063
|
+
border-bottom var(--style-border-dashed)
|
1064
1064
|
|
1065
1065
|
.thumbnail img
|
1066
1066
|
width: 60px
|
@@ -1,7 +1,7 @@
|
|
1
1
|
div.console_recentcomments
|
2
2
|
display flex
|
3
3
|
flex-wrap wrap
|
4
|
-
gap
|
4
|
+
gap 12px
|
5
5
|
min-height 100px
|
6
6
|
width 100%
|
7
7
|
|
@@ -15,7 +15,7 @@ div.console_recentcomments
|
|
15
15
|
cursor pointer
|
16
16
|
transition .3s
|
17
17
|
overflow hidden
|
18
|
-
gap
|
18
|
+
gap .5rem
|
19
19
|
display flex
|
20
20
|
flex-direction column
|
21
21
|
|
package/source/js/main.js
CHANGED
@@ -151,14 +151,14 @@ const sco = {
|
|
151
151
|
}
|
152
152
|
},
|
153
153
|
musicToggle() {
|
154
|
-
const $music = document.querySelector('#nav-music');
|
155
|
-
const $meting = document.querySelector('meting-js');
|
156
|
-
const $console = document.getElementById('consoleMusic');
|
157
|
-
const $rm_text = document.querySelector('#menu-music-toggle span');
|
158
|
-
const $rm_icon = document.querySelector('#menu-music-toggle i');
|
154
|
+
const $music = document.querySelector('#nav-music') || null;
|
155
|
+
const $meting = document.querySelector('meting-js') || null;
|
156
|
+
const $console = document.getElementById('consoleMusic') || null;
|
157
|
+
const $rm_text = document.querySelector('#menu-music-toggle span') || null;
|
158
|
+
const $rm_icon = document.querySelector('#menu-music-toggle i') || null;
|
159
159
|
this.musicPlaying = !this.musicPlaying;
|
160
160
|
$music.classList.toggle("playing", this.musicPlaying);
|
161
|
-
$console.classList.toggle("on", this.musicPlaying);
|
161
|
+
$console && $console.classList.toggle("on", this.musicPlaying);
|
162
162
|
if (this.musicPlaying) {
|
163
163
|
$meting.aplayer.play();
|
164
164
|
(typeof rm !== 'undefined') && rm?.menuItems.music[0] && ($rm_text.textContent = GLOBAL_CONFIG.right_menu.music.stop) && ($rm_icon.className = 'solitude fas fa-pause')
|
@@ -169,10 +169,11 @@ const sco = {
|
|
169
169
|
},
|
170
170
|
switchCommentBarrage() {
|
171
171
|
let commentBarrageElement = document.querySelector(".comment-barrage");
|
172
|
+
let consoleCommentBarrage = document.querySelector("#consoleCommentBarrage");
|
172
173
|
if (!commentBarrageElement) return;
|
173
174
|
const isDisplayed = window.getComputedStyle(commentBarrageElement).display === "flex";
|
174
175
|
commentBarrageElement.style.display = isDisplayed ? "none" : "flex";
|
175
|
-
|
176
|
+
consoleCommentBarrage && consoleCommentBarrage.classList.toggle("on", !isDisplayed);
|
176
177
|
utils.saveToLocal.set("commentBarrageSwitch", !isDisplayed, .2);
|
177
178
|
rm?.menuItems.barrage && rm.barrage(isDisplayed)
|
178
179
|
},
|
@@ -226,7 +227,9 @@ const sco = {
|
|
226
227
|
entries.forEach(entry => {
|
227
228
|
if (entry.isIntersecting) {
|
228
229
|
setTimeout(() => {
|
229
|
-
waterfall(entry.target)
|
230
|
+
waterfall(entry.target).then(() => {
|
231
|
+
entry.target.classList.add('show');
|
232
|
+
});
|
230
233
|
}, 300);
|
231
234
|
}
|
232
235
|
});
|
package/source/js/right_menu.js
CHANGED
@@ -175,6 +175,7 @@ window.oncontextmenu = (ele) => {
|
|
175
175
|
Array.from(display ? rm.menuItems.other : rm.menuItems.plugin).forEach(
|
176
176
|
(item) => (item.style.display = "none")
|
177
177
|
);
|
178
|
+
|
178
179
|
Array.from(display ? rm.menuItems.plugin : rm.menuItems.other).forEach(
|
179
180
|
(item) => (item.style.display = "block")
|
180
181
|
);
|
@@ -2,4 +2,4 @@
|
|
2
2
|
* @license Copyright 2024 Ever Funnel. All rights reserved.
|
3
3
|
* Licensed under the MIT License.
|
4
4
|
*/
|
5
|
-
function waterfall(t){function e(t,e){var n=window.getComputedStyle(t);return parseFloat(n["margin"+e])||0}function n(t){return t+"px"}function r(t){return parseFloat(t.style.top)||0}function o(t){return parseFloat(t.style.left)||0}function i(t){return t.clientWidth}function l(t){return t.clientHeight}function u(t){return r(t)+l(t)+e(t,"Bottom")}function a(t){return o(t)+i(t)+e(t,"Right")}function s(t){t.sort(function(t,e){var n=u(t),r=u(e);return n===r?o(e)-o(t):r-n})}function f(e){i(t)!==containerWidth&&(window.removeEventListener(e.type,f),waterfall(t))}"string"==typeof t&&(t=document.querySelector(t));var c=Array.from(t.children).map(function(t){return
|
5
|
+
function waterfall(t){function e(t,e){var n=window.getComputedStyle(t);return parseFloat(n["margin"+e])||0}function n(t){return t+"px"}function r(t){return parseFloat(t.style.top)||0}function o(t){return parseFloat(t.style.left)||0}function i(t){return t.clientWidth}function l(t){return t.clientHeight}function u(t){return r(t)+l(t)+e(t,"Bottom")}function a(t){return o(t)+i(t)+e(t,"Right")}function s(t){t.sort(function(t,e){var n=u(t),r=u(e);return n===r?o(e)-o(t):r-n})}function f(e){i(t)!==containerWidth&&(window.removeEventListener(e.type,f),waterfall(t))}"string"==typeof t&&(t=document.querySelector(t));var c=Array.from(t.children).map(function(t){return(t.style.position="absolute"),t});t.style.position="relative";var p=Array.from(t.querySelectorAll("img")),y=p.map(function(t){return new Promise(function(e){t.complete?e():(t.addEventListener("load",e),t.addEventListener("error",e))})});return Promise.all(y).then(function(){var r=[];c.length&&(c[0].style.top="0px",c[0].style.left=n(e(c[0],"Left")),r.push(c[0]));for(var l=1;l<c.length;l++){var p=c[l-1],y=c[l];if(!(a(p)+i(y)<=i(t)))break;y.style.top=p.style.top;y.style.left=n(a(p));r.push(y)}for(var v=r.length;v<c.length;v++){s(r);var d=c[v],h=r.pop();d.style.top=n(u(h)+e(d,"Top"));d.style.left=n(o(h));r.push(d)}s(r);var m=r[0];t.style.height=n(u(m)+e(m,"Bottom"));i(t);window.addEventListener("resize",f)})}
|