hexo-theme-solitude 2.0.7 → 2.0.9

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.
@@ -66,4 +66,4 @@ div#console
66
66
  div.console-btn-item.on#consoleCommentBarrage(onclick="sco.switchCommentBarrage()")
67
67
  span.commentBarrage
68
68
  i.solitude.fa-solid.fa-comment
69
- div.console-mask(onclick="sco.hideConsole()")
69
+ div.console-mask(onclick="sco.hideConsole()")
@@ -1,3 +1,5 @@
1
+ - var { information , group } = theme.footer
2
+
1
3
  if theme.post.footer.enable && is_post()
2
4
  div#st-footer-bar
3
5
  div.footer-logo
@@ -11,26 +13,25 @@ if theme.post.footer.enable && is_post()
11
13
  if theme.post.footer.button.enable
12
14
  a.footer-bar-link(href=url_for(theme.post.footer.button.url))= theme.post.footer.button.name
13
15
  div#footer_deal
14
- - var leftInfo = theme.footer && theme.footer.information && theme.footer.information.left || {}
15
- - var rightInfo = theme.footer && theme.footer.information && theme.footer.information.right || {}
16
+ - var leftInfo = information.left || []
17
+ - var rightInfo = information.right || []
16
18
 
17
19
  each value, label in leftInfo
18
20
  - var array = value.split('||')
19
21
  a.deal_link(href=url_for(trim(array[0])), title=label)
20
22
  i.solitude(class=array[1])
21
23
 
22
- if theme.footer.information.author
24
+ if information.author
23
25
  div#footer_mini_logo.nolazyload.footer_mini_logo(title=_p('nav.backtop'), onclick="sco.toTop()")
24
- img(src=theme.site.icon, alt=_p('nav.backtop'))
26
+ img(src=information.author, alt=_p('nav.backtop'))
25
27
 
26
28
  each value, label in rightInfo
27
29
  - var array = value.split('||')
28
30
  a.deal_link(href=url_for(trim(array[0])), title=label)
29
31
  i.solitude(class=array[1])
30
32
  div#st-footer
31
- - var group = theme.footer && theme.footer.group ? theme.footer.group : {}
32
33
 
33
- each value, x in group
34
+ each value, x in group || []
34
35
  div.footer-group
35
36
  h3.footer-title= x
36
37
  div.footer-links
@@ -57,17 +58,10 @@ div#footer-bar
57
58
  each item in theme.footer.links
58
59
  a.footer-bar-link(href=url_for(item.url), alt=item.name)!= item.name
59
60
  if theme.footer.license
60
- a.footer-bar-link.cc(href=url_for(theme.footer.license), aria-label = 'copyright')
61
+ a.footer-bar-link.cc(href=url_for(theme.footer.license))
61
62
  i.solitude.fa-solid.fa-copyright
62
63
  i.solitude.fa-brands.fa-creative-commons-by
63
64
  i.solitude.fa-brands.fa-creative-commons-nc
64
65
  i.solitude.fa-brands.fa-creative-commons-nd
65
- if theme.footer.privacy
66
- div.needEndHide#cookies-window
67
- div.cookies-window-title= __('cookies.title')
68
- div.cookies-window-content
69
- span.cookies-tip= __('cookies.tip')
70
- a.cookies-link(href=url_for(theme.footer.privacy), title=_p('cookies.privacy'))
71
- i.solitude.fa-solid.fa-circle-chevron-right
72
66
  if theme.comment.use && theme.comment.commentBarrage
73
- div.comment-barrage.needEndHide
67
+ div.comment-barrage.needEndHide
@@ -1,6 +1,6 @@
1
1
  if theme.OpenGraph.enable
2
2
  -
