hexo-theme-solitude 1.7.11 → 1.7.13

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
@@ -64,6 +64,7 @@ nav:
64
64
  right:
65
65
  random: false # 随机文章跳转 / random post button
66
66
  console: false #控制台 / console
67
+ top: false # 进度球 / Progress Ball
67
68
  # 自定义按钮
68
69
  # custom button
69
70
  # 左至右
@@ -717,7 +718,7 @@ comment:
717
718
  avatar: https://cravatar.cn # Gravatar link
718
719
  newest_comment:
719
720
  enable: false
720
- storage: 421000 # 缓存时间
721
+ storage: .5 # 缓存时间 1: 1天 / .5 : 半天
721
722
  # twikoo 配置信息
722
723
  # twikoo settings
723
724
  twikoo: # https://twikoo.js.org/
@@ -26,43 +26,39 @@
26
26
 
27
27
  let comment = false
28
28
 
29
- if (theme.comment.type === 'twikoo') {
30
- comment = JSON.stringify({
29
+ if (theme.comment.enable) {
30
+ comment = {
31
31
  avatar: theme.comment.avatar,
32
- url: theme.comment.twikoo.envId,
33
- commentBarrage: theme.comment.enable,
34
- accessToken: theme.comment.twikoo.accessToken,
35
- owo: {
36
- body: '.OwO-body',
37
- item: '.OwO-items li'
38
- }
39
- })
40
- }
41
-
42
- if (theme.comment.type === 'waline') {
43
- comment = JSON.stringify({
44
- avatar: theme.comment.avatar,
45
- url: theme.comment.waline.envId,
46
- commentBarrage: theme.comment.enable,
47
- owo: {
48
- body: '.wl-emoji-popup',
49
- item: '.wl-tab-wrapper button'
50
- }
51
- })
52
- }
53
-
54
- if (theme.comment.type === 'valine') {
55
- comment = JSON.stringify({
56
- avatar: theme.comment.avatar,
57
- url: theme.comment.valine.serverURLs,
58
- commentBarrage: theme.comment.enable,
59
- appId: theme.comment.valine.appId,
60
- appKey: theme.comment.valine.appKey,
61
- owo: {
62
- body: '.vwrap',
63
- item: '.vemojis i'
64
- }
65
- })
32
+ commentBarrage: theme.comment.commentBarrage,
33
+ }
34
+ switch (theme.comment.type) {
35
+ case "twikoo":
36
+ comment.url = theme.comment.twikoo.envId
37
+ comment.accessToken = theme.comment.twikoo.accessToken
38
+ comment.owo = {
39
+ body: '.OwO-body',
40
+ item: '.OwO-items li'
41
+ }
42
+ break
43
+ case "waline":
44
+ comment.url = theme.comment.waline.envId
45
+ comment.owo = {
46
+ body: '.wl-emoji-popup',
47
+ item: '.wl-tab-wrapper button'
48
+ }
49
+ break
50
+ case "valine":
51
+ comment.url = theme.comment.valine.serverURLs
52
+ comment.appId = theme.comment.valine.appId
53
+ comment.appKey = theme.comment.valine.appKey
54
+ comment.owo = {
55
+ body: '.vwrap',
56
+ item: '.vemojis i'
57
+ }
58
+ break
59
+ default:
60
+ break
61
+ }
66
62
  }
67
63
 
68
64
  let post_ai = false
@@ -138,13 +134,13 @@
138
134
  stop: _p('right_menu.music.stop'),
139
135
  }
140
136
  }
