hexo-theme-solitude 1.6.0 → 1.6.1
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 +20 -36
- package/languages/en.yml +45 -63
- package/languages/zh-CN.yml +32 -55
- package/languages/zh-TW.yml +32 -55
- package/layout/404.pug +1 -1
- package/layout/includes/console.pug +5 -5
- package/layout/includes/footer.pug +6 -6
- package/layout/includes/head/config.pug +15 -9
- package/layout/includes/head/opengraph.pug +2 -2
- package/layout/includes/head/pwa.pug +6 -6
- package/layout/includes/head.pug +1 -1
- package/layout/includes/inject/body.pug +0 -4
- package/layout/includes/inject/head.pug +1 -1
- package/layout/includes/keyboard.pug +1 -1
- package/layout/includes/nav.pug +1 -1
- package/layout/includes/sidebar.pug +19 -3
- package/layout/includes/widgets/home/categoryBar.pug +2 -2
- package/layout/includes/widgets/home/postList.pug +4 -4
- package/layout/includes/widgets/home/topGroup.pug +2 -2
- package/layout/includes/widgets/nav/group.pug +2 -2
- package/layout/includes/widgets/nav/right.pug +1 -1
- package/layout/includes/widgets/page/about/award.pug +8 -9
- package/layout/includes/widgets/page/about/hobbies.pug +1 -1
- package/layout/includes/widgets/page/about/other.pug +1 -1
- package/layout/includes/widgets/page/banner.pug +1 -1
- package/layout/includes/widgets/page/links/banner.pug +5 -4
- package/layout/includes/widgets/page/moments/angle.pug +1 -1
- package/layout/includes/widgets/post/award.pug +10 -15
- package/layout/includes/widgets/post/copyright.pug +2 -2
- package/layout/includes/widgets/post/postMeta.pug +10 -10
- package/layout/includes/widgets/randomlink.pug +3 -2
- package/layout/includes/widgets/third-party/comments/twikoo.pug +1 -0
- package/layout/includes/widgets/third-party/comments/waline.pug +1 -0
- package/package.json +1 -1
- package/scripts/event/cdn.js +2 -7
- package/scripts/event/merge_config.js +10 -2
- package/source/css/_comments/index.styl +14 -1
- package/source/css/_comments/twikoo.styl +3 -0
- package/source/css/_highlight/prismjs/line-number.styl +1 -1
- package/source/css/_layout/article-sort.styl +1 -1
- package/source/css/_layout/aside.styl +3 -3
- package/source/css/_layout/console.styl +7 -6
- package/source/css/_layout/footer.styl +1 -0
- package/source/css/_layout/header.styl +2 -0
- package/source/css/_layout/sidebar.styl +30 -20
- package/source/css/_page/_home/home-top.styl +1 -1
- package/source/css/_page/_home/recent-post.styl +2 -2
- package/source/css/_page/links.styl +5 -5
- package/source/css/_post/content.styl +13 -0
- package/source/css/_post/tools.styl +3 -9
- package/source/img/flower.gif +0 -0
- package/source/js/{comment/twikoo_commentBarrage.js → commentBarrage/twikoo.js} +0 -6
- package/source/js/{comment/waline_commentBarrage.js → commentBarrage/waline.js} +0 -2
- package/source/js/main.js +73 -72
- package/source/js/utils.js +1 -1
- package/layout/includes/widgets/rightside/index.pug +0 -87
- package/source/js/rightside.js +0 -221
@@ -22,7 +22,6 @@
|
|
22
22
|
height 100%
|
23
23
|
background var(--efu-maskbgdeep)
|
24
24
|
transition all .5s ease 0s
|
25
|
-
padding-top 30px
|
26
25
|
z-index 1001
|
27
26
|
border-left var(--style-border-always)
|
28
27
|
|
@@ -48,6 +47,33 @@
|
|
48
47
|
.site-page span:hover
|
49
48
|
color var(--efu-white)
|
50
49
|
|
50
|
+
.site-data
|
51
|
+
display flex
|
52
|
+
width 100%
|
53
|
+
justify-content flex-start
|
54
|
+
margin 12px 0 0 0
|
55
|
+
padding .6rem 16px
|
56
|
+
|
57
|
+
.data-item
|
58
|
+
display flex
|
59
|
+
justify-content flex-start
|
60
|
+
margin-right 36px
|
61
|
+
|
62
|
+
.data-item-link > a
|
63
|
+
display flex
|
64
|
+
flex-direction column
|
65
|
+
align-items flex-start
|
66
|
+
|
67
|
+
.data-item-link .length-num
|
68
|
+
color var(--efu-fontcolor)
|
69
|
+
font-size 20px
|
70
|
+
font-weight 700
|
71
|
+
line-height 1
|
72
|
+
|
73
|
+
.data-item-link .headline
|
74
|
+
font-size 12px
|
75
|
+
color var(--efu-secondtext)
|
76
|
+
|
51
77
|
.menus_items
|
52
78
|
padding 0 16px
|
53
79
|
|
@@ -137,22 +163,6 @@
|
|
137
163
|
&:hover
|
138
164
|
transform rotate(360deg)
|
139
165
|
|
140
|
-
.site-data
|
141
|
-
display table
|
142
|
-
padding .6rem .5rem 0
|
143
|
-
width 100%
|
144
|
-
table-layout fixed
|
145
|
-
|
146
|
-
.data-item
|
147
|
-
display table-cell
|
148
|
-
|
149
|
-
.data-item-link .length-num
|
150
|
-
color var(--text-highlight-color)
|
151
|
-
font-size 1.28em
|
152
|
-
|
153
|
-
.data-item-link .headline
|
154
|
-
color var(--efu-fontcolor)
|
155
|
-
|
156
166
|
hr
|
157
167
|
margin 1rem auto
|
158
168
|
|
@@ -188,14 +198,14 @@
|
|
188
198
|
padding 0 16px
|
189
199
|
margin-bottom 6px
|
190
200
|
|
191
|
-
|
201
|
+
span.darkmode_switchbutton
|
192
202
|
padding 4px 8px
|
193
203
|
|
194
204
|
[data-theme="dark"] &
|
195
205
|
background var(--efu-orange)
|
196
206
|
color var(--efu-white)
|
197
207
|
|
198
|
-
|
208
|
+
span.menu-child
|
199
209
|
width 100%
|
200
210
|
background var(--efu-card-bg)
|
201
211
|
border-radius 8px
|
@@ -211,7 +221,7 @@
|
|
211
221
|
align-items center
|
212
222
|
justify-content center
|
213
223
|
|
214
|
-
|
224
|
+
span.menu-child span
|
215
225
|
margin-left 10px
|
216
226
|
|
217
227
|
.webinfo
|
@@ -118,7 +118,7 @@ if hexo-config('index_post_list.direction') == "column"
|
|
118
118
|
overflow hidden
|
119
119
|
-webkit-box-orient vertical
|
120
120
|
padding 5px 32px
|
121
|
-
|
121
|
+
opacity .8
|
122
122
|
font-size 14px
|
123
123
|
line-height 1.8
|
124
124
|
|
@@ -338,7 +338,7 @@ else if hexo-config('index_post_list.direction') == "row"
|
|
338
338
|
overflow hidden
|
339
339
|
-webkit-box-orient vertical
|
340
340
|
padding 5px 32px
|
341
|
-
|
341
|
+
opacity .8
|
342
342
|
font-size 14px
|
343
343
|
line-height 1.8
|
344
344
|
+maxWidth768()
|
@@ -28,7 +28,7 @@
|
|
28
28
|
top 0
|
29
29
|
width 100px
|
30
30
|
height 50px
|
31
|
-
background-image -webkit-linear-gradient(0deg,rgba(255,255,255,0),rgba(255,255,255
|
31
|
+
background-image -webkit-linear-gradient(0deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .5), rgba(255, 255, 255, 0))
|
32
32
|
animation light_tag 4s both infinite
|
33
33
|
|
34
34
|
&.vip
|
@@ -73,7 +73,6 @@
|
|
73
73
|
width calc(50% - 16px)
|
74
74
|
|
75
75
|
.img
|
76
|
-
-webkit-mask-image -webkit-radial-gradient(center, #fff, #000)
|
77
76
|
border-radius 0
|
78
77
|
height 120px
|
79
78
|
width 100%
|
@@ -81,7 +80,6 @@
|
|
81
80
|
border none
|
82
81
|
padding 0
|
83
82
|
transition all .3s ease 0s
|
84
|
-
background #f6f6f6
|
85
83
|
overflow hidden
|
86
84
|
|
87
85
|
img
|
@@ -114,6 +112,7 @@
|
|
114
112
|
height 20px
|
115
113
|
min-width 20px
|
116
114
|
min-height 20px
|
115
|
+
transform scale(1.1)
|
117
116
|
background var(--efu-secondbg)
|
118
117
|
|
119
118
|
.site-card-text
|
@@ -147,15 +146,17 @@
|
|
147
146
|
&:hover
|
148
147
|
border var(--style-border-hover)
|
149
148
|
box-shadow var(--efu-shadow-main)
|
149
|
+
background var(--efu-main)
|
150
150
|
|
151
151
|
.site-card-tag
|
152
152
|
left: -60px
|
153
153
|
|
154
154
|
.img
|
155
|
-
transform scale(1
|
155
|
+
transform scale(1)
|
156
156
|
filter brightness(.3)
|
157
157
|
border-radius 12px
|
158
158
|
background var(--efu-lighttext)
|
159
|
+
background var(--efu-main)
|
159
160
|
+minWidth768()
|
160
161
|
height 80px
|
161
162
|
|
@@ -191,7 +192,6 @@
|
|
191
192
|
padding 0
|
192
193
|
margin 0.5rem -6px 1rem -6px
|
193
194
|
overflow-x hidden
|
194
|
-
overflow auto
|
195
195
|
text-align center
|
196
196
|
|
197
197
|
&.mini
|
@@ -62,6 +62,19 @@
|
|
62
62
|
|
63
63
|
img
|
64
64
|
margin auto
|
65
|
+
a
|
66
|
+
&:not(.fancybox)
|
67
|
+
text-decoration none
|
68
|
+
border-bottom 2px dotted var(--efu-lighttext)
|
69
|
+
color var(--efu-fontcolor)
|
70
|
+
font-weight 700
|
71
|
+
padding 0 4px
|
72
|
+
border-radius 4px 4px 0 0
|
73
|
+
|
74
|
+
&:hover
|
75
|
+
color var(--efu-white)
|
76
|
+
border-radius 4px
|
77
|
+
background var(--efu-main)
|
65
78
|
|
66
79
|
code:not([class*='language-'])
|
67
80
|
color var(--efu-white)
|
@@ -108,6 +108,7 @@
|
|
108
108
|
.reward-title
|
109
109
|
font-weight 700
|
110
110
|
color var(--efu-red)
|
111
|
+
text-wrap wrap
|
111
112
|
|
112
113
|
.reward-group
|
113
114
|
display flex
|
@@ -119,14 +120,6 @@
|
|
119
120
|
list-style-type none
|
120
121
|
vertical-align top
|
121
122
|
|
122
|
-
&:first-child
|
123
|
-
img
|
124
|
-
border-color var(--efu-green)
|
125
|
-
|
126
|
-
&:last-child
|
127
|
-
img
|
128
|
-
border-color var(--efu-blue)
|
129
|
-
|
130
123
|
img
|
131
124
|
width 130px
|
132
125
|
height 130px
|
@@ -156,7 +149,7 @@
|
|
156
149
|
&:hover
|
157
150
|
color var(--efu-white)
|
158
151
|
background var(--efu-red)
|
159
|
-
background-image url(
|
152
|
+
background-image url(/img/flower.gif)
|
160
153
|
box-shadow var(--efu-shadow-red)
|
161
154
|
|
162
155
|
.reward-text
|
@@ -165,6 +158,7 @@
|
|
165
158
|
|
166
159
|
.reward-dec
|
167
160
|
font-size .6rem
|
161
|
+
text-wrap wrap
|
168
162
|
|
169
163
|
// rss
|
170
164
|
|
Binary file
|
@@ -102,15 +102,9 @@ function initializeCommentBarrage() {
|
|
102
102
|
const commentBarrageSwitch = localStorage.getItem("commentBarrageSwitch");
|
103
103
|
if (commentBarrageSwitch != null) {
|
104
104
|
document.querySelector(".comment-barrage").style.display = "flex";
|
105
|
-
if (GLOBAL_CONFIG.rightside.enable) {
|
106
|
-
document.querySelector(".menu-commentBarrage-text").textContent = "关闭热评";
|
107
|
-
}
|
108
105
|
document.querySelector("#consoleCommentBarrage").classList.add("on");
|
109
106
|
} else {
|
110
107
|
document.querySelector(".comment-barrage").style.display = "none";
|
111
|
-
if (GLOBAL_CONFIG.rightside.enable) {
|
112
|
-
document.querySelector(".menu-commentBarrage-text").textContent = "显示热评";
|
113
|
-
}
|
114
108
|
document.querySelector("#consoleCommentBarrage").classList.remove("on");
|
115
109
|
}
|
116
110
|
const comments = await this.fetchComments();
|
@@ -108,11 +108,9 @@ function initializeCommentBarrage() {
|
|
108
108
|
|
109
109
|
if (localStorage.getItem("commentBarrageSwitch") != null) {
|
110
110
|
commentBarrage.style.display = "flex";
|
111
|
-
GLOBAL_CONFIG.rightside.enable && (menuCommentBarrageText.textContent = "关闭热评");
|
112
111
|
consoleCommentBarrage.classList.add("on");
|
113
112
|
} else {
|
114
113
|
commentBarrage.style.display = "none";
|
115
|
-
GLOBAL_CONFIG.rightside.enable && (menuCommentBarrageText.textContent = "显示热评");
|
116
114
|
consoleCommentBarrage.classList.remove("on");
|
117
115
|
}
|
118
116
|
|
package/source/js/main.js
CHANGED
@@ -234,17 +234,29 @@ let sco = {
|
|
234
234
|
}));
|
235
235
|
}
|
236
236
|
},
|
237
|
+
musicToggle: function () {
|
238
|
+
const $music = document.querySelector('#nav-music');
|
239
|
+
const $meting = document.querySelector('meting-js');
|
240
|
+
const $console = document.getElementById('consoleMusic');
|
241
|
+
const $toggleButton = document.getElementById('menu-music-toggle');
|
242
|
+
wleelw_musicPlaying = !wleelw_musicPlaying;
|
243
|
+
$music.classList.toggle("playing", wleelw_musicPlaying);
|
244
|
+
$console.classList.toggle("on", wleelw_musicPlaying);
|
245
|
+
if (wleelw_musicPlaying) {
|
246
|
+
$meting.aplayer.play();
|
247
|
+
} else {
|
248
|
+
$meting.aplayer.pause();
|
249
|
+
}
|
250
|
+
},
|
237
251
|
switchCommentBarrage: function () {
|
238
252
|
let commentBarrageElement = document.querySelector(".comment-barrage");
|
239
253
|
if (commentBarrageElement) {
|
240
254
|
if (window.getComputedStyle(commentBarrageElement).display === "flex") {
|
241
255
|
commentBarrageElement.style.display = "none";
|
242
|
-
document.querySelector(".menu-commentBarrage-text").textContent = "显示热评";
|
243
256
|
document.querySelector("#consoleCommentBarrage").classList.remove("on");
|
244
257
|
localStorage.removeItem("commentBarrageSwitch");
|
245
258
|
} else {
|
246
259
|
commentBarrageElement.style.display = "flex";
|
247
|
-
document.querySelector(".menu-commentBarrage-text").textContent = "关闭热评";
|
248
260
|
document.querySelector("#consoleCommentBarrage").classList.add("on");
|
249
261
|
localStorage.setItem("commentBarrageSwitch", "false");
|
250
262
|
}
|
@@ -290,12 +302,10 @@ let sco = {
|
|
290
302
|
document.documentElement.setAttribute('data-theme', 'dark')
|
291
303
|
saveToLocal.set('theme', 'dark', 0.02);
|
292
304
|
utils.snackbarShow(GLOBAL_CONFIG.lang.theme.dark, false, 2000)
|
293
|
-
GLOBAL_CONFIG.rightside && (document.querySelector(".menu-darkmode-text").textContent = "浅色模式");
|
294
305
|
} else {
|
295
306
|
document.documentElement.setAttribute('data-theme', 'light')
|
296
307
|
saveToLocal.set('theme', 'light', 0.02);
|
297
308
|
utils.snackbarShow(GLOBAL_CONFIG.lang.theme.light, false, 2000)
|
298
|
-
GLOBAL_CONFIG.rightside && (document.querySelector(".menu-darkmode-text").textContent = "深色模式");
|
299
309
|
}
|
300
310
|
},
|
301
311
|
hideTodayCard: () => document.getElementById('todayCard').classList.add('hide'),
|
@@ -368,67 +378,6 @@ let sco = {
|
|
368
378
|
}
|
369
379
|
});
|
370
380
|
},
|
371
|
-
downloadImage: function (imageUrl, filename = 'photo') {
|
372
|
-
if (rm.downloadimging) {
|
373
|
-
utils.snackbarShow("有正在进行中的下载,请稍后再试");
|
374
|
-
return;
|
375
|
-
}
|
376
|
-
|
377
|
-
rm.hideRightMenu();
|
378
|
-
rm.downloadimging = true;
|
379
|
-
utils.snackbarShow("正在下载中,请稍后", false, 10000);
|
380
|
-
|
381
|
-
let img = new Image();
|
382
|
-
img.setAttribute("crossOrigin", "anonymous");
|
383
|
-
img.onload = function () {
|
384
|
-
let canvas = document.createElement("canvas");
|
385
|
-
canvas.width = img.width;
|
386
|
-
canvas.height = img.height;
|
387
|
-
let ctx = canvas.getContext("2d");
|
388
|
-
ctx.drawImage(img, 0, 0, img.width, img.height);
|
389
|
-
|
390
|
-
let dataUrl = canvas.toDataURL("image/png");
|
391
|
-
let link = document.createElement("a");
|
392
|
-
link.download = filename;
|
393
|
-
link.href = dataUrl;
|
394
|
-
|
395
|
-
let clickEvent = new MouseEvent("click");
|
396
|
-
link.dispatchEvent(clickEvent);
|
397
|
-
|
398
|
-
utils.snackbarShow("图片已添加盲水印,请遵守版权协议");
|
399
|
-
rm.downloadimging = false;
|
400
|
-
};
|
401
|
-
img.src = imageUrl;
|
402
|
-
},
|
403
|
-
musicToggle: function () {
|
404
|
-
const $music = document.querySelector('#nav-music');
|
405
|
-
const $meting = document.querySelector('meting-js');
|
406
|
-
const $console = document.getElementById('consoleMusic');
|
407
|
-
const $toggleButton = document.getElementById('menu-music-toggle');
|
408
|
-
wleelw_musicPlaying = !wleelw_musicPlaying;
|
409
|
-
$music.classList.toggle("playing", wleelw_musicPlaying);
|
410
|
-
$console.classList.toggle("on", wleelw_musicPlaying);
|
411
|
-
if (wleelw_musicPlaying) {
|
412
|
-
$meting.aplayer.play();
|
413
|
-
$toggleButton.innerHTML = `<i class="solitude st-pause-fill"></i><span>暂停音乐</span>`;
|
414
|
-
} else {
|
415
|
-
$meting.aplayer.pause();
|
416
|
-
$toggleButton.innerHTML = `<i class="solitude st-play-fill"></i><span>播放音乐</span>`;
|
417
|
-
}
|
418
|
-
rm.hideRightMenu();
|
419
|
-
},
|
420
|
-
musicSkipBack: function () {
|
421
|
-
document.querySelector('meting-js').aplayer.skipBack()
|
422
|
-
rm.hideRightMenu()
|
423
|
-
},
|
424
|
-
musicSkipForward: function () {
|
425
|
-
document.querySelector('meting-js').aplayer.skipForward()
|
426
|
-
rm.hideRightMenu()
|
427
|
-
},
|
428
|
-
musicGetName: function () {
|
429
|
-
const titles = Array.from(document.querySelectorAll('.aplayer-title')).map(e => e.innerText);
|
430
|
-
return titles[0];
|
431
|
-
},
|
432
381
|
scrollToComment: function () {
|
433
382
|
utils.scrollToDest(utils.getEleTop(document.getElementById('post-comment')), 300)
|
434
383
|
},
|
@@ -581,13 +530,13 @@ let sco = {
|
|
581
530
|
});
|
582
531
|
},
|
583
532
|
addNavBackgroundInit: function () {
|
584
|
-
|
533
|
+
const scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
585
534
|
if (scrollTop !== 0) {
|
586
|
-
|
535
|
+
const pageHeader = document.getElementById("page-header");
|
587
536
|
if (pageHeader) {
|
588
537
|
pageHeader.classList.add("nav-fixed", "nav-visible");
|
589
538
|
}
|
590
|
-
|
539
|
+
const cookiesWindow = document.getElementById("cookies-window");
|
591
540
|
if (cookiesWindow) {
|
592
541
|
cookiesWindow.style.display = 'none';
|
593
542
|
}
|
@@ -656,9 +605,63 @@ let sco = {
|
|
656
605
|
element.dispatchEvent(new Event("input"));
|
657
606
|
});
|
658
607
|
},
|
608
|
+
owoBig() {
|
609
|
+
const type = GLOBAL_CONFIG.comment.type;
|
610
|
+
const owoSelectors = {
|
611
|
+
body: type === 'twikoo' ? '.OwO-body' : '.wl-emoji-popup',
|
612
|
+
item: type === 'twikoo' ? '.OwO-items li' : '.wl-tab-wrapper button'
|
613
|
+
};
|
614
|
+
|
615
|
+
let owoBig = document.getElementById('owo-big');
|
616
|
+
if (!owoBig) {
|
617
|
+
owoBig = document.createElement('div');
|
618
|
+
owoBig.id = 'owo-big';
|
619
|
+
document.body.appendChild(owoBig);
|
620
|
+
}
|
621
|
+
|
622
|
+
const debounce = (func, wait) => {
|
623
|
+
let timeout;
|
624
|
+
return function (...args) {
|
625
|
+
const later = () => {
|
626
|
+
clearTimeout(timeout);
|
627
|
+
func(...args);
|
628
|
+
};
|
629
|
+
clearTimeout(timeout);
|
630
|
+
timeout = setTimeout(later, wait);
|
631
|
+
};
|
632
|
+
};
|
633
|
+
|
634
|
+
const showOwoBig = (event) => {
|
635
|
+
const target = event.target;
|
636
|
+
const owoItem = target.closest(owoSelectors.item);
|
637
|
+
if (owoItem && target.closest(owoSelectors.body)) {
|
638
|
+
const imgSrc = owoItem.querySelector('img')?.src;
|
639
|
+
if (imgSrc) {
|
640
|
+
owoBig.innerHTML = `<img src="${imgSrc}" style="max-width: 100%; height: auto;">`;
|
641
|
+
owoBig.style.display = 'block';
|
642
|
+
positionOwoBig(owoItem);
|
643
|
+
}
|
644
|
+
}
|
645
|
+
};
|
646
|
+
|
647
|
+
const hideOwoBig = (event) => {
|
648
|
+
if (event.target.closest(owoSelectors.item) && event.target.closest(owoSelectors.body)) {
|
649
|
+
owoBig.style.display = 'none';
|
650
|
+
}
|
651
|
+
};
|
652
|
+
|
653
|
+
function positionOwoBig(owoItem) {
|
654
|
+
const itemRect = owoItem.getBoundingClientRect();
|
655
|
+
owoBig.style.left = `${itemRect.left - (owoBig.offsetWidth / 4)}px`;
|
656
|
+
owoBig.style.top = `${itemRect.top}px`;
|
657
|
+
}
|
658
|
+
|
659
|
+
document.addEventListener('mouseover', debounce(showOwoBig, 100));
|
660
|
+
document.addEventListener('mouseout', hideOwoBig);
|
661
|
+
}
|
659
662
|
}
|
660
663
|
|
661
|
-
const
|
664
|
+
const addHighlight = () => {
|
662
665
|
const highlight = GLOBAL_CONFIG.highlight;
|
663
666
|
if (!highlight) return;
|
664
667
|
|
@@ -810,13 +813,12 @@ window.refreshFn = () => {
|
|
810
813
|
sco.listenToPageInputPress()
|
811
814
|
sco.addNavBackgroundInit()
|
812
815
|
utils.changeTimeFormat()
|
813
|
-
GLOBAL_CONFIG.rightside.enable && addRightMenuClickEvent()
|
814
816
|
GLOBAL_CONFIG.lazyload.enable && utils.lazyloadImg()
|
815
817
|
GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll("#article-container img:not(.flink-avatar)"))
|
816
818
|
GLOBAL_CONFIG.randomlinks && randomLinksList()
|
817
819
|
PAGE_CONFIG.comment && initComment()
|
818
820
|
PAGE_CONFIG.toc && toc.init();
|
819
|
-
(PAGE_CONFIG.is_post || PAGE_CONFIG.is_page) && ((
|
821
|
+
(PAGE_CONFIG.is_post || PAGE_CONFIG.is_page) && ((addHighlight()) || tabs.init())
|
820
822
|
PAGE_CONFIG.is_home && showTodayCard()
|
821
823
|
GLOBAL_CONFIG.covercolor.enable && coverColor()
|
822
824
|
sco.initConsoleState()
|
@@ -824,7 +826,6 @@ window.refreshFn = () => {
|
|
824
826
|
document.body.setAttribute('data-type', PAGE_CONFIG.page)
|
825
827
|
PAGE_CONFIG.page === "music" && scoMusic.init()
|
826
828
|
GLOBAL_CONFIG.ai.enable && PAGE_CONFIG.page === "post" && ScoAI.init()
|
827
|
-
preloader.removePaceDone()
|
828
829
|
}
|
829
830
|
|
830
831
|
document.addEventListener('DOMContentLoaded', function () {
|
package/source/js/utils.js
CHANGED
@@ -1,87 +0,0 @@
|
|
1
|
-
div#rightMenu
|
2
|
-
div.rightMenu-group.rightMenu-small
|
3
|
-
div.rightMenu-item#menu-backward
|
4
|
-
i.solitude.st-arrow-left-line
|
5
|
-
div.rightMenu-item#menu-forward
|
6
|
-
i.solitude.st-arrow-right-line
|
7
|
-
div.rightMenu-item#menu-refresh
|
8
|
-
i.solitude.st-restart-line
|
9
|
-
div.rightMenu-item#menu-top
|
10
|
-
i.solitude.st-arrow-up-line
|
11
|
-
div.rightMenu-group.rightMenu-line.rightMenuPlugin
|
12
|
-
div.rightMenu-item#menu-copytext
|
13
|
-
i.solitude.st-copy-fill
|
14
|
-
span= _p('rightmenu.copytext')
|
15
|
-
div.rightMenu-item#menu-pastetext
|
16
|
-
i.solitude.st-clipboard-fill
|
17
|
-
span= _p('rightmenu.pastetext')
|
18
|
-
if theme.comment.enable
|
19
|
-
a.rightMenu-item#menu-commenttext
|
20
|
-
i.solitude.st-chat-new-fill
|
21
|
-
span= _p('rightmenu.commenttext')
|
22
|
-
div.rightMenu-item#menu-newwindow
|
23
|
-
i.solitude.st-window-fill
|
24
|
-
span= _p('rightmenu.newwindow')
|
25
|
-
div.rightMenu-item#menu-copylink
|
26
|
-
i.solitude.st-link-line
|
27
|
-
span= _p('rightmenu.copylink')
|
28
|
-
div.rightMenu-item#menu-copyimg
|
29
|
-
i.solitude.st-copy-fill
|
30
|
-
span= _p('rightmenu.copyimg')
|
31
|
-
div.rightMenu-item#menu-downloadimg
|
32
|
-
i.solitude.st-download-cloud-fill
|
33
|
-
span= _p('rightmenu.downloadimg')
|
34
|
-
div.rightMenu-item#menu-search
|
35
|
-
i.solitude.st-search-line
|
36
|
-
span= _p('rightmenu.search')
|
37
|
-
div.rightMenu-item#menu-music-toggle
|
38
|
-
i.solitude.st-play-fill
|
39
|
-
span= _p('rightmenu.music.toggle')
|
40
|
-
div.rightMenu-item#menu-music-back
|
41
|
-
i.solitude.st-skip-back-fill
|
42
|
-
span= _p('rightmenu.music.back')
|
43
|
-
div.rightMenu-item#menu-music-forward
|
44
|
-
i.solitude.st-skip-forward-fill
|
45
|
-
span= _p('rightmenu.music.forward')
|
46
|
-
div.rightMenu-item#menu-music-playlist(onclick=`window.open('${theme.capsule.server === 'tencent' ? `https://y.qq.com/n/ryqq/playlist/${theme.capsule.id}` : `https://music.163.com/#/playlist?id=${theme.capsule.id}`}', '_blank');`)
|
47
|
-
i.solitude.st-play-list-2-line
|
48
|
-
span= _p('rightmenu.music.playlist')
|
49
|
-
div.rightMenu-item#menu-music-copyMusicName
|
50
|
-
i.solitude.st-copy-fill
|
51
|
-
span= _p('rightmenu.music.copyMusicName')
|
52
|
-
div.rightMenu-group.rightMenu-line.rightMenuOther
|
53
|
-
a.rightMenu-item.menu-Link#menu-randomPost
|
54
|
-
i.solitude.st-signal-tower-fill
|
55
|
-
span= _p('rightmenu.randomPost')
|
56
|
-
a.rightMenu-item.menu-link(href="/categories/")
|
57
|
-
i.solitude.st-checkbox-multiple-blank-fill
|
58
|
-
span= _p('rightmenu.categories')
|
59
|
-
a.rightMenu-item.menu-link(href="/tags/")
|
60
|
-
i.solitude.st-price-tag-fill
|
61
|
-
span= _p('rightmenu.tags')
|
62
|
-
div.rightMenu-group.rightMenu-line.rightMenuOther
|
63
|
-
div.rightMenu-item#menu-copy
|
64
|
-
i.solitude.st-external-link-fill
|
65
|
-
span= _p('rightmenu.copyaddress')
|
66
|
-
if theme.comment.enable && theme.comment.commentBarrage
|
67
|
-
div.rightMenu-item#menu-commentBarrage
|
68
|
-
i.solitude.st-chat-fill
|
69
|
-
span.menu-commentBarrage-text= _p('rightmenu.commentBarrage')
|
70
|
-
div.rightMenu-item#menu-darkmode
|
71
|
-
i.solitude.st-moon-clear-fill
|
72
|
-
case theme.display_mode.type
|
73
|
-
when 'auto'
|
74
|
-
when 'light'
|
75
|
-
span.menu-darkmode-text= _p('rightmenu.dark')
|
76
|
-
when 'dark'
|
77
|
-
span.menu-darkmode-text= _p('rightmenu.light')
|
78
|
-
if theme.translate.enable
|
79
|
-
div.rightMenu-item#menu-translate
|
80
|
-
case theme.translate.defaultEncoding
|
81
|
-
when 2
|
82
|
-
i.solitude.st-panben-line
|
83
|
-
span= _p('rightmenu.chs_to_cht')
|
84
|
-
when 1
|
85
|
-
i.solitude.st-jianben-line
|
86
|
-
span= _p('rightmenu.cht_to_chs')
|
87
|
-
div#rightmenu-mask
|