3
- const coverVal = page.cover || theme.site.siteIcon
3
+ const coverVal = page.cover || theme.site.icon
4
4
  let ogOption = {
5
5
  type: is_post() ? 'article' : 'website',
6
6
  image: coverVal ? full_url_for(coverVal) : '',
@@ -10,4 +10,4 @@ if theme.OpenGraph.enable
10
10
  != open_graph(ogOption)
11
11
  meta(name="description" content=page_description())
12
12
  else
13
- meta(name="description" content=page_description())
13
+ meta(name="description" content=page_description())
@@ -18,5 +18,5 @@ else
18
18
  meta(name="apple-mobile-web-app-capable", content=config.title)
19
19
  meta(name="theme-color", content="var(--efu-main)")
20
20
  meta(name="apple-mobile-web-app-status-bar-style", content="var(--efu-main)")
21
- link(rel="bookmark", href=url_for(theme.site.siteIcon))
22
- link(rel="apple-touch-icon", href=url_for(theme.site.siteIcon), sizes="180x180")
21
+ link(rel="bookmark", href=url_for(theme.site.icon))
22
+ link(rel="apple-touch-icon", href=url_for(theme.site.icon), sizes="180x180")
@@ -17,7 +17,7 @@ meta(name="viewport" content="width=device-width, initial-scale=1")
17
17
 
18
18
  title= title + subtitle
19
19
  noscript= _p('head.noscript')
20
- link(rel="icon", href=url_for(theme.site.siteIcon))
20
+ link(rel="icon", href=url_for(theme.site.icon))
21
21
 
22
22
  // index.css
23
23
  link(rel="stylesheet", href=url_for(theme.cdn.main_css))
@@ -29,4 +29,4 @@ include ./inject/head.pug
29
29
  include ./head/config.pug
30
30
 
31
31
  // page-config head
32
- include ./head/page_config
32
+ include ./head/page_config
@@ -55,4 +55,4 @@ html(lang=config.language, data-theme="light")
55
55
 
56
56
  // music
57
57
  if theme.capsule.enable
58
- include ./widgets/third-party/music.pug
58
+ include ./widgets/third-party/music.pug
@@ -9,14 +9,16 @@ script.
9
9
  if (!preloader.isLoaded) {
10
10
  document.getElementById('loading-box').classList.add('loaded');
11
11
  preloader.isLoaded = true;
12
+ preloader.togglePaceDone();
12
13
  }
13
14
  },
14
15
  initLoading: () => {
15
16
  document.getElementById('loading-box').classList.remove('loaded');
16
17
  preloader.isLoaded = false;
18
+ preloader.togglePaceDone();
17
19
  },
18
- removePaceDone: () => {
19
- document.getElementById('body').classList = 'pace-done';
20
+ togglePaceDone: () => {
21
+ document.getElementById('body').className = preloader.isLoaded ? 'pace-done' : '';
20
22
  }
21
23
  }
22
24
 
@@ -6,4 +6,4 @@ h1.page-title= _p('page.category')
6
6
  span.tags-punctuation
7
7
  i.solitude.fa-solid.fa-hashtag
8
8
  = item.name
9
- span.tagsPageCount= item.length
9
+ span.tagsPageCount= item.length
@@ -6,4 +6,4 @@ h1.page-title= __('page.tag')
6
6
  span.tags-punctuation
7
7
  i.solitude.fa-solid.fa-hashtag
8
8
  = tag.name
9
- span.tagsPageCount= tag.length
9
+ span.tagsPageCount= tag.length
@@ -1,7 +1,7 @@
1
1
  - award = site.data.about.award
2
2
 
3
3
  - var sum = 0
4
- if site.data.about.rewardList
4
+ if site.data.about.rewardList && site.data.about.award.enable
5
5
  .author-content
6
6
  .author-content-item.single.reward
7
7
  .author-content-item-tips= _p('award.thanks')
@@ -36,4 +36,4 @@ if site.data.about.rewardList
36
36
  img.post-qr-code-img(alt=reward.name, src=reward.qcode, style="border-color:" + reward.color)
37
37
  .post-qr-code-desc= reward.name
38
38
  .reward-list-tips
39
- p= award.tips.replace('{sum}', sum.toFixed(2))
39
+ p= award.tips.replace('{sum}', sum.toFixed(2))
@@ -36,4 +36,4 @@ script.
36
36
  if (e.request.status === 404) {
37
37
  pjax.loadUrl('/404.html')
38
38
  }
39
- })
39
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-solitude",
3
- "version": "2.0.7",
3
+ "version": "2.0.9",
4
4
  "description": "A beautiful, powerful, and efficient Hexo theme developed by EverFu.",
5
5
  "main": "package.json",
6
6
  "scripts": {
@@ -28,8 +28,5 @@
28
28
  },
29
29
  "homepage": "https://everfu.github.io/Solitude/",
30
30
  "author": "Hexo-Theme-Solitude<o@everfu.org>",
31
- "license": "MIT",
32
- "devDependencies": {
33
- "@types/node": "^22.0.0"
34
- }
31
+ "license": "MIT"
35
32
  }
package/plugins.yml CHANGED
@@ -13,7 +13,7 @@ pjax:
13
13
  twikoo:
14
14
  name: twikoo
15
15
  file: dist/twikoo.all.min.js
16
- version: 1.6.38
16
+ version: 1.6.39
17
17
  waline_js:
18
18
  name: '@waline/client'
19
19
  file: dist/waline.js
@@ -28,4 +28,4 @@ function getRandomInt(min, max) {
28
28
  min = Math.ceil(min);
29
29
  max = Math.floor(max);
30
30
  return Math.floor(Math.random() * (max - min)) + min;
31
- }
31
+ }
@@ -11,4 +11,4 @@ hexo.extend.helper.register('getArchiveLength', function (type) {
11
11
  archive[postdate] = (archive[postdate] || 0) + 1;
12
12
  }
13
13
  return archive;
14
- });
14
+ });
@@ -408,6 +408,9 @@ button.el-button.tk-cancel.el-button--default.el-button--small
408
408
  border-radius 8px !important
