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 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/
@@ -114,7 +114,7 @@ aside:
114
114
  back: 欢迎再次回来,
115
115
  sticker: 心情贴纸
116
116
  newpost: 最近发布
117
- newcomment: 最新评论
117
+ newcomment: 最近评论
118
118
  card:
119
119
  posts: '累计文章数:'
120
120
  tags: '标签总数:'
@@ -114,7 +114,7 @@ aside:
114
114
  back: 歡迎再次回來,
115
115
  sticker: 心情貼紙
116
116
  newpost: 最近發佈
117
- newcomment: 最新評論
117
+ newcomment: 最近評論
118
118
  card:
119
119
  posts: '累計文章數:'
120
120
  tags: '標籤總數:'
@@ -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()")
@@ -1,4 +1,4 @@
1
- - var limit = theme.aside.newest_comment.limit ? theme.aside.newest_comment.limit : 5
1
+ - var limit = theme.comment.newest_comment.limit ? theme.comment.newest_comment.limit : 5
2
2
  if theme.comment.use
3
3
  case theme.comment.use[0]
4
4
  when 'Twikoo'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-solitude",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "A beautiful, powerful, and efficient Hexo theme developed by everfu.",
5
5
  "main": "package.json",
6
6
  "scripts": {
@@ -136,13 +136,13 @@
136
136
 
137
137
  &:before
138
138
  margin 0
139
- top 0.78em
140
- width 0.42em
141
- height 0.42em
142
- border-radius 0.42em
139
+ top .9em
140
+ width .2em
141
+ height .2em
142
+ border-radius 50%
143
143
  background 0 0
144
144
  content ""
145
- line-height .42em
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: 2rem
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('aside.newest_comment.enable')
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 1px dashed rgba(255, 255, 255, .1)
1063
+ border-bottom var(--style-border-dashed)
1064
1064
 
1065
1065
  .thumbnail img
1066
1066
  width: 60px
@@ -2,7 +2,7 @@ if hexo-config('rightside.enable')
2
2
  #rightside
3
3
  position: fixed
4
4
  right: -2.5rem
5
- bottom: 2.5rem
5
+ bottom: 20px
6
6
  z-index: 1000
7
7
  opacity: 0
8
8
  transition: all .5s
@@ -259,11 +259,6 @@
259
259
  flex-wrap wrap
260
260
  height 120px
261
261
 
262
- +maxWidth1200()
263
- flex-direction row
264
- left 2rem
265
- height 60px
266
-
267
262
  .banners-link-btn
268
263
  display flex
269
264
  flex-direction row
@@ -55,7 +55,6 @@
55
55
  line-height 1
56
56
  margin-bottom 8px
57
57
  white-space nowrap
58
- overflow hidden
59
58
  text-overflow ellipsis
60
59
  width fit-content
61
60
 
@@ -171,6 +171,7 @@ div#banners
171
171
  color var(--efu-white)
172
172
  overflow hidden
173
173
  margin-top 0
174
+ margin-bottom: 12px
174
175
 
175
176
  .author-content-item
176
177
  flex 4
@@ -1,7 +1,7 @@
1
1
  div.console_recentcomments
2
2
  display flex
3
3
  flex-wrap wrap
4
- gap 8px
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 8px
18
+ gap .5rem
19
19
  display flex
20
20
  flex-direction column
21
21
 
@@ -1,7 +1,10 @@
1
1
  .comment-barrage
2
2
  position fixed
3
3
  bottom 0
4
- right 20px
4
+ if hexo-config('rightside.enable')
5
+ right 2.5rem
6
+ else
7
+ right 20px
5
8
  padding 0 0 20px 10px
6
9
  display none
7
10
  flex-direction column
@@ -51,7 +51,8 @@
51
51
  text-align center
52
52
  font-size 14px
53
53
  color var(--efu-secondtext)
54
- margin-top 4px
54
+ margin 4px 10px 0
55
+ line-height 1.5
55
56
 
56
57
  .post-copyright__notice
57
58
  font-size 12px
@@ -263,6 +263,7 @@
263
263
  cursor pointer
264
264
  transition .3s
265
265
  border-radius 12px
266
+ padding: 8px
266
267
 
267
268
  &:hover
268
269
  opacity 1
@@ -47,7 +47,7 @@
47
47
  margin 16px 0 0 auto
48
48
  color #99a9bf
49
49
 
50
- margin 1rem 0 !important
50
+ margin 1rem 0
51
51
  border-radius 12px
52
52
  overflow hidden
53
53
  box-shadow var(--efu-shadow-border)
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
- document.querySelector("#consoleCommentBarrage").classList.toggle("on", !isDisplayed);
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) || entry.target.classList.add('show');
230
+ waterfall(entry.target).then(() => {
231
+ entry.target.classList.add('show');
232
+ });
230
233
  }, 300);
231
234
  }
232
235
  });
@@ -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 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))})});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)})}
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)})}
@@ -37,7 +37,6 @@
37
37
  }
38
38
  },
39
39
  snackbarShow: (text, showAction = false, duration = 5000) => {
40
- document.styleSheets[0].addRule(':root', `--efu-snackbar-time:${duration}ms!important`);
41
40
  Snackbar.show({
42
41
  text,
43
42
  showAction,