141
- if(theme.comment.enable && theme.comment.commentBarrage){
137
+ if (theme.comment.enable && theme.comment.commentBarrage) {
142
138
  rightMenu.barrage = {
143
139
  open: _p('right_menu.barrage.open'),
144
140
  close: _p('right_menu.barrage.close')
145
141
  }
146
142
  }
147
- if(theme.right_menu.translate.enable){
143
+ if (theme.right_menu.translate.enable) {
148
144
  rightMenu.translate = {
149
145
  translateDelay: theme.right_menu.translate.translateDelay,
150
146
  defaultEncoding: theme.right_menu.translate.defaultEncoding
@@ -185,7 +181,7 @@ script.
185
181
  covercolor: {
186
182
  enable: !{theme.post.covercolor.enable}
187
183
  },
188
- comment: !{comment},
184
+ comment: !{comment ? JSON.stringify(comment) : false},
189
185
  lightbox: '!{ theme.mediumZoom ? "mediumZoom" : (theme.fancybox ? "fancybox" : "null")}',
190
186
  post_ai: !{post_ai},
191
187
  right_menu: !{rightMenu ? JSON.stringify(rightMenu) : false},
@@ -34,7 +34,7 @@ script.
34
34
  const expiryDay = ttl * 86400000
35
35
  const item = {
36
36
  value: value,
37
- expiry: now.getTime() + expiryDay,
37
+ expiry: now.getTime() + expiryDay
38
38
  }
39
39
  localStorage.setItem(key, JSON.stringify(item))
40
40
  },
@@ -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.11",
114
+ "%c Program: Hexo %c Theme: Solitude %c Version: v1.7.13",
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;"
@@ -5,8 +5,9 @@
5
5
  .author-info__sayhi#author-info__sayhi(onclick="sco.changeSayHelloText()")= _p('sayhello.morning')
6
6
  .avatar-img-group
7
7
  img.avatar-img(alt=_p('aside.avatar'), src=theme.aside.card.author.img)
8
- .avatar-sticker
9
- img.avatar-sticker-img(src=theme.aside.card.author.sticker, alt=_p('aside.sticker'))
8
+ if theme.aside.card.author.sticker
9
+ .avatar-sticker
10
+ img.avatar-sticker-img(src=theme.aside.card.author.sticker, alt=_p('aside.sticker'))
10
11
  .author-info__description_group
11
12
  .author-info__description!= theme.aside.card.content
12
13
  .author-info__description2!= theme.aside.card.content2
@@ -18,7 +18,7 @@ if recommends
18
18
  .blog-slider__pagination.swiper-pagination-clickable.swiper-pagination-bullets
19
19
 
20
20
  script.
21
- function banner_swiper() {
21
+ function carousel_swiper() {
22
22
  let e = new Swiper(".blog-slider", {
23
23
  navigation: {
24
24
  nextEl: ".swiper-button-next",
@@ -6,7 +6,7 @@ if group
6
6
  each item in group
7
7
  - var array = item[1].split('||')
8
8
  .categoryItem
9
- a.categoryButton(href=url_for(trim(array[0])) if array[2] style="background:" + array[2] + ";")
9
+ a.categoryButton(href=url_for(trim(array[0])) style="background-image:" + array[2] + ";")
10
10
  span.categoryButtonText= item[0]
11
11
  if array[1]
12
12
  i.solitude(class=trim(array[1]))
@@ -15,10 +15,47 @@ if theme.nav.right.console
15
15
  .nav-button#nav-console
16
16
  a.console_switchbutton(onclick="sco.showConsole()", title=_p('nav.console'), href="javascript:void(0);")
17
17
  i.solitude.st-dashboard-fill
18
- .nav-button#nav-totop(onclick="sco.toTop()")
19
- a.totopbtn
20
- i.solitude.st-arrow-up-line
21
- span#percent= "0"
18
+ if theme.nav.right.top
19
+ .nav-button#nav-totop(onclick="sco.toTop()")
20
+ a.totopbtn
21
+ i.solitude.st-arrow-up-line
22
+ span#percent= "0"
23
+
24
+ script.
25
+ document.addEventListener('DOMContentLoaded', () => {
26
+ const percent = () => {
27
+ let scrollTop = document.documentElement.scrollTop || window.pageYOffset
28
+ let totalHeight = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight, document.documentElement.clientHeight) - document.documentElement.clientHeight
29
+ let scrollPercent = Math.round(scrollTop / totalHeight * 100)
30
+ let percentElement = document.querySelector("#percent")
31
+ let viewportBottom = window.scrollY + document.documentElement.clientHeight
32
+ let remainingScroll = totalHeight - scrollTop
33
+
34
+ if ((document.getElementById("post-comment") || document.getElementById("footer")).offsetTop < viewportBottom || scrollPercent > 90) {
35
+ document.querySelector("#nav-totop").classList.add("long")
36
+ percentElement.innerHTML = GLOBAL_CONFIG.lang.backtop
37
+ } else {
38
+ document.querySelector("#nav-totop").classList.remove("long")
39
+ if (scrollPercent >= 0) {
40
+ percentElement.innerHTML = scrollPercent + ""
41
+ }
42
+ }
43
+
44
+ let elementsToHide = document.querySelectorAll(".needEndHide")
45
+ if (remainingScroll < 100) {
46
+ elementsToHide.forEach(function (element) {
47
+ element.classList.add("hide")
48
+ })
49
+ } else {
50
+ elementsToHide.forEach(function (element) {
51
+ element.classList.remove("hide")
52
+ })
53
+ }
54
+
55
+ window.onscroll = percent
56
+ }
57
+ percent()
58
+ })
22
59
  #toggle-menu
23
60
  a.site-page
24
61
  i.solitude.st-menu-line
@@ -4,12 +4,14 @@ script.
4
4
  if (content === '') return content;
5
5
 
6
6
  const replacements = [
7
- {regex: /<img.*?src="(.*?)"?[^\>]+>/ig, replacement: '[图片]'},
8
- {regex: /<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi, replacement: '[链接]'},
9
- {regex: /<pre><code>.*?<\/pre>/gi, replacement: '[代码]'},
10
- {regex: /<[^>]+>/g, replacement: ""}
7
+ {regex: /<img.*?src="(.*?)"?[^\>]+>/ig, replacement: '<i class="solitude st-image-fill"></i>'},
8
+ {regex: /<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi, replacement: '<i class="solitude st-link"></i>'},
9
+ {regex: /<pre><code>.*?<\/pre>/gi, replacement: '<i class="solitude st-code-box-fill"></i>'},
10
+ {regex: /<p>|<\/p>/g, replacement: ''}
11
11
  ];
12
12
 
13
+ console.log(content.replace(/<img.*?src="(.*?)"?[^\>]+>/ig, '<i class="solitude st-gallery-image">'))
14
+
13
15
  content = replacements.reduce((str, {regex, replacement}) => str.replace(regex, replacement), content);
14
16
 
15
17
  return content.length > 150 ? content.substring(0, 150) + '...' : content;
@@ -32,7 +34,7 @@ script.
32
34
  'url': `${e.url}#${e.id}`,
33
35
  'date': new Date(e.created).toISOString()
34
36
  }))
35
- saveToLocal.set('twikoo-newest-comment', JSON.stringify(twikooArray), !{theme.comment.newest_comment.storage}/(60*24))
37
+ saveToLocal.set('twikoo-newest-comment', twikooArray, !{theme.comment.newest_comment.storage})
36
38
  generateHtml(twikooArray)
37
39
  }).catch(function (err) {
38
40
  console.error(err)
@@ -63,7 +65,7 @@ script.
63
65
  const newestCommentInit = () => {
64
66
  const data = saveToLocal.get('twikoo-newest-comment')
65
67
  if (data) {
66
- generateHtml(JSON.parse(data))
68
+ generateHtml(data)
67
69
  } else {
68
70
  getComment()
69
71
  }
@@ -4,9 +4,9 @@ script.
4
4
  if (content === '') return content;
5
5
 
6
6
  const replacements = [
7
- {regex: /<img.*?src="(.*?)"?[^\>]+>/ig, replacement: '[Image]'},
8
- {regex: /<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi, replacement: '[URL]'},
9
- {regex: /```[\s\S]*?```/g, replacement: '[Code]'},
7
+ {regex: /<img.*?src="(.*?)"?[^\>]+>/ig, replacement: '<i class="solitude st-image-fill"></i>'},
8
+ {regex: /<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi, replacement: '<i class="solitude st-link"></i>'},
9
+ {regex: /```[\s\S]*?```/g, replacement: '<i class="solitude st-code-box-fill"></i>'},
10
10
  {regex: /<[^>]+>/g, replacement: ""}
11
11
  ];
12
12
 
@@ -19,7 +19,7 @@ script.
19
19
  const newestCommentInit = () => {
20
20
  const data = saveToLocal.get('valine-newest-comment')
21
21
  if (data) {
22
- generateHtml(JSON.parse(data))
22
+ generateHtml(data)
23
23
  } else {
24
24
  getComment()
25
25
  }
@@ -48,7 +48,7 @@ script.
48
48
  'date': e.updatedAt || e.createdAt
49
49
  }
50
50
  })
51
- saveToLocal.set('valine-newest-comment', JSON.stringify(valineArray), !{theme.comment.newest_comment.storage} / (60 * 24))
51
+ saveToLocal.set('valine-newest-comment', valineArray, !{theme.comment.newest_comment.storage})
52
52
  generateHtml(valineArray)
53
53
  } catch (err) {
54
54
  console.error(err)
@@ -4,9 +4,9 @@ script.
4
4
  if (content === '') return content;
5
5
 
6
6
  const replacements = [
7
- {regex: /<img.*?src="(.*?)"?[^\>]+>/ig, replacement: '[图片]'},
8
- {regex: /<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi, replacement: '[链接]'},
9
- {regex: /<pre><code>.*?<\/pre>/gi, replacement: '[代码]'},
7
+ {regex: /<img.*?src="(.*?)"?[^\>]+>/ig, replacement: '<i class="solitude st-image-fill"></i>'},
8
+ {regex: /<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi, replacement: '<i class="solitude st-link"></i>'},
9
+ {regex: /<pre><code>.*?<\/pre>/gi, replacement: '<i class="solitude st-code-box-fill"></i>'},
10
10
  {regex: /<[^>]+>/g, replacement: ""}
11
11
  ];
12
12
 
@@ -19,7 +19,7 @@ script.
19
19
  const newestCommentInit = () => {
20
20
  const data = saveToLocal.get('waline-newest-comment')
21
21
  if (data) {
22
- generateHtml(JSON.parse(data))
22
+ generateHtml(data)
23
23
  } else {
24
24
  getComment()
25
25
  }
@@ -38,7 +38,7 @@ script.
38
38
  'date': e.time || e.insertedAt
39
39
  }
40
40
  })
41
- saveToLocal.set('waline-newest-comment', JSON.stringify(walineArray), !{theme.comment.newest_comment.storage} / (60 * 24))
41
+ saveToLocal.set('waline-newest-comment', walineArray, !{theme.comment.newest_comment.storage})
42
42
  generateHtml(walineArray)
43
43
  } catch (err) {
44
44
  console.error(err)
@@ -12,7 +12,7 @@
12
12
  #search-results
13
13
  #algolia-hits
14
14
  each tag in theme.search.tags || []
15
- a.tag-list(href="javascript:void(0);" onclick="pjax.loadUrl('/tags/" + tag + "/')")=tag
15
+ a.tag-list(href='javascript:void(0);' onclick="pjax.loadUrl('" + url_for('/tags/' + tag) + "/')")=tag
16
16
 
17
17
  #algolia-tips
18
18
  #algolia-pagination
@@ -10,7 +10,7 @@
10
10
  div#search-results
11
11
  #search-hits
12
12
  each tag in theme.search.tags || []
13
- a.tag-list(href='javascript:void(0);' onclick="pjax.loadUrl('/tags/" + tag + "/')")=tag
13
+ a.tag-list(href='javascript:void(0);' onclick="pjax.loadUrl('" + url_for('/tags/' + tag) + "/')")=tag
14
14
  div#search-pagination
15
15
  div#search-tips
16
16
  div#search-mask
package/layout/index.pug CHANGED
@@ -9,8 +9,8 @@ block content
9
9
  include ./includes/widgets/home/hometop
10
10
  main.layout#content-inner
11
11
  .recent-posts#recent-posts
12
- if theme.banner && is_home_first_page()
13
- include ./includes/widgets/home/leonus.pug
12
+ if theme.carousel && is_home_first_page()
13
+ include ./includes/widgets/home/carousel.pug
14
14
  #category-bar
15
15
  include ./includes/widgets/home/categoryBar
16
16
  for post, index in page.posts.sort("-sticky" || "-date").data
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-solitude",
3
- "version": "1.7.11",
3
+ "version": "1.7.13",
4
4
  "description": "A beautiful, powerful, and efficient Hexo theme developed by the efu.",
5
5
  "main": "package.json",
6
6
  "scripts": {
package/plugins.yml CHANGED
@@ -1,11 +1,11 @@
1
1
  algolia_search:
2
2
  name: algoliasearch
3
3
  file: dist/algoliasearch-lite.umd.js
4
- version: 4.22.0
4
+ version: 4.23.2
5
5
  instantsearch:
6
6
  name: instantsearch.js
7
7
  file: dist/instantsearch.production.min.js
8
- version: 4.63.0
8
+ version: 4.66.1
9
9
  pjax:
10
10
  name: pjax
11
11
  file: pjax.min.js
@@ -13,7 +13,7 @@ pjax:
13
13
  twikoo:
14
14
  name: twikoo
15
15
  file: dist/twikoo.all.min.js
16
- version: 1.6.31
16
+ version: 1.6.32
17
17
  waline_js:
18
18
  name: 'waline'
19
19
  file: dist/waline.js
@@ -27,14 +27,10 @@ valine:
27
27
  name: valine
28
28
  file: dist/Valine.min.js
29
29
  version: 1.5.1
30
- sharejs:
31
- name: butterfly-extsrc
32
- file: sharejs/dist/js/social-share.min.js
33
- version: 1.1.3
34
- sharejs_css:
35
- name: butterfly-extsrc
36
- file: sharejs/dist/css/share.min.css
37
- version: 1.1.3
30
+ discuss:
31
+ name: discuss
32
+ file: dist/discuss.js
33
+ version: 1.2.7
38
34
  katex:
39
35
  name: katex
40
36
  file: dist/katex.min.css
@@ -48,7 +44,7 @@ katex_copytex:
48
44
  lazyload:
49
45
  name: vanilla-lazyload
50
46
  file: dist/lazyload.iife.min.js
51
- version: 17.8.5
47
+ version: 19.1.3
52
48
  aplayer_css:
53
49
  name: aplayer
54
50
  file: dist/APlayer.min.css
@@ -67,13 +63,15 @@ pace_js:
67
63
  file: pace.min.js
68
64
  version: 1.2.4
69
65
  swiper_css:
70
- name: Swiper
66
+ name: swiper
71
67
  file: swiper-bundle.min.css
72
68
  version: 11.0.5
69
+ other_name: Swiper
73
70
  swiper_js:
74
- name: Swiper
71
+ name: swiper
75
72
  file: swiper-bundle.min.js
76
73
  version: 11.0.5
74
+ other_name: Swiper
77
75
  busuanzi_js:
78
76
  name: busuanzi
79
77
  file: bsz.pure.mini.js
@@ -91,13 +89,15 @@ medium_zoom:
91
89
  file: dist/medium-zoom.min.js
92
90
  version: 1.1.0
93
91
  fancyapps_ui:
94
- name: fancyapps-ui
92
+ name: '@fancyapps/ui'
95
93
  file: dist/fancybox/fancybox.umd.js
96
- version: 5.0.33
94
+ version: 5.0.35
95
+ other_name: fancyapps-ui
97
96
  fancyapps_css:
98
- name: fancyapps-ui
99
- file: dist/fancybox/fancybox.min.css
100
- version: 5.0.33
97
+ name: '@fancyapps/ui'
98
+ file: dist/fancybox/fancybox.css
99
+ version: 5.0.35
100
+ other_name: fancyapps-ui
101
101
  mermaid_js:
102
102
  name: mermaid
103
103
  file: dist/mermaid.min.js
@@ -190,10 +190,11 @@
190
190
 
191
191
  #aside-content
192
192
  .card-widget
193
- &:hover
194
- .avatar-sticker
195
- opacity 0
196
- transform scale(0)
193
+ if hexo-config('aside.card.author.sticker')
194
+ &:hover
195
+ .avatar-sticker
196
+ opacity 0
197
+ transform scale(0)
197
198
 
198
199
  &.card-recent-post
199
200
  padding .4rem .6rem !important
@@ -236,29 +237,30 @@
236
237
  transform scale(1.03)
237
238
 
238
239
  .card-info
239
- .avatar-sticker
240
- position absolute
241
- bottom -2px
242
- right -2px
243
- width 33px
244
- height 33px
245
- line-height 34px
246
- z-index 0
247
- display flex
248
- align-items center
249
- justify-content center
250
- transition .3s .2s
251
- transform scale(1)
252
- background var(--efu-card-bg)
253
- border-radius 50%
240
+ if hexo-config('aside.card.author.sticker')
241
+ .avatar-sticker
242
+ position absolute
243
+ bottom -2px
244
+ right -2px
245
+ width 33px
246
+ height 33px
247
+ line-height 34px
248
+ z-index 0
249
+ display flex
250
+ align-items center
251
+ justify-content center
252
+ transition .3s .2s
253
+ transform scale(1)
254
+ background var(--efu-card-bg)
255
+ border-radius 50%
254
256
 
255
- img
256
- width 26px
257
- height 26px
257
+ img
258
+ width 26px
259
+ height 26px
258
260
 
259
- ../ :hover .avatar-sticker
260
- opacity 0
261
- transform scale(0)
261
+ ../ :hover .avatar-sticker
262
+ opacity 0
263
+ transform scale(0)
262
264
 
263
265
  .author-info__desc
264
266
  font-size 12px
@@ -440,7 +442,9 @@
440
442
  color var(--efu-white)
441
443
 
442
444
  img.avatar-img
443
- width 118px
445
+ width 108px
446
+ height 108px
447
+ object-fit cover
444
448
  right 0
445
449
  top 0
446
450
  border-radius 500px
@@ -267,17 +267,17 @@
267
267
 
268
268
  &.no-top-img
269
269
  margin-bottom 0
270
+ if hexo-config('nav.right.top')
271
+ &:not(.nav-fixed)
272
+ #percent
273
+ transition .3s
270
274
 
271
- &:not(.nav-fixed)
272
- #percent
273
- transition .3s
274
-
275
- #nav-right #nav-totop
276
- width 0
277
- transform scale(0)
278
- margin-left 0
279
- overflow hidden
280
- transition .3s ease-in
275
+ #nav-right #nav-totop
276
+ width 0
277
+ transform scale(0)
278
+ margin-left 0
279
+ overflow hidden
280
+ transition .3s ease-in
281
281
 
282
282
  #page-header #scroll-down .scroll-down-effects,
283
283
  #page-header #site-subtitle, #page-header #site-title
@@ -606,40 +606,51 @@
606
606
  #site-logo
607
607
  width 121px
608
608
 
609
- #nav-totop
610
- position relative
611
- width 35px
612
- height 35px
613
- display flex
614
- border-radius 40px
615
- transition all .3s ease-in-out
616
- align-items center
617
-
618
- &.long
619
- width 80px
620
-
621
- .totopbtn
622
- padding-top 0
609
+ if hexo-config('nav.right.top')
610
+ #nav-totop
611
+ position relative
612
+ width 35px
613
+ height 35px
614
+ display flex
615
+ border-radius 40px
616
+ transition all .3s ease-in-out
617
+ align-items center
623
618
 
624
- i
625
- position absolute
626
- display flex
627
- font-size 22px
628
- opacity 0
629
- line-height 1
619
+ &.long
620
+ width 80px
630
621
 
631
- &:hover
632
622
  .totopbtn
623
+ padding-top 0
624
+
633
625
  i
634
- opacity 1
635
- color var(--efu-card-bg)
636
- transition .3s
626
+ position absolute
627
+ display flex
628
+ font-size 22px
629
+ opacity 0
630
+ line-height 1
631
+
632
+ &:hover
633
+ .totopbtn
634
+ i
635
+ opacity 1
636
+ color var(--efu-card-bg)
637
+ transition .3s
638
+
639
+ #percent
640
+ opacity 0
641
+ font-weight 700
637
642
 
638
643
  #percent
639
- opacity 0
640
- font-weight 700
644
+ font-size 12px
645
+ border-radius 35px
646
+ display flex
647
+ justify-content center
648
+ align-items center
649
+ transition .3s
650
+ white-space nowrap
641
651
 
642
- #percent
652
+ .nav-fixed #nav-totop #percent,
653
+ .page #nav-totop #percent
643
654
  font-size 12px
644
655
  border-radius 35px
645
656
  display flex
@@ -648,16 +659,6 @@
648
659
  transition .3s
649
660
  white-space nowrap
650
661
 
651
- .nav-fixed #nav-totop #percent,
652
- .page #nav-totop #percent
653
- font-size 12px
654
- border-radius 35px
655
- display flex
656
- justify-content center
657
- align-items center
658
- transition .3s
659
- white-space nowrap
660
-
661
662
  if hexo-config('nav.group')
662
663
  .back-home-button
663
664
  display flex
@@ -5,9 +5,12 @@ div#swiper_container
5
5
  transition all .3s
6
6
  overflow hidden
7
7
 
8
- #swiperBox
9
- margin-top 0!important
8
+ #swiperBox.recent-post-item
9
+ width 100%
10
10
  cursor default
11
+ margin-top 0
12
+
13
+ #swiperBox
11
14
 
12
15
  .swiperBox-top-text
13
16
  position absolute
@@ -21,6 +21,7 @@
21
21
  display none
22
22
 
23
23
  / #bannerGroup
24
+ display flex
24
25
  +minWidth1201()
25
26
  width calc(50% - .25rem)
26
27
  margin-right 1rem
@@ -73,6 +74,7 @@
73
74
  height 100%
74
75
  width 100%
75
76
  background var(--efu-card-bg)
77
+ background-size 200%
76
78
  border-radius 12px
77
79
  display inline-block
78
80
  text-align left
package/source/js/main.js CHANGED
@@ -54,8 +54,6 @@ const scrollFn = function () {
54
54
  } else {
55
55
  $header.classList.remove('nav-fixed', 'nav-visible');
56
56
  }
57
-
58
- percent();
59
57
  }, 200));