409
409
  color var(--efu-fontcolor) !important
410
410
 
411
+ .tk-replies .tk-content span:first-child
412
+ font-size inherit
413
+ color black
411
414
 
412
415
  .OwO
413
416
  &.OwO-open
@@ -177,6 +177,12 @@
177
177
  color #fff
178
178
 
179
179
  #card-toc
180
+ &:hover
181
+ .toc-content
182
+ .toc-link:not(.active) span
183
+ if hexo-config('aside.toc.vague')
184
+ filter: blur(0)
185
+ opacity: 1
180
186
  +minWidth901()
181
187
  right 0
182
188
  padding .5rem
@@ -212,28 +218,20 @@
212
218
  .toc-item.active > .toc-child
213
219
  display block
214
220
 
215
- &:hover
216
- .toc-content
217
- .toc-link:not(.active) span
218
- if hexo-config('aside.toc.vague')
219
- filter: blur(0)
220
- opacity: 1
221
-
222
221
  .toc-item.active .toc-link
223
222
  opacity 1
224
223
  border-radius 8px
225
224
 
226
225
  .toc-link
226
+ transition all .2s ease-in-out 0s
227
227
  line-height 24px
228
228
  padding 8px
229
- border-left 0 solid transparent
230
229
  border-radius 12px
231
230
  color var(--efu-secondtext)
232
- cursor default
233
231
  min-height 40px
234
232
  display flex
235
233
  align-items center
236
- transition all .2s ease-in-out 0s
234
+ cursor pointer
237
235
 
238
236
  &.active
239
237
  border-radius 12px
@@ -243,6 +241,9 @@
243
241
  font-weight 700
244
242
  font-size 20px
245
243
 
244
+ &:hover
245
+ background-color var(--efu-main-op-light)
246
+
246
247
  &:not(.active) span
247
248
  opacity .6
248
249
  cursor pointer
@@ -250,9 +251,6 @@
250
251
  filter blur(1px)
251
252
  transition .3s
252
253
 
253
- &:hover
254
- color var(--efu-lighttext)
255
-
256
254
  [data-theme=dark]
257
255
  .toc
258
256
  .toc-item.active .toc-link .toc-text
@@ -1055,9 +1053,11 @@ if hexo-config('aside.newest_comment.enable')
1055
1053
  .recent-comment-more
1056
1054
  margin-left auto
1057
1055
  margin-right .5rem
1056
+
1058
1057
  &:hover
1059
1058
  color var(--efu-lighttext)
1060
1059
  transition .3s
1060
+
1061
1061
  .aside-list-item
1062
1062
  padding: .5rem
1063
1063
  width: 100%
@@ -1066,6 +1066,7 @@ if hexo-config('aside.newest_comment.enable')
1066
1066
  height: 80px
1067
1067
  transition: .3s
1068
1068
  position: relative
1069
+
1069
1070
  &:not(:last-child)
1070
1071
  border-bottom 1px dashed rgba(255, 255, 255, .1)
1071
1072
 
@@ -1088,6 +1089,7 @@ if hexo-config('aside.newest_comment.enable')
1088
1089
  transition .3s
1089
1090
  -webkit-box-orient vertical
1090
1091
  cursor pointer
1092
+
1091
1093
  &:hover
1092
1094
  color var(--efu-lighttext)
1093
1095
  transition .3s
@@ -1095,4 +1097,4 @@ if hexo-config('aside.newest_comment.enable')
1095
1097
  .datetime
1096
1098
  font-size 12px
1097
1099
  color var(--efu-secondtext)
1098
- margin-top auto
1100
+ margin-top auto
@@ -230,49 +230,3 @@
230
230
 
231
231
  > div > div.footer-bar-left > span
232
232
  margin-right 1rem
233
-
234
- #cookies-window
235
- min-width 300px
236
- background var(--efu-maskbgdeep)
237
- color var(--efu-fontcolor)
238
- padding 8px 16px
239
- display flex
240
- flex-direction column
241
- bottom 20px
242
- right 20px
243
- position fixed
244
- border-radius 12px
245
- transition .3s
246
- z-index 8
247
- user-select none
248
- backdrop-filter saturate(180%) blur(20px)
249
- transform translateZ(0)
250
- border var(--style-border)
251
- animation barrageIn .6s cubic-bezier(.42, 0, .3, 1.11)
252
-
253
- +maxWidth1300()
254
- display none
255
-
256
- &.cw-hide
257
- opacity 0
258
- animation barrageOut .6s cubic-bezier(.42, 0, .3, 1.11)
259
- z-index -1
260
-
261
- .cookies-window-title
262
- padding-bottom 4px
263
- border-bottom var(--style-border)
264
- font-size 12px
265
- font-weight 700
266
-
267
- .cookies-window-content
268
- font-size 14px
269
- display flex
270
- justify-content space-around
271
- align-items center
272
-
273
- .cookies-link
274
- margin-left: 10px
275
- font-size: 16px
276
-
277
- i.solitude
278
- font-size 16px
@@ -176,13 +176,17 @@
176
176
  margin-bottom 60px
