hexo-theme-solitude 1.6.1 → 1.7.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/README.md +1 -1
- package/README_zh-cn.md +1 -1
- package/README_zh-tw.md +1 -1
- package/SECURITY.md +5 -5
- package/_config.yml +30 -15
- package/languages/en.yml +20 -2
- package/languages/zh-CN.yml +25 -1
- package/languages/zh-TW.yml +25 -1
- package/layout/category.pug +1 -1
- package/layout/includes/console.pug +8 -7
- package/layout/includes/head/config.pug +66 -40
- package/layout/includes/inject/body.pug +7 -3
- package/layout/includes/inject/head.pug +35 -1
- package/layout/includes/widgets/post/copyright.pug +5 -5
- package/layout/includes/widgets/post/postMeta.pug +8 -1
- package/layout/includes/widgets/third-party/comments/comment.pug +5 -7
- package/layout/includes/widgets/third-party/comments/valine.pug +44 -0
- package/layout/includes/widgets/third-party/comments/waline.pug +40 -12
- package/layout/includes/widgets/third-party/news-comment/newest-comment.pug +5 -3
- package/layout/includes/widgets/third-party/news-comment/twikoo.pug +12 -10
- package/layout/includes/widgets/third-party/news-comment/valine.pug +79 -0
- package/layout/includes/widgets/third-party/news-comment/waline.pug +25 -20
- package/layout/page.pug +3 -0
- package/layout/tag.pug +1 -1
- package/package.json +1 -1
- package/plugins.yml +15 -3
- package/scripts/event/cdn.js +7 -2
- package/scripts/event/init.js +4 -2
- package/scripts/event/merge_config.js +6 -5
- package/scripts/helper/related_post.js +2 -2
- package/scripts/tags/tabs.js +1 -1
- package/source/css/_comments/{index.styl → comment.styl} +4 -24
- package/source/css/_comments/valine.styl +245 -0
- package/source/css/_global/index.styl +3 -0
- package/source/css/_highlight/highlight/index.styl +1 -1
- package/source/css/_page/index.styl +1 -4
- package/source/css/_post/content.styl +13 -7
- package/source/css/_post/copyright.styl +4 -1
- package/source/css/index.styl +1 -3
- package/source/js/commentBarrage/twikoo.js +4 -4
- package/source/js/commentBarrage/valine.js +156 -0
- package/source/js/commentBarrage/waline.js +3 -3
- package/source/js/main.js +28 -33
- package/source/js/third_party/efu_ai.min.js +6 -0
- package/source/js/utils.js +14 -1
- package/source/css/_comments/waline.styl +0 -455
- package/source/js/third_party/sco-ai.min.js +0 -8
@@ -1,455 +0,0 @@
|
|
1
|
-
// 用了记得给我的主题点个star喔😍
|
2
|
-
#comment
|
3
|
-
.wl-comment
|
4
|
-
position relative
|
5
|
-
|
6
|
-
.wl-panel
|
7
|
-
flex 1
|
8
|
-
display flex
|
9
|
-
flex-direction column
|
10
|
-
|
11
|
-
.wl-editor
|
12
|
-
order 0
|
13
|
-
transition all .3s ease 0s
|
14
|
-
position relative
|
15
|
-
display inline-block
|
16
|
-
width 100%
|
17
|
-
vertical-align bottom
|
18
|
-
font-size 14px
|
19
|
-
min-height 8.75em
|
20
|
-
background-color var(--efu-card-bg)
|
21
|
-
resize vertical
|
22
|
-
line-height 1.5
|
23
|
-
box-sizing border-box
|
24
|
-
background var(--efu-secondbg)
|
25
|
-
color var(--efu-fontcolor)
|
26
|
-
border-radius 12px
|
27
|
-
padding 16px 16px 40px 16px
|
28
|
-
border var(--style-border-always)
|
29
|
-
box-shadow none
|
30
|
-
|
31
|
-
&:focus
|
32
|
-
outline none
|
33
|
-
border var(--style-border-hover-always)
|
34
|
-
box-shadow var(--efu-shadow-main)
|
35
|
-
|
36
|
-
.wl-footer
|
37
|
-
position relative
|
38
|
-
margin 0
|
39
|
-
justify-content space-around
|
40
|
-
|
41
|
-
.wl-emoji-popup
|
42
|
-
display none
|
43
|
-
position absolute
|
44
|
-
left 0
|
45
|
-
right 0
|
46
|
-
overflow hidden
|
47
|
-
max-width 500px
|
48
|
-
color #4a4a4a
|
49
|
-
top .5rem
|
50
|
-
z-index 1000
|
51
|
-
border var(--style-border-always)
|
52
|
-
border-radius 8px !important
|
53
|
-
background-color var(--efu-maskbg)
|
54
|
-
backdrop-filter saturate(180%) blur(10px)
|
55
|
-
transform translateZ(0)
|
56
|
-
animation 0.3s ease 0.1s 1 normal both running donate_effcet
|
57
|
-
|
58
|
-
button
|
59
|
-
font-size 20px
|
60
|
-
line-height 19px
|
61
|
-
list-style-type none
|
62
|
-
padding 5px 10px
|
63
|
-
border-radius 5px
|
64
|
-
display inline-block
|
65
|
-
transition .3s
|
66
|
-
text-align center
|
67
|
-
|
68
|
-
&.display
|
69
|
-
display block
|
70
|
-
|
71
|
-
.wl-tab-wrapper
|
72
|
-
max-height 197px
|
73
|
-
padding 10px
|
74
|
-
padding-right 0
|
75
|
-
overflow auto
|
76
|
-
font-size 0
|
77
|
-
margin 12px 8px
|
78
|
-
min-height 197px
|
79
|
-
|
80
|
-
.wl-tabs
|
81
|
-
margin 0
|
82
|
-
padding 0
|
83
|
-
font-size 0
|
84
|
-
background var(--efu-background)
|
85
|
-
padding-left 8px
|
86
|
-
|
87
|
-
|
88
|
-
.wl-actions
|
89
|
-
flex 1
|
90
|
-
display flex
|
91
|
-
align-items center
|
92
|
-
position absolute
|
93
|
-
top -34px
|
94
|
-
left 17px
|
95
|
-
transition all .3s ease 0s
|
96
|
-
|
97
|
-
.wl-action
|
98
|
-
display none
|
99
|
-
cursor pointer
|
100
|
-
|
101
|
-
&:hover
|
102
|
-
svg
|
103
|
-
opacity .8
|
104
|
-
|
105
|
-
&:nth-child(2)
|
106
|
-
display flex
|
107
|
-
margin-right 10px
|
108
|
-
|
109
|
-
&:nth-child(4)
|
110
|
-
display flex
|
111
|
-
|
112
|
-
.upload
|
113
|
-
display none
|
114
|
-
|
115
|
-
.wl-gif-popup
|
116
|
-
display none
|
117
|
-
|
118
|
-
.wl-info
|
119
|
-
position relative
|
120
|
-
|
121
|
-
.wl-text-number
|
122
|
-
color var(--efu-secondtext)
|
123
|
-
-webkit-user-select none
|
124
|
-
position absolute
|
125
|
-
font-size 12px
|
126
|
-
bottom 5px
|
127
|
-
right 10px
|
128
|
-
|
129
|
-
.wl-close
|
130
|
-
display none
|
131
|
-
|
132
|
-
.wl-quote
|
133
|
-
.wl-card-item
|
134
|
-
padding 1rem 0 0
|
135
|
-
|
136
|
-
.wl-reply-wrapper
|
137
|
-
order 2
|
138
|
-
width 100%
|
139
|
-
|
140
|
-
.wl-header
|
141
|
-
order 1
|
142
|
-
width calc(100% - 5.5rem)
|
143
|
-
display flex
|
144
|
-
align-items center
|
145
|
-
justify-content space-between
|
146
|
-
flex-direction row
|
147
|
-
margin .5rem 0
|
148
|
-
gap .5rem
|
149
|
-
|
150
|
-
+maxWidth899()
|
151
|
-
flex-direction column
|
152
|
-
|
153
|
-
.wl-header-item
|
154
|
-
width calc((100% - 1rem) / 3)
|
155
|
-
border-radius 12px
|
156
|
-
background var(--efu-secondbg)
|
157
|
-
border var(--style-border-always)
|
158
|
-
display inline-table
|
159
|
-
line-height normal
|
160
|
-
font-size 13px
|
161
|
-
border-collapse separate
|
162
|
-
border-spacing 0
|
163
|
-
|
164
|
-
+maxWidth899()
|
165
|
-
width 100%
|
166
|
-
|
167
|
-
label
|
168
|
-
-webkit-user-select none
|
169
|
-
border-radius 10px 0 0 10px
|
170
|
-
background-clip padding-box
|
171
|
-
padding 0 1rem
|
172
|
-
vertical-align middle
|
173
|
-
display table-cell
|
174
|
-
position relative
|
175
|
-
background var(--efu-card-bg)
|
176
|
-
|
177
|
-
input
|
178
|
-
width 100%
|
179
|
-
vertical-align middle
|
180
|
-
display table-cell
|
181
|
-
height 32px
|
182
|
-
line-height 32px
|
183
|
-
border-radius 12px
|
184
|
-
padding 8px
|
185
|
-
padding-left 16px
|
186
|
-
border-left-width 0
|
187
|
-
font-size inherit
|
188
|
-
background var(--efu-secondbg)
|
189
|
-
border none
|
190
|
-
color var(--efu-fontcolor)
|
191
|
-
|
192
|
-
&:focus
|
193
|
-
outline none
|
194
|
-
border none
|
195
|
-
|
196
|
-
.wl-btn
|
197
|
-
border-color var(--efu-fontcolor)
|
198
|
-
border-radius 12px
|
199
|
-
box-shadow var(--efu-shadow-black)
|
200
|
-
transition .3s
|
201
|
-
width 5rem
|
202
|
-
position absolute
|
203
|
-
margin-left 0.5rem
|
204
|
-
height 34px
|
205
|
-
background-color var(--efu-fontcolor)
|
206
|
-
border 0 solid var(--efu-main)
|
207
|
-
color var(--efu-background)
|
208
|
-
top 10px
|
209
|
-
right 0
|
210
|
-
opacity .2
|
211
|
-
|
212
|
-
+maxWidth899()
|
213
|
-
height 122px
|
214
|
-
|
215
|
-
&:hover
|
216
|
-
background var(--efu-main)
|
217
|
-
color var(--efu-white)
|
218
|
-
|
219
|
-
.wl-power
|
220
|
-
padding 0.5em 0
|
221
|
-
color var(--efu-gray)
|
222
|
-
font-size 0.8em
|
223
|
-
text-align end
|
224
|
-
|
225
|
-
a
|
226
|
-
color var(--efu-fontcolor)
|
227
|
-
|
228
|
-
.wl-count
|
229
|
-
display none
|
230
|
-
|
231
|
-
.wl-sort
|
232
|
-
display flex
|
233
|
-
justify-content flex-start
|
234
|
-
align-items center
|
235
|
-
flex-direction row
|
236
|
-
gap 0.5rem
|
237
|
-
margin-bottom .5rem
|
238
|
-
|
239
|
-
li
|
240
|
-
cursor pointer
|
241
|
-
background var(--efu-secondbg)
|
242
|
-
transition 0.3s
|
243
|
-
border var(--style-border-always)
|
244
|
-
border-radius 8px
|
245
|
-
font-size 14px
|
246
|
-
line-height 1
|
247
|
-
padding 8px 16px
|
248
|
-
display flex
|
249
|
-
justify-content center
|
250
|
-
align-items center
|
251
|
-
color var(--efu-fontcolor)
|
252
|
-
|
253
|
-
&:hover
|
254
|
-
background var(--efu-main)
|
255
|
-
color var(--efu-white)
|
256
|
-
transition 0.3s
|
257
|
-
border var(--style-border-hover-always)
|
258
|
-
|
259
|
-
&.active
|
260
|
-
background var(--efu-lighttext)
|
261
|
-
color var(--efu-background)
|
262
|
-
|
263
|
-
.wl-card-item
|
264
|
-
display flex
|
265
|
-
flex-direction row
|
266
|
-
word-break break-all
|
267
|
-
margin-top 0
|
268
|
-
margin-bottom 0.5rem
|
269
|
-
background var(--efu-card-bg)
|
270
|
-
transition .3s
|
271
|
-
border-radius 12px
|
272
|
-
border-top var(--style-border-dashed)
|
273
|
-
padding 1rem 1rem 1.5rem
|
274
|
-
overflow hidden
|
275
|
-
|
276
|
-
.wl-user
|
277
|
-
flex-shrink 0
|
278
|
-
text-align center
|
279
|
-
box-shadow var(--efu-shadow-border)
|
280
|
-
margin-right 16px
|
281
|
-
width 32px
|
282
|
-
height 32px
|
283
|
-
border-radius 32px
|
284
|
-
background-color rgba(144, 147, 153, 0.13)
|
285
|
-
cursor pointer
|
286
|
-
position relative
|
287
|
-
|
288
|
-
.verified-icon
|
289
|
-
position absolute
|
290
|
-
bottom -2px
|
291
|
-
right -5px
|
292
|
-
|
293
|
-
img
|
294
|
-
border-radius 32px
|
295
|
-
|
296
|
-
&:hover
|
297
|
-
img
|
298
|
-
transform rotate(360deg)
|
299
|
-
|
300
|
-
.wl-head
|
301
|
-
display flex
|
302
|
-
align-items center
|
303
|
-
|
304
|
-
.wl-nick
|
305
|
-
font-weight 700
|
306
|
-
color var(--efu-lighttext)
|
307
|
-
text-decoration none
|
308
|
-
font-size 1rem
|
309
|
-
line-height 32px
|
310
|
-
|
311
|
-
.wl-badge
|
312
|
-
color #67c23a
|
313
|
-
display inline-block
|
314
|
-
padding 0 0.5em
|
315
|
-
border-radius 4px
|
316
|
-
border 0 solid #e1f3d8
|
317
|
-
font-size .5rem
|
318
|
-
margin-left 4px
|
319
|
-
background-color #c0c23a21
|
320
|
-
|
321
|
-
.wl-time
|
322
|
-
color var(--efu-secondtext)
|
323
|
-
font-size .6rem
|
324
|
-
margin-left 0.5rem
|
325
|
-
|
326
|
-
.wl-comment-actions
|
327
|
-
display flex
|
328
|
-
align-items center
|
329
|
-
position absolute
|
330
|
-
right 40px
|
331
|
-
gap 0.5rem
|
332
|
-
|
333
|
-
button
|
334
|
-
color var(--efu-lighttext)
|
335
|
-
-webkit-user-select none
|
336
|
-
padding 0 12px 0 12px
|
337
|
-
transition .3s
|
338
|
-
border-radius 8px
|
339
|
-
background-color var(--efu-secondbg)
|
340
|
-
border var(--style-border-always)
|
341
|
-
display flex
|
342
|
-
justify-content center
|
343
|
-
align-items center
|
344
|
-
|
345
|
-
&:hover
|
346
|
-
background-color var(--efu-lighttext)
|
347
|
-
color var(--efu-card-bg)
|
348
|
-
|
349
|
-
&.wl-like
|
350
|
-
+maxWidth768()
|
351
|
-
display none
|
352
|
-
|
353
|
-
.wl-card
|
354
|
-
width 100%
|
355
|
-
display flex
|
356
|
-
flex-direction column
|
357
|
-
|
358
|
-
.wl-meta
|
359
|
-
order 2
|
360
|
-
margin .5rem 0
|
361
|
-
|
362
|
-
span
|
363
|
-
background var(--efu-secondbg)
|
364
|
-
border var(--style-border-always)
|
365
|
-
padding 1px 5px 1px 2px
|
366
|
-
border-radius 8px
|
367
|
-
margin-right 4px
|
368
|
-
color var(--efu-secondtext)
|
369
|
-
display inline
|
370
|
-
font-size .5rem
|
371
|
-
line-height 1
|
372
|
-
|
373
|
-
.wl-content
|
374
|
-
order 1
|
375
|
-
margin-top 0.5rem
|
376
|
-
overflow auto
|
377
|
-
max-height 500px
|
378
|
-
|
379
|
-
p
|
380
|
-
margin 0
|
381
|
-
|
382
|
-
img
|
383
|
-
max-width 300px
|
384
|
-
max-height 300px
|
385
|
-
vertical-align middle
|
386
|
-
|
387
|
-
pre
|
388
|
-
code
|
389
|
-
kbd
|
390
|
-
samp
|
391
|
-
font-family ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace
|
392
|
-
|
393
|
-
pre
|
394
|
-
background var(--efu-secondbg)
|
395
|
-
padding .5rem
|
396
|
-
margin 0.5rem 0
|
397
|
-
overflow auto
|
398
|
-
border-radius 0.5em
|
399
|
-
|
400
|
-
+maxWidth768()
|
401
|
-
max-width 90%
|
402
|
-
|
403
|
-
.wl-quote
|
404
|
-
order 3
|
405
|
-
|
406
|
-
+maxWidth768()
|
407
|
-
max-width 90%
|
408
|
-
|
409
|
-
.wl-operation
|
410
|
-
width 100%
|
411
|
-
|
412
|
-
.wl-btn
|
413
|
-
top 0
|
414
|
-
margin 0
|
415
|
-
width 100%
|
416
|
-
position relative
|
417
|
-
bottom 52px
|
418
|
-
left 0
|
419
|
-
cursor pointer
|
420
|
-
padding 0.75em
|
421
|
-
transition all 0.5s
|
422
|
-
font-size 0.75em
|
423
|
-
background var(--efu-card-bg)
|
424
|
-
color var(--efu-fontcolor)
|
425
|
-
border var(--style-border-always)
|
426
|
-
box-shadow var(--efu-shadow-border)
|
427
|
-
border-radius 12px
|
428
|
-
opacity 1
|
429
|
-
height auto
|
430
|
-
line-height 2
|
431
|
-
|
432
|
-
&:hover
|
433
|
-
background var(--efu-lighttext)
|
434
|
-
color var(--efu-card-bg)
|
435
|
-
|
436
|
-
.wl-loading
|
437
|
-
display flex
|
438
|
-
justify-content center
|
439
|
-
align-items center
|
440
|
-
|
441
|
-
.wl-emoji
|
442
|
-
height 32px
|
443
|
-
margin 0 0.2rem
|
444
|
-
|
445
|
-
.wl-empty
|
446
|
-
display flex
|
447
|
-
justify-content center
|
448
|
-
align-items center
|
449
|
-
color var(--efu-lighttext)
|
450
|
-
|
451
|
-
#page .wl-cards > .wl-card-item
|
452
|
-
padding 1rem 1rem 1.5rem
|
453
|
-
border var(--style-border)
|
454
|
-
border-top var(--style-border)
|
455
|
-
box-shadow var(--efu-shadow-border)
|
@@ -1,8 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @name ScoAI
|
3
|
-
* @description 一个基于AI的文章摘要生成器
|
4
|
-
* @version 1.0.0
|
5
|
-
* @author 王卓Sco
|
6
|
-
* @license GNU General Public License v3.0
|
7
|
-
*/
|
8
|
-
var ScoAI={root:"https://summary.tianli0.top",aiTalkMode:!1,aiPostExplanation:"",config:GLOBAL_CONFIG.ai,init(){this.scoGPTIsRunning=!1,this.generate(),this.AIEngine()},getTitleAndContent(){const e=document.title,t=document.getElementById("article-container"),n=t.getElementsByTagName("p"),o=t.querySelectorAll("h1, h2, h3, h4, h5");let i="";for(let e of o)i+=e.innerText+" ";for(let e of n)i+=e.innerText.replace(/https?:\/\/[^\s]+/g,"");return(e+" "+i).slice(0,1e3)},generate(){this.aiShowAnimation(this.fetch(this.getTitleAndContent(),this.config.key))},async fetch(e, t){const n=`${this.root}/?content=${encodeURIComponent(e)}&key=${encodeURIComponent(t)}&url=${encodeURIComponent(window.location.href)}`;try{const e=new AbortController,t=await fetch(n,{signal:e.signal});if(t.ok){const e=await t.json();return this.aiPostExplanation=e.summary,e.summary}throw Error("Request failed")}catch(e){return"AbortError"===e.name?console.error("Request timed out"):console.error("Request failed:",e),"获取文章摘要超时。当你出现这个问题时,可能是因为文章过长导致的AI运算量过大, 您可以稍等一下然后重新尝试。"}},aiShowAnimation(e, t=!1){const n=document.querySelector(".ai-explanation"),o=document.querySelector(".ai-tag");if(!n||this.scoGPTIsRunning)return;this.scoGPTIsRunning=!0,this.cleanSuggestions(),o.classList.add("loadingAI"),n.style.display="block",n.innerHTML='生成中...<span class="blinking-cursor"></span>';let i,s,r=!0,a=0,c=!0;const l=new IntersectionObserver((e=>{r=e[0].isIntersecting,r&&requestAnimationFrame(s)}),{threshold:0});e.then((e=>{i=performance.now(),s=()=>{if(a<e.length&&r){const c=performance.now(),g=c-i,d=e.slice(a,a+1),h=/[,。!、?,.!?]/.test(d),u=/[a-zA-Z0-9]/.test(d);g>=(h?100*Math.random()+100:u?10:25)&&(n.innerText=e.slice(0,a+1),i=c,a++,a<e.length?n.innerHTML=e.slice(0,a)+'<span class="blinking-cursor"></span>':(n.innerHTML=e,n.style.display="block",this.scoGPTIsRunning=!1,o.classList.remove("loadingAI"),l.disconnect(),t&&this.createSuggestions())),r&&requestAnimationFrame(s)}},r&&c&&setTimeout((()=>{requestAnimationFrame(s),c=!1}),3e3),l.observe(n)})).catch((e=>{console.error("检索信息失败:",e),n.innerHTML="检索信息失败",n.style.display="block",this.scoGPTIsRunning=!1,o.classList.remove("loadingAI"),l.disconnect()}))},AIEngine(){const e=document.querySelector(".ai-tag");e&&e.addEventListener("click",(()=>{this.scoGPTIsRunning||(this.aiTalkMode=!0,this.aiShowAnimation(Promise.resolve(this.config.talk),!0))}))},cleanSuggestions(){const e=document.querySelector(".ai-suggestions");e?e.innerHTML="":console.error("没有这个元素:'ai-suggestions'")},createSuggestions(){this.aiTalkMode&&this.cleanSuggestions(),this.createSuggestionItemWithAction("这篇文章讲了什么?",(()=>{this.aiShowAnimation(Promise.resolve(this.aiPostExplanation),!0)})),this.config.randomPost&&this.createSuggestionItemWithAction("带我去看看其他文章",(()=>toRandomPost())),this.aiTalkMode=!0},createSuggestionItemWithAction(e, t){const n=document.querySelector(".ai-suggestions");if(!n)return void console.error("无法找到具有class为ai-suggestions的元素");const o=document.createElement("div");o.classList.add("ai-suggestions-item"),o.textContent=e,o.addEventListener("click",t),n.appendChild(o)}};
|