hexo-theme-solitude 2.0.10 → 2.0.11
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/.github/PULL_REQUEST_TEMPLATE.md +1 -8
- package/CONTRIBUTING.md +1 -1
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/README_zh-Hans.md +1 -1
- package/README_zh-Hant.md +1 -1
- package/SECURITY.md +4 -4
- package/_config.yml +8 -27
- package/layout/includes/console.pug +1 -1
- package/layout/includes/inject/body.pug +2 -4
- package/layout/includes/nav.pug +2 -2
- package/layout/includes/widgets/aside/aside.pug +1 -1
- package/layout/includes/widgets/home/postList.pug +1 -20
- package/layout/includes/widgets/page/links/banner.pug +1 -2
- package/layout/includes/widgets/randomlink.pug +1 -2
- package/package.json +4 -3
- package/plugins.yml +5 -4
- package/scripts/event/merge_config.js +5 -15
- package/source/css/_global/function.styl +1 -1
- package/source/css/_layout/console.styl +7 -4
- package/source/css/_layout/recent-post.styl +26 -46
- package/source/css/_page/_home/home-top.styl +3 -8
- package/source/css/_page/recentcomment.styl +1 -3
- package/source/css/_post/meta.styl +2 -2
- package/source/css/_tags/gallery.styl +2 -1
- package/source/css/var.styl +7 -7
- package/source/js/covercolor/local.js +10 -82
- package/.editorconfig +0 -9
- package/.github/workflows/stale.yml +0 -19
@@ -1,10 +1,3 @@
|
|
1
|
-
<!---
|
2
|
-
☝️ PR title should follow conventional commits (https://conventionalcommits.org)
|
3
|
-
|
4
|
-
Please carefully read the contribution docs before creating a pull request
|
5
|
-
👉 https://github.com/valor-x/hexo-theme-solitude/blob/main/CONTRIBUTING.md
|
6
|
-
-->
|
7
|
-
|
8
1
|
### 🔗 链接 issue
|
9
2
|
|
10
3
|
<!-- 请确保存在未解决的问题,将编号提及为 #123(示例) -->
|
@@ -32,4 +25,4 @@ Please carefully read the contribution docs before creating a pull request
|
|
32
25
|
|
33
26
|
- [ ] 我已链接问题或讨论。
|
34
27
|
- [ ] 我已经添加了测试(如果可能的话)。
|
35
|
-
- [ ] 我已相应地更新了[文档](https://github.com/
|
28
|
+
- [ ] 我已相应地更新了[文档](https://github.com/everfu/solitude.js.org)。
|
package/CONTRIBUTING.md
CHANGED
package/LICENSE
CHANGED
package/README.md
CHANGED
@@ -20,7 +20,7 @@ English丨[简体中文](README_zh-Hans.md)丨[繁体中文](README_zh-Hant.md)
|
|
20
20
|
[](https://discord.gg/HZXAnK4Sut)
|
21
21
|

|
22
22
|
|
23
|
-
[
|
23
|
+
[Docs](https://solitude.js.org/)丨[Preview](https://solitude.js.org/preview/)丨[Author](https://blog.everfu.cn/)
|
24
24
|
|
25
25
|
</div>
|
26
26
|
|
package/README_zh-Hans.md
CHANGED
@@ -20,7 +20,7 @@
|
|
20
20
|
[](https://discord.gg/HZXAnK4Sut)
|
21
21
|

|
22
22
|
|
23
|
-
[文档](https://solitude.js.org/)丨[预览](https://solitude.js.org/preview/zh/)
|
23
|
+
[文档](https://solitude.js.org/)丨[预览](https://solitude.js.org/preview/zh/)丨[作者](https://blog.everfu.cn/)
|
24
24
|
|
25
25
|
</div>
|
26
26
|
|
package/README_zh-Hant.md
CHANGED
@@ -20,7 +20,7 @@
|
|
20
20
|
[](https://discord.gg/HZXAnK4Sut)
|
21
21
|

|
22
22
|
|
23
|
-
[文档](https://solitude.js.org/)丨[預覽](https://solitude.js.org/preview/zh/)
|
23
|
+
[文档](https://solitude.js.org/)丨[預覽](https://solitude.js.org/preview/zh/)丨[作者](https://blog.everfu.cn/)
|
24
24
|
|
25
25
|
</div>
|
26
26
|
|
package/SECURITY.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Security Policy
|
2
2
|
|
3
|
-
##
|
3
|
+
## Reporting a Vulnerability
|
4
4
|
|
5
|
-
|
5
|
+
If you discover a vulnerability, please report it privately through the [GitHub Security tab](https://github.com/everfu/hexo-theme-solitude/security/advisories/new) on the appropriate repository. For detailed instructions, refer to this [documentation](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability). If you're unable to report via GitHub, you can email us at o@everfu.org.
|
6
6
|
|
7
|
-
|
7
|
+
We take security seriously and will verify and resolve any reported vulnerabilities promptly.
|
8
8
|
|
9
|
-
|
9
|
+
To minimize risks, always use the latest version of the theme and dependencies. Keep your lock files (`yarn.lock`, `package-lock.json`) up to date to ensure maximum security.
|
package/_config.yml
CHANGED
@@ -238,16 +238,6 @@ aside:
|
|
238
238
|
index_post_list:
|
239
239
|
direction: column # row / column
|
240
240
|
column: 2 # 2: 2 columns 3: 3 columns
|
241
|
-
# 1: 1 post.description / 1: 使用自己写的文章摘要
|
242
|
-
# 2: 2 Automatically get descriptions or screenshots / 2: 自动获取描述或截图
|
243
|
-
# 3: 3 Use only interception / 3: 仅使用截取
|
244
|
-
# false: Do not display / false: 不显示
|
245
|
-
content: false
|
246
|
-
# The length of the screenshot content
|
247
|
-
# 截图内容长度
|
248
|
-
length: 500
|
249
|
-
# left: on the left : left / right: on the right : right / both: both sides : both
|
250
|
-
# left: 左侧 : left / right: 右侧 : right / both: 两侧 : both
|
251
241
|
cover: both
|
252
242
|
# --------------------------- end ---------------------------
|
253
243
|
|
@@ -382,14 +372,8 @@ post:
|
|
382
372
|
# --------------------------- start ---------------------------
|
383
373
|
# Custom Theme Color
|
384
374
|
theme_color:
|
385
|
-
dark: "#ffc848" #
|
386
|
-
|
387
|
-
dark_op_deep: "#f2b94bdd" # Dark mode transparent dark
|
388
|
-
dark_none: "#f2b94b00" # Dark mode transparent colorless
|
389
|
-
light: "#425AEF" # Light mode
|
390
|
-
light_op: "#4259ef23" # Light mode transparent
|
391
|
-
light_op_deep: "#4259efdd" # Light mode transparent dark
|
392
|
-
light_none: "#4259ef01" # Light mode transparent colorless
|
375
|
+
dark: "#ffc848" # dark
|
376
|
+
light: "#425AEF" # light
|
393
377
|
# --------------------------- end ---------------------------
|
394
378
|
|
395
379
|
# --------------------------- start ---------------------------
|
@@ -661,10 +645,8 @@ wordcount: false
|
|
661
645
|
# --------------------------- start ---------------------------
|
662
646
|
# Busuanzi
|
663
647
|
busuanzi: false
|
664
|
-
# 0:
|
665
|
-
#
|
666
|
-
# 0:使用原版的不蒜子 / 1:使用不蒜子的自定义版本
|
667
|
-
# 原版和默认的区别:请自行搜索
|
648
|
+
# 0: Original / 1: Custom
|
649
|
+
# 0: 原版 / 1: 自定义版
|
668
650
|
busuanzi_use: 0
|
669
651
|
# --------------------------- end ---------------------------
|
670
652
|
|
@@ -933,9 +915,9 @@ right_menu:
|
|
933
915
|
memorial:
|
934
916
|
enable: false
|
935
917
|
date:
|
936
|
-
# - 7-7
|
937
|
-
# - 9-18
|
938
|
-
# - 12-13 #
|
918
|
+
# - 7-7
|
919
|
+
# - 9-18
|
920
|
+
# - 12-13 # 国家公祭日
|
939
921
|
# --------------------------- end ---------------------------
|
940
922
|
|
941
923
|
# --------------------------- start ---------------------------
|
@@ -978,8 +960,7 @@ CDN:
|
|
978
960
|
version: true # Whether to use the version number
|
979
961
|
custom_format: //open.lightxi.com/cdnjs/ajax/libs/${cdnjs_name}/${version}/${min_cdnjs_file} # Custom format
|
980
962
|
# Directly override the default CDN link (highest priority)
|
981
|
-
|
982
|
-
busuanzi_qj_js: https://pv.lemonso.com/js
|
963
|
+
options:
|
983
964
|
# algolia_search:
|
984
965
|
# instantsearch:
|
985
966
|
# pjax:
|
@@ -53,7 +53,7 @@ div#console
|
|
53
53
|
i.solitude.fa-solid.fa-circle-half-stroke
|
54
54
|
div.console-btn-item#consoleHideAside
|
55
55
|
span.asideSwitch(onclick="sco.switchHideAside()", title=_p('console.switch_hideAside'))
|
56
|
-
i.solitude.
|
56
|
+
i.solitude.fas.fa-arrows-left-right-to-line
|
57
57
|
if theme.keyboard.enable
|
58
58
|
div.console-btn-item#consoleKeyboard(onclick="sco.switchKeyboard()")
|
59
59
|
span.keyboardSwitch(title=_p('console.switch_keyboard'))
|
@@ -65,6 +65,7 @@ div
|
|
65
65
|
if theme.post.covercolor.enable
|
66
66
|
case theme.post.covercolor.mode
|
67
67
|
when 'local'
|
68
|
+
script(src=url_for(theme.cdn.color_thief))
|
68
69
|
script(src=url_for(theme.cdn.cover_local))
|
69
70
|
when 'api'
|
70
71
|
script.
|
@@ -105,10 +106,7 @@ div
|
|
105
106
|
script.
|
106
107
|
carousel_swiper()
|
107
108
|
if theme.busuanzi && (theme.aside.siteinfo.uv || theme.aside.siteinfo.pv)
|
108
|
-
|
109
|
-
script(defer pjax src=url_for(theme.cdn.busuanzi_js))
|
110
|
-
else
|
111
|
-
script(defer pjax src=url_for(theme.cdn.busuanzi_qj_js))
|
109
|
+
script(defer pjax src=url_for(theme.cdn.busuanzi_js))
|
112
110
|
|
113
111
|
|
114
112
|
if theme.footer.randomlink
|
package/layout/includes/nav.pug
CHANGED
@@ -3,7 +3,7 @@ nav#nav.show
|
|
3
3
|
#blog_name
|
4
4
|
if theme.nav.group
|
5
5
|
.back-home-button(tabindex="-1")
|
6
|
-
i.back-home-button-icon.solitude.
|
6
|
+
i.back-home-button-icon.solitude.fas.fa-bars-progress
|
7
7
|
include ./widgets/nav/group
|
8
8
|
a#site-name(href=url_for("/"), title=_p('nav.site_name_title'))
|
9
9
|
if theme.site.name.class === 'i_class'
|
@@ -20,4 +20,4 @@ nav#nav.show
|
|
20
20
|
include ./widgets/nav/menu.pug
|
21
21
|
#nav-left
|
22
22
|
#nav-right
|
23
|
-
include ./widgets/nav/right.pug
|
23
|
+
include ./widgets/nav/right.pug
|
@@ -19,25 +19,6 @@ mixin info
|
|
19
19
|
|
20
20
|
a.article-title(href=url_for(post.path), title=post.title)= post.title
|
21
21
|
|
22
|
-
case theme.index_post_list.content
|
23
|
-
when false
|
24
|
-
break
|
25
|
-
when 1
|
26
|
-
.content!= post.description
|
27
|
-
when 2
|
28
|
-
if post.description
|
29
|
-
.content!= post.description
|
30
|
-
else
|
31
|
-
- const content = strip_html(post.content)
|
32
|
-
- let expert = content.substring(0, theme.index_post_list.length).replace(/\d+/g, '').replace(//g, '').replace(/&#x/g, '')
|
33
|
-
- content.length > theme.index_post_list.length ? expert += ' ...' : ''
|
34
|
-
.content!= expert
|
35
|
-
default
|
36
|
-
- const content = strip_html(post.content)
|
37
|
-
- let expert = content.substring(0, theme.index_post_list.length).replace(/\d+/g, '').replace(//g, '').replace(/&#x/g, '')
|
38
|
-
- content.length > theme.index_post_list.length ? expert += ' ...' : ''
|
39
|
-
.content!= expert
|
40
|
-
|
41
22
|
div.article-meta-wrap
|
42
23
|
span.article-meta.tags
|
43
24
|
each tag in post.tags.data
|
@@ -80,4 +61,4 @@ if theme.google_adsense && theme.google_adsense.enable && theme.google_adsense.a
|
|
80
61
|
div.recent-post-item.google-ads-warp
|
81
62
|
ins.adsbygoogle(style="display:block; text-align:center; min-width: 100%; height:" + ads_height, data-ad-layout="in-article", data-ad-format="fluid", hide-unfilled="true", data-ad-client=theme.google_adsense.client, data-ad-slot=theme.google_adsense.slot)
|
82
63
|
script.
|
83
|
-
(adsbygoogle = window.adsbygoogle || []).push({});
|
64
|
+
(adsbygoogle = window.adsbygoogle || []).push({});
|
@@ -17,7 +17,6 @@
|
|
17
17
|
- const data = site.data.links.links
|
18
18
|
- for (let i = 0; i < 2; i++)
|
19
19
|
each x in data
|
20
|
-
if x.type === "item"
|
21
20
|
- var pairs = []
|
22
21
|
each y, index in x.link_list
|
23
22
|
if (index % 2 === 0)
|
@@ -29,4 +28,4 @@
|
|
29
28
|
each y in pair
|
30
29
|
a.tags-group-icon(href=url_for(y.link), title=y.name)
|
31
30
|
img(src=y.avatar + (site.data.links.banner_suffix || ''), title=y.name)
|
32
|
-
span.tags-group-title=y.name
|
31
|
+
span.tags-group-title=y.name
|
@@ -2,7 +2,6 @@
|
|
2
2
|
- var data = site.data.links.links
|
3
3
|
if(data)
|
4
4
|
each item in data
|
5
|
-
if item.type === "item"
|
6
5
|
each y in item.link_list
|
7
6
|
- datalinks.push({ name: y.name,link: y.link})
|
8
7
|
|
@@ -41,4 +40,4 @@ if theme.footer.randomlink
|
|
41
40
|
}
|
42
41
|
|
43
42
|
linkcard.innerHTML = data + '<a class="footer-item" href="#{url_for(/links/)}">#{_p('more')}</a>';
|
44
|
-
}
|
43
|
+
}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "hexo-theme-solitude",
|
3
|
-
"version": "2.0.
|
4
|
-
"description": "A beautiful, powerful, and efficient Hexo theme developed by
|
3
|
+
"version": "2.0.11",
|
4
|
+
"description": "A beautiful, powerful, and efficient Hexo theme developed by everfu.",
|
5
5
|
"main": "package.json",
|
6
6
|
"scripts": {
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
@@ -11,7 +11,8 @@
|
|
11
11
|
"theme",
|
12
12
|
"solitude",
|
13
13
|
"Card UI Design",
|
14
|
-
"
|
14
|
+
"everfu",
|
15
|
+
"一小只托尼",
|
15
16
|
"hexo-theme-solitude"
|
16
17
|
],
|
17
18
|
"repository": {
|
package/plugins.yml
CHANGED
@@ -81,10 +81,6 @@ busuanzi_js:
|
|
81
81
|
name: busuanzi
|
82
82
|
file: bsz.pure.mini.js
|
83
83
|
version: 2.3.0
|
84
|
-
busuanzi_qj_js:
|
85
|
-
name: pearssauce-busuanzi
|
86
|
-
file: bsz.pure.js
|
87
|
-
version: 1.0.0
|
88
84
|
snackbar:
|
89
85
|
name: node-snackbar
|
90
86
|
file: dist/snackbar.min.js
|
@@ -130,3 +126,8 @@ qrcode:
|
|
130
126
|
file: qrcode.min.js
|
131
127
|
version: 1.0.0
|
132
128
|
other_name: qrcodejs
|
129
|
+
color_thief:
|
130
|
+
name: colorthief
|
131
|
+
file: color-thief.min.js
|
132
|
+
version: 2.4.0
|
133
|
+
other_name: color-thief
|
@@ -104,8 +104,6 @@ hexo.extend.filter.register('before_generate', () => {
|
|
104
104
|
index_post_list: {
|
105
105
|
direction: 'column',
|
106
106
|
column: 2,
|
107
|
-
content: false,
|
108
|
-
length: 500,
|
109
107
|
cover: 'both'
|
110
108
|
},
|
111
109
|
page: {
|
@@ -168,13 +166,7 @@ hexo.extend.filter.register('before_generate', () => {
|
|
168
166
|
},
|
169
167
|
theme_color: {
|
170
168
|
dark: "#ffc848",
|
171
|
-
|
172
|
-
dark_op_deep: "#f2b94bdd",
|
173
|
-
dark_none: "#f2b94b00",
|
174
|
-
light: "#425AEF",
|
175
|
-
light_op: "#4259ef23",
|
176
|
-
light_op_deep: "#4259efdd",
|
177
|
-
light_none: "#4259ef01"
|
169
|
+
light: "#425AEF"
|
178
170
|
},
|
179
171
|
display_mode: {
|
180
172
|
type: 'auto',
|
@@ -298,7 +290,7 @@ hexo.extend.filter.register('before_generate', () => {
|
|
298
290
|
enable: false,
|
299
291
|
modelName: 'GPT 3',
|
300
292
|
key: 'your key',
|
301
|
-
talk: '
|
293
|
+
talk: '我是 Ai 机器人',
|
302
294
|
randomPost: false,
|
303
295
|
tips: 'AI is not perfect, please use it with caution.'
|
304
296
|
},
|
@@ -361,7 +353,7 @@ hexo.extend.filter.register('before_generate', () => {
|
|
361
353
|
'font-size': '16px',
|
362
354
|
'code-font-size': '16px',
|
363
355
|
'font-family': 'PingFang SC, Hiragino Sans GB,Microsoft YaHei',
|
364
|
-
'code-font-family': 'monospace, monospace',
|
356
|
+
'code-font-family': '"monospace", monospace',
|
365
357
|
},
|
366
358
|
extends: {
|
367
359
|
head: [],
|
@@ -420,10 +412,8 @@ hexo.extend.filter.register('before_generate', () => {
|
|
420
412
|
internal: 'local',
|
421
413
|
third_party: 'cdnjs',
|
422
414
|
version: true,
|
423
|
-
custom_format: '
|
424
|
-
option: {
|
425
|
-
solitude_css: 'https://cdn2.codesign.qq.com/icons/7pOrz0WXB5ZWJPX/latest/iconfont.css',
|
426
|
-
}
|
415
|
+
custom_format: '//open.lightxi.com/cdnjs/ajax/libs/${cdnjs_name}/${version}/${min_cdnjs_file}',
|
416
|
+
option: {}
|
427
417
|
}
|
428
418
|
}
|
429
419
|
hexo.theme.config = Object.assign(defaultConfig, hexo.theme.config)
|
@@ -34,6 +34,7 @@
|
|
34
34
|
transform translateY(20px)
|
35
35
|
transition .3s
|
36
36
|
max-width 1400px
|
37
|
+
min-width 1000px
|
37
38
|
|
38
39
|
+maxWidth1300()
|
39
40
|
justify-content center
|
@@ -69,8 +70,7 @@
|
|
69
70
|
overflow hidden
|
70
71
|
|
71
72
|
+maxWidth1300()
|
72
|
-
|
73
|
-
margin 0
|
73
|
+
display none
|
74
74
|
|
75
75
|
.console-card
|
76
76
|
background var(--efu-maskbg)
|
@@ -79,6 +79,9 @@
|
|
79
79
|
border var(--style-border)
|
80
80
|
box-shadow var(--efu-shadow-border)
|
81
81
|
padding 40px
|
82
|
+
gap 24px
|
83
|
+
display: flex
|
84
|
+
flex-direction: column
|
82
85
|
|
83
86
|
.console-card.tags
|
84
87
|
height calc(100% - 172px)
|
@@ -179,10 +182,10 @@
|
|
179
182
|
|
180
183
|
.console-card.tags
|
181
184
|
.card-tag-cloud
|
182
|
-
margin-top 1.5rem
|
183
185
|
display flex
|
184
186
|
gap .5rem
|
185
187
|
flex-wrap wrap
|
188
|
+
verflow-y: scroll
|
186
189
|
|
187
190
|
a
|
188
191
|
color var(--efu-fontcolor)
|
@@ -308,4 +311,4 @@
|
|
308
311
|
|
309
312
|
#consoleHideAside
|
310
313
|
+maxWidth768()
|
311
|
-
display none
|
314
|
+
display none
|
@@ -92,26 +92,18 @@ if hexo-config('index_post_list.direction') == "column"
|
|
92
92
|
border-radius: 12px 12px 0 0
|
93
93
|
|
94
94
|
> .recent-post-info
|
95
|
-
height
|
95
|
+
height 100%
|
96
96
|
width 100%
|
97
|
+
padding 18px 32px 18px 32px
|
97
98
|
cursor pointer
|
98
99
|
position relative
|
99
|
-
|
100
|
-
display inline-block
|
100
|
+
display flex
|
101
101
|
overflow hidden
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
-webkit-box-orient vertical
|
108
|
-
padding 5px 32px
|
109
|
-
opacity .8
|
110
|
-
font-size 14px
|
111
|
-
line-height 1.8
|
112
|
-
|
113
|
-
+maxWidth600()
|
114
|
-
-webkit-line-clamp 1
|
102
|
+
flex-direction column
|
103
|
+
gap 16px
|
104
|
+
justify-content space-between
|
105
|
+
+minWidth1300()
|
106
|
+
min-height 165px
|
115
107
|
|
116
108
|
span.tags-punctuation
|
117
109
|
transition .3s
|
@@ -122,7 +114,6 @@ if hexo-config('index_post_list.direction') == "column"
|
|
122
114
|
.recent-post-info-top
|
123
115
|
position relative
|
124
116
|
transition .3s
|
125
|
-
padding 0 32px
|
126
117
|
width 100%
|
127
118
|
|
128
119
|
.article-title
|
@@ -137,10 +128,11 @@ if hexo-config('index_post_list.direction') == "column"
|
|
137
128
|
display -webkit-box
|
138
129
|
overflow hidden
|
139
130
|
-webkit-box-orient vertical
|
131
|
+
+minWidth1300()
|
132
|
+
font-size 30px
|
140
133
|
|
141
134
|
.recent-post-info-top-tips
|
142
135
|
display flex
|
143
|
-
margin-top 20px
|
144
136
|
user-select none
|
145
137
|
|
146
138
|
> .sticky-warp
|
@@ -172,8 +164,10 @@ if hexo-config('index_post_list.direction') == "column"
|
|
172
164
|
color var(--efu-card-bg)
|
173
165
|
|
174
166
|
/.article-meta-wrap
|
175
|
-
|
176
|
-
|
167
|
+
color var(--efu-fontcolor)
|
168
|
+
font-size .7rem
|
169
|
+
user-select none
|
170
|
+
position relative
|
177
171
|
transition .3s
|
178
172
|
display flex
|
179
173
|
flex-direction row
|
@@ -181,10 +175,7 @@ if hexo-config('index_post_list.direction') == "column"
|
|
181
175
|
justify-content space-between
|
182
176
|
width 100%
|
183
177
|
left 0
|
184
|
-
padding 0 32px
|
185
178
|
white-space nowrap
|
186
|
-
color var(--efu-fontcolor)
|
187
|
-
font-size .7rem
|
188
179
|
|
189
180
|
> .article-meta
|
190
181
|
margin 0 8px 0 0
|
@@ -325,30 +316,21 @@ else if hexo-config('index_post_list.direction') == "row"
|
|
325
316
|
border-radius: 12px 12px 0 0
|
326
317
|
|
327
318
|
> .recent-post-info
|
328
|
-
height
|
319
|
+
height 100%
|
329
320
|
width 100%
|
321
|
+
padding 18px 32px 18px 32px
|
330
322
|
cursor pointer
|
331
323
|
position relative
|
332
|
-
|
333
|
-
display inline-block
|
324
|
+
display flex
|
334
325
|
overflow hidden
|
326
|
+
flex-direction column
|
327
|
+
gap 16px
|
328
|
+
justify-content space-between
|
329
|
+
+minWidth1300()
|
330
|
+
min-height 165px
|
335
331
|
+maxWidth768()
|
336
332
|
order 2
|
337
333
|
|
338
|
-
.content
|
339
|
-
-webkit-line-clamp 3
|
340
|
-
display -webkit-box
|
341
|
-
overflow hidden
|
342
|
-
-webkit-box-orient vertical
|
343
|
-
padding 5px 32px
|
344
|
-
opacity .8
|
345
|
-
font-size 14px
|
346
|
-
line-height 1.8
|
347
|
-
+maxWidth768()
|
348
|
-
-webkit-line-clamp 2
|
349
|
-
+maxWidth600()
|
350
|
-
-webkit-line-clamp 1
|
351
|
-
|
352
334
|
span.tags-punctuation
|
353
335
|
transition .3s
|
354
336
|
|
@@ -358,7 +340,6 @@ else if hexo-config('index_post_list.direction') == "row"
|
|
358
340
|
.recent-post-info-top
|
359
341
|
position relative
|
360
342
|
transition .3s
|
361
|
-
padding 0 32px
|
362
343
|
width 100%
|
363
344
|
|
364
345
|
.article-title
|
@@ -410,8 +391,10 @@ else if hexo-config('index_post_list.direction') == "row"
|
|
410
391
|
color var(--efu-card-bg)
|
411
392
|
|
412
393
|
/.article-meta-wrap
|
413
|
-
|
414
|
-
|
394
|
+
color var(--efu-fontcolor)
|
395
|
+
font-size .7rem
|
396
|
+
user-select none
|
397
|
+
position relative
|
415
398
|
transition .3s
|
416
399
|
display flex
|
417
400
|
flex-direction row
|
@@ -419,10 +402,7 @@ else if hexo-config('index_post_list.direction') == "row"
|
|
419
402
|
justify-content space-between
|
420
403
|
width 100%
|
421
404
|
left 0
|
422
|
-
padding 0 32px
|
423
405
|
white-space nowrap
|
424
|
-
color var(--efu-fontcolor)
|
425
|
-
font-size .7rem
|
426
406
|
+maxWidth768()
|
427
407
|
bottom 16px
|
428
408
|
|
@@ -28,6 +28,7 @@
|
|
28
28
|
justify-content start
|
29
29
|
flex-wrap wrap
|
30
30
|
align-content space-between
|
31
|
+
width 100%
|
31
32
|
gap .5rem
|
32
33
|
|
33
34
|
+maxWidth1200()
|
@@ -79,7 +80,7 @@
|
|
79
80
|
.top-post-item
|
80
81
|
display flex
|
81
82
|
flex-direction column
|
82
|
-
|
83
|
+
flex 1 1 30%
|
83
84
|
align-items flex-start
|
84
85
|
background var(--efu-card-bg)
|
85
86
|
border-radius 12px
|
@@ -92,10 +93,6 @@
|
|
92
93
|
box-shadow var(--efu-shadow-border)
|
93
94
|
min-width fit-content
|
94
95
|
|
95
|
-
&:nth-last-child(2):nth-child(1),
|
96
|
-
&:nth-last-child(1):nth-child(2)
|
97
|
-
width calc(100% / 2 - 0.5rem)
|
98
|
-
|
99
96
|
+maxWidth1200()
|
100
97
|
width 200px
|
101
98
|
min-width 200px
|
@@ -272,9 +269,7 @@
|
|
272
269
|
color var(--efu-white)
|
273
270
|
position relative
|
274
271
|
background-size 200%
|
275
|
-
|
276
|
-
&:not(:last-child)
|
277
|
-
margin-right 10px
|
272
|
+
margin-right 10px
|
278
273
|
|
279
274
|
&:hover
|
280
275
|
background-position 100% 0
|
@@ -1,15 +1,13 @@
|
|
1
1
|
div.console_recentcomments
|
2
2
|
display flex
|
3
3
|
flex-wrap wrap
|
4
|
-
gap
|
4
|
+
gap 8px
|
5
5
|
min-height 100px
|
6
6
|
width 100%
|
7
|
-
margin-top .5rem
|
8
7
|
|
9
8
|
.comment-card
|
10
9
|
position relative
|
11
10
|
width calc(100% / 3 - 8px)
|
12
|
-
min-width fit-content
|
13
11
|
background var(--efu-card-bg)
|
14
12
|
border-radius 12px
|
15
13
|
border var(--style-border-always)
|
@@ -114,7 +114,7 @@
|
|
114
114
|
overflow hidden
|
115
115
|
margin 0 -20% 0 auto
|
116
116
|
transform rotate(10deg) translateY(-8%) scale(1.8)
|
117
|
-
filter blur(
|
117
|
+
filter blur(30px)
|
118
118
|
opacity 0
|
119
119
|
|
120
120
|
&.loaded
|
@@ -383,4 +383,4 @@
|
|
383
383
|
background var(--efu-hovertext)
|
384
384
|
border-radius 12px 12px 0 0
|
385
385
|
+minWidth768()
|
386
|
-
min-height 250px
|
386
|
+
min-height 250px
|
package/source/css/var.styl
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
error_img = hexo-config('errorpage.img')
|
2
2
|
|
3
3
|
$dark_theme = convert(hexo-config('theme_color.dark'))
|
4
|
-
$dark_theme_op = convert(hexo-config('theme_color.
|
5
|
-
$dark_theme_op_deep = convert(hexo-config('theme_color.
|
6
|
-
$dark_theme_none = convert(hexo-config('theme_color.
|
4
|
+
$dark_theme_op = convert(hexo-config('theme_color.dark') + '23')
|
5
|
+
$dark_theme_op_deep = convert(hexo-config('theme_color.dark') + 'dd')
|
6
|
+
$dark_theme_none = convert(hexo-config('theme_color.dark') + '00')
|
7
7
|
$light_theme = convert(hexo-config('theme_color.light'))
|
8
|
-
$light_theme_op = convert(hexo-config('theme_color.
|
9
|
-
$light_theme_op_deep = convert(hexo-config('theme_color.
|
10
|
-
$light_theme_none = hexo-config('theme_color.
|
8
|
+
$light_theme_op = convert(hexo-config('theme_color.light') + '23')
|
9
|
+
$light_theme_op_deep = convert(hexo-config('theme_color.light') + 'dd')
|
10
|
+
$light_theme_none = convert(hexo-config('theme_color.light') + '00')
|
11
11
|
|
12
12
|
$todayCardColor = convert(hexo-config('hometop.recommendList.color'))
|
13
13
|
|
@@ -29,4 +29,4 @@ $line-height-code-block = 1.6
|
|
29
29
|
$font-size = unquote(hexo-config('font.font-size'))
|
30
30
|
$code-font-size = unquote(hexo-config('font.code-font-size'))
|
31
31
|
$font-family = unquote(hexo-config('font.font-family'))
|
32
|
-
$code-font-family = unquote(hexo-config('font.code-font-family'))
|
32
|
+
$code-font-family = unquote(hexo-config('font.code-font-family'))
|
@@ -12,93 +12,21 @@ function setDefaultThemeColors() {
|
|
12
12
|
}
|
13
13
|
|
14
14
|
const localColor = path => {
|
15
|
+
var colorThief = new ColorThief();
|
15
16
|
const img = new Image();
|
16
17
|
img.crossOrigin = "Anonymous";
|
17
|
-
img.onload = () => setThemeColors(
|
18
|
+
img.onload = () => setThemeColors(rgbToHex(colorThief.getColor(img)));
|
18
19
|
img.onerror = () => console.error('Image Error');
|
19
20
|
img.src = path;
|
20
21
|
}
|
21
22
|
|
22
|
-
const
|
23
|
-
|
24
|
-
const
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
return getContrastYIQ(value) === "light" ? LightenDarkenColor(value, -50) : LightenDarkenColor(value, 20);
|
30
|
-
}
|
31
|
-
|
32
|
-
function calculateRGB(data) {
|
33
|
-
let r = 0, g = 0, b = 0;
|
34
|
-
const step = 5;
|
35
|
-
for (let i = 0; i < data.length; i += 4 * step) {
|
36
|
-
r += data[i];
|
37
|
-
g += data[i + 1];
|
38
|
-
b += data[i + 2];
|
39
|
-
}
|
40
|
-
r = Math.floor(r / (data.length / 4 / step));
|
41
|
-
g = Math.floor(g / (data.length / 4 / step));
|
42
|
-
b = Math.floor(b / (data.length / 4 / step));
|
43
|
-
return {r, g, b};
|
44
|
-
}
|
45
|
-
|
46
|
-
function rgbToHex(r, g, b) {
|
47
|
-
return "#" + [r, g, b].map(x => x.toString(16).padStart(2, '0')).join('');
|
48
|
-
}
|
49
|
-
|
50
|
-
function LightenDarkenColor(col, amt) {
|
51
|
-
let usePound = false;
|
52
|
-
|
53
|
-
if (col[0] === "#") {
|
54
|
-
col = col.slice(1);
|
55
|
-
usePound = true;
|
56
|
-
}
|
57
|
-
|
58
|
-
const num = parseInt(col, 16);
|
59
|
-
const r = Math.min(255, Math.max(0, (num >> 16) + amt * 2));
|
60
|
-
const b = Math.min(255, Math.max(0, ((num >> 8) & 0xff) + amt * 2));
|
61
|
-
const g = Math.min(255, Math.max(0, (num & 0xff) + amt * 2));
|
62
|
-
|
63
|
-
return `${usePound ? "#" : ""}${(g | (b << 8) | (r << 16)).toString(16).padStart(6, "0")}`;
|
64
|
-
}
|
65
|
-
|
66
|
-
function getContrastYIQ(hexcolor) {
|
67
|
-
let colorrgb = colorRgb(hexcolor);
|
68
|
-
let colors = colorrgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
|
69
|
-
let red = colors[1];
|
70
|
-
let green = colors[2];
|
71
|
-
let blue = colors[3];
|
72
|
-
let brightness = (red * 299) + (green * 587) + (blue * 114);
|
73
|
-
brightness = brightness / 255000;
|
74
|
-
return brightness >= 0.5 ? "light" : "dark";
|
75
|
-
}
|
76
|
-
|
77
|
-
function colorRgb(str) {
|
78
|
-
const HEX_SHORT_REGEX = /^#([0-9a-fA-f]{3})$/;
|
79
|
-
const HEX_LONG_REGEX = /^#([0-9a-fA-f]{6})$/;
|
80
|
-
const HEX_SHORT_LENGTH = 4;
|
81
|
-
|
82
|
-
if (!str || typeof str !== 'string') {
|
83
|
-
return str;
|
84
|
-
}
|
85
|
-
|
86
|
-
const sColor = str.toLowerCase();
|
87
|
-
let hexValue = "";
|
88
|
-
|
89
|
-
if (sColor && (HEX_SHORT_REGEX.test(sColor) || HEX_LONG_REGEX.test(sColor))) {
|
90
|
-
hexValue = sColor.length === HEX_SHORT_LENGTH ?
|
91
|
-
sColor.replace(/^#(.)/g, "#$1$1") :
|
92
|
-
sColor;
|
93
|
-
|
94
|
-
const rgbValue = hexValue.slice(1)
|
95
|
-
.match(/.{2}/g)
|
96
|
-
.map(val => parseInt(val, 16));
|
97
|
-
|
98
|
-
return `rgb(${rgbValue[0]}, ${rgbValue[1]}, ${rgbValue[2]})`;
|
99
|
-
} else {
|
100
|
-
return sColor;
|
101
|
-
}
|
23
|
+
const rgbToHex = ([r, g, b]) => {
|
24
|
+
const hex = '#' + [r, g, b].map(x => {
|
25
|
+
const component = Math.floor(x * 0.8);
|
26
|
+
const hexValue = component.toString(16);
|
27
|
+
return hexValue.length === 1 ? '0' + hexValue : hexValue;
|
28
|
+
}).join('');
|
29
|
+
return hex;
|
102
30
|
}
|
103
31
|
|
104
32
|
function setThemeColors(value, r = null, g = null, b = null) {
|
@@ -139,4 +67,4 @@ function setThemeColors(value, r = null, g = null, b = null) {
|
|
139
67
|
document.documentElement.style.setProperty('--efu-main-none', 'var(--efu-theme-none)');
|
140
68
|
initThemeColor();
|
141
69
|
}
|
142
|
-
}
|
70
|
+
}
|
package/.editorconfig
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
name: 'Close stale issues and PRs'
|
2
|
-
on:
|
3
|
-
schedule:
|
4
|
-
- cron: '30 1 * * *'
|
5
|
-
|
6
|
-
jobs:
|
7
|
-
stale:
|
8
|
-
runs-on: ubuntu-latest
|
9
|
-
steps:
|
10
|
-
- uses: actions/stale@v5
|
11
|
-
with:
|
12
|
-
days-before-issue-stale: 30
|
13
|
-
days-before-pr-stale: -1
|
14
|
-
days-before-close: 7
|
15
|
-
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
|
16
|
-
close-pr-message: 'This issue has not seen any activity since it was marked stale. Closing.'
|
17
|
-
stale-issue-label: 'Stale'
|
18
|
-
exempt-issue-labels: 'pinned,bug,enhancement,documentation,Plan'
|
19
|
-
operations-per-run: 1000
|