177
177
 
178
178
  a
179
- color var(--efu-fontcolor) !important
179
+ color var(--efu-fontcolor)
180
180
  padding 2px 8px 2px 12px
181
181
  border-radius 8px
182
182
  border var(--style-border-always)
183
183
  background var(--efu-card-bg)
184
184
  font-size 14px !important
185
185
 
186
+ &:hover
187
+ background var(--efu-main)
188
+ color var(--efu-white)
189
+
186
190
  sup
187
191
  opacity .6
188
192
  margin-left 4px
@@ -200,6 +204,12 @@
200
204
 
201
205
  span.darkmode_switchbutton
202
206
  padding 4px 8px
207
+ cursor pointer
208
+ transition all .5s ease 0s
209
+
210
+ &:hover
211
+ background var(--efu-main)
212
+ color var(--efu-white)
203
213
 
204
214
  [data-theme="dark"] &
205
215
  background var(--efu-orange)
@@ -237,4 +247,4 @@
237
247
  color var(--efu-fontcolor)
238
248
 
239
249
  #toggle-sidebar
240
- bottom 80px
250
+ bottom 80px
@@ -90,6 +90,7 @@
90
90
  transition .3s
91
91
  position relative
92
92
  box-shadow var(--efu-shadow-border)
93
+ min-width fit-content
93
94
 
94
95
  &:nth-last-child(2):nth-child(1),
95
96
  &:nth-last-child(1):nth-child(2)
@@ -58,7 +58,7 @@
58
58
  padding .5rem
59
59
  text-align center
60
60
  font-size 14px
61
- font-family "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif
61
+ font-family "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei"
62
62
 
63
63
  +maxWidth768()
64
64
  width 100%
@@ -142,4 +142,4 @@
142
142
  font-weight 700
143
143
 
144
144
  .content time
145
- display none
145
+ display none
@@ -9,6 +9,7 @@ div.console_recentcomments
9
9
  .comment-card
10
10
  position relative
11
11
  width calc(100% / 3 - 8px)
12
+ min-width fit-content
12
13
  background var(--efu-card-bg)
13
14
  border-radius 12px
14
15
  border var(--style-border-always)
@@ -85,4 +86,4 @@ span.comment-user
85
86
  time.comment-time
86
87
  font-size 12px
87
88
  color var(--efu-secondtext)
88
- margin-left auto
89
+ margin-left auto
package/source/js/main.js CHANGED
@@ -134,15 +134,6 @@ const sco = {
134
134
  lastSayHello: "",
135
135
  wasPageHidden: false,
136
136
  musicPlaying: false,
137
- hideCookie() {
138
- const cookiesWindow = document.getElementById("cookies-window");
139
- if (cookiesWindow) {
140
- setTimeout(() => {
141
- cookiesWindow.classList.add("cw-hide");
142
- setTimeout(() => cookiesWindow.style.display = "none", 1000);
143
- }, 3000);
144
- }
145
- },
146
137
  scrollTo(elementId) {
147
138
  const targetElement = document.getElementById(elementId);
148
139
  if (targetElement) {
@@ -673,7 +664,7 @@ window.refreshFn = () => {
673
664
  document.body.setAttribute('data-type', page);
674
665
  sco.changeTimeFormat(document.querySelectorAll(timeSelector));
675
666
  runtime && sco.addRuntime();
676
- [scrollFn, sidebarFn, sco.hideCookie, sco.addPhotoFigcaption, sco.setTimeState, sco.tagPageActive, sco.categoriesBarActive, sco.listenToPageInputPress, sco.addNavBackgroundInit, sco.refreshWaterFall].forEach(fn => fn());
667
+ [scrollFn, sidebarFn, sco.addPhotoFigcaption, sco.setTimeState, sco.tagPageActive, sco.categoriesBarActive, sco.listenToPageInputPress, sco.addNavBackgroundInit, sco.refreshWaterFall].forEach(fn => fn());
677
668
  lazyload.enable && utils.lazyloadImg();
678
669
  lightbox && utils.lightbox(document.querySelectorAll("#article-container img:not(.flink-avatar,.gallery-group img)"));
679
670
  randomlink && randomLinksList();
Binary file