60
58
 
61
59
  function scrollDirection(currentTop) {
@@ -65,38 +63,6 @@ const scrollFn = function () {
65
63
  }
66
64
  }
67
65
 
68
- const percent = () => {
69
- let scrollTop = document.documentElement.scrollTop || window.pageYOffset
70
- let totalHeight = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight, document.documentElement.clientHeight) - document.documentElement.clientHeight
71
- let scrollPercent = Math.round(scrollTop / totalHeight * 100)
72
- let percentElement = document.querySelector("#percent")
73
- let viewportBottom = window.scrollY + document.documentElement.clientHeight
74
- let remainingScroll = totalHeight - scrollTop
75
-
76
- if ((document.getElementById("post-comment") || document.getElementById("footer")).offsetTop < viewportBottom || scrollPercent > 90) {
77
- document.querySelector("#nav-totop").classList.add("long")
78
- percentElement.innerHTML = GLOBAL_CONFIG.lang.backtop
79
- } else {
80
- document.querySelector("#nav-totop").classList.remove("long")
81
- if (scrollPercent >= 0) {
82
- percentElement.innerHTML = scrollPercent + ""
83
- }
84
- }
85
-
86
- let elementsToHide = document.querySelectorAll(".needEndHide")
87
- if (remainingScroll < 100) {
88
- elementsToHide.forEach(function (element) {
89
- element.classList.add("hide")
90
- })
91
- } else {
92
- elementsToHide.forEach(function (element) {
93
- element.classList.remove("hide")
94
- })
95
- }
96
-
97
- window.onscroll = percent
98
- }
99
-
100
66
 
101
67
  const showTodayCard = () => {
102
68
  const el = document.getElementById('todayCard')
@@ -222,7 +222,6 @@ window.oncontextmenu = (ele) => {
222
222
  rm.menuItems.paste.addEventListener('click', () => rm.pasteText() && rm.hideRightMenu())
223
223
  rm.menuItems.comment.addEventListener('click', () => rm.hideRightMenu() || sco.toTalk(selectTextNow))
224
224
  rm.menuItems.new.addEventListener('click', () => window.open(rm.domhref) && rm.hideRightMenu())
225
- rm.menuItems.search.addEventListener('click', () => rm.hideRightMenu())
226
225
  rm.menuItems.downloadImg.addEventListener('click', () => rm.downloadImage() && rm.hideRightMenu())
227
226
  rm.menuItems.copyImg.addEventListener('click', () => rm.copyImage() && rm.hideRightMenu())
228
227
  }()
@@ -28,6 +28,15 @@ window.onload = () => {
28
28
  window.removeEventListener("resize", fixSafariHeight);
29
29
  };
30
30
 
31
+ const addEventTagList = () => {
32
+ const list = document.querySelectorAll("#local-search .tag-list");
33
+ if(list.length > 0){
34
+ list.forEach(el => el.addEventListener("click", (e) => closeSearch()))
35
+ }
36
+ }
37
+
38
+ addEventTagList()
39
+
31
40
  const searchFnOnce = () => {
32
41
  $searchMask.addEventListener("click", closeSearch);
33
42
  utils.addEventListenerPjax(document.querySelector("#local-search .search-close-button"), "click", closeSearch);