hexo-theme-solitude 1.7.1 → 1.7.2
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/FUNDING.yml +2 -2
- package/_config.yml +2 -5
- package/layout/includes/inject/head.pug +1 -1
- package/layout/includes/widgets/aside/asideTag.pug +9 -4
- package/layout/includes/widgets/home/banner.pug +1 -1
- package/package.json +1 -1
- package/scripts/helper/related_post.js +5 -0
- package/scripts/helper/stylus.js +7 -39
- package/source/css/_layout/article-container.styl +197 -0
- package/source/css/_layout/aside.styl +483 -486
- package/source/css/_page/_about/{index.styl → about.styl} +13 -13
- package/source/css/_page/_home/home-top.styl +1 -6
- package/source/css/_page/_home/{index.styl → home.styl} +0 -3
- package/source/css/_page/_home/recent-post.styl +1 -0
- package/source/css/_page/category.styl +0 -2
- package/source/css/_page/error.styl +1 -1
- package/source/css/_page/google.styl +17 -17
- package/source/css/_page/index.styl +48 -15
- package/source/css/_page/moment.styl +73 -74
- package/source/css/_page/{share.styl → other.styl} +0 -2
- package/source/css/_post/content.styl +0 -197
- package/source/css/_post/index.styl +0 -3
- package/source/js/search/algolia.js +0 -10
- package/source/js/search/local.js +0 -10
- package/source/css/_page/home.styl +0 -34
package/.github/FUNDING.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# These are supported funding model platforms
|
2
2
|
|
3
|
-
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
3
|
+
github: [efuo] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
4
4
|
patreon: # Replace with a single Patreon username
|
5
5
|
open_collective: # Replace with a single Open Collective username
|
6
6
|
ko_fi: # Replace with a single Ko-fi username
|
@@ -10,4 +10,4 @@ liberapay: # Replace with a single Liberapay username
|
|
10
10
|
issuehunt: # Replace with a single IssueHunt username
|
11
11
|
otechie: # Replace with a single Otechie username
|
12
12
|
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
13
|
-
custom:
|
13
|
+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
package/_config.yml
CHANGED
@@ -251,13 +251,10 @@ aside:
|
|
251
251
|
# 显示标签数量,当高于标签总数时,显示全部标签按钮
|
252
252
|
# Display the number of tags, when it is higher than the total number of tags, display all tags button
|
253
253
|
limit: 20
|
254
|
-
# 高亮显示
|
255
|
-
# Highlight
|
256
|
-
highlight: false
|
257
254
|
# 高亮显示标签列表
|
258
255
|
# Highlighted tag list
|
259
|
-
|
260
|
-
#
|
256
|
+
highlight_list:
|
257
|
+
# - Hexo
|
261
258
|
|
262
259
|
# 侧边栏归档
|
263
260
|
# aside archive
|
@@ -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.
|
114
|
+
"%c Program: Hexo %c Theme: Solitude %c Version: v1.7.2",
|
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;"
|
@@ -1,9 +1,14 @@
|
|
1
|
+
- const highlight = theme.aside.tags.highlight_list || []
|
1
2
|
.card-tag-cloud
|
2
3
|
each tag in site.tags.find({ parent: { $exists: false } }).data
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
if highlight.includes(tag.name)
|
5
|
+
a.highlight(href=url_for(tag.path))= tag.name
|
6
|
+
sup= tag.length
|
7
|
+
else
|
8
|
+
a(href=url_for(tag.path))= tag.name
|
9
|
+
sup= tag.length
|
10
|
+
if site.tags.length >= theme.aside.tags.limit
|
11
|
+
span#more-tags-btn(onclick="sco.openAllTags()")= __('aside.tagmore')
|
7
12
|
else
|
8
13
|
style.
|
9
14
|
.card-tag-cloud::after {
|
@@ -6,7 +6,7 @@ if group
|
|
6
6
|
div.banners-links
|
7
7
|
each value,label in group
|
8
8
|
- var array = value.split('||')
|
9
|
-
a.banners-link-btn(href=url_for(trim(array[0]))
|
9
|
+
a.banners-link-btn(href=url_for(trim(array[0])) style=`background-image: ${array[2]} `)
|
10
10
|
if array[1]
|
11
11
|
i.solitude(class=array[1])
|
12
12
|
.banners-link-title= label
|
package/package.json
CHANGED
package/scripts/helper/stylus.js
CHANGED
@@ -2,20 +2,14 @@ hexo.extend.filter.register('stylus:renderer', function (style) {
|
|
2
2
|
const {config, theme} = this;
|
3
3
|
const data = hexo.locals.get('data');
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
style.define('highlightTags', array);
|
8
|
-
}
|
9
|
-
|
10
|
-
const aside = [theme.config.aside.home.noSticky, theme.config.aside.home.Sticky, theme.config.aside.post.noSticky, theme.config.aside.post.Sticky, theme.config.aside.page.Sticky, theme.config.aside.page.noSticky].join(',').split(',');
|
11
|
-
const uniqueArr = [...new Set(aside)];
|
12
|
-
if (uniqueArr.length > 0) {
|
13
|
-
style.define('aside', uniqueArr);
|
14
|
-
}
|
5
|
+
// about card
|
6
|
+
style.define('$about', data && data.about ? Object.keys(data.about) : false);
|
15
7
|
|
16
|
-
|
8
|
+
// links
|
9
|
+
style.define('$link', !!(data && data.links))
|
17
10
|
|
18
|
-
|
11
|
+
// equipment
|
12
|
+
style.define('$equipment', !!(data && data.equipment))
|
19
13
|
|
20
14
|
// highlight
|
21
15
|
const {syntax_highlighter: syntaxHighlighter, highlight, prismjs} = hexo.config
|
@@ -32,30 +26,4 @@ hexo.extend.filter.register('stylus:renderer', function (style) {
|
|
32
26
|
style.define('$highlight_line_number', highlightLineNumber)
|
33
27
|
style.define('$prismjs_enable', prismjsEnable)
|
34
28
|
style.define('$prismjs_line_number', prismjsLineNumber)
|
35
|
-
});
|
36
|
-
|
37
|
-
function initGroupColor(gg, style) {
|
38
|
-
if (gg === null || gg === undefined) {
|
39
|
-
style.define('banner_group', [])
|
40
|
-
return;
|
41
|
-
}
|
42
|
-
let group = Object.keys(gg).map(key => {
|
43
|
-
return {
|
44
|
-
[key]: (gg[key]).split('||')[2]
|
45
|
-
}
|
46
|
-
});
|
47
|
-
|
48
|
-
style.define('banner_group', group);
|
49
|
-
|
50
|
-
function getGroupColor(key) {
|
51
|
-
let color = '';
|
52
|
-
group.forEach(item => {
|
53
|
-
if (item[key]) {
|
54
|
-
color = item[key];
|
55
|
-
}
|
56
|
-
});
|
57
|
-
return color;
|
58
|
-
}
|
59
|
-
|
60
|
-
style.define('getGroupColor', getGroupColor);
|
61
|
-
}
|
29
|
+
});
|
@@ -0,0 +1,197 @@
|
|
1
|
+
#article-container
|
2
|
+
overflow-wrap break-word
|
3
|
+
+maxWidth768()
|
4
|
+
overflow hidden
|
5
|
+
|
6
|
+
iframe
|
7
|
+
border-radius 12px
|
8
|
+
margin 0 0 1rem
|
9
|
+
|
10
|
+
a
|
11
|
+
color var(--efu-fontcolor)
|
12
|
+
border-radius 4px 4px 0 0
|
13
|
+
|
14
|
+
border-bottom 2px dotted var(--efu-lighttext)
|
15
|
+
font-weight 700
|
16
|
+
|
17
|
+
&:not(.fancybox)
|
18
|
+
padding 0 4px
|
19
|
+
|
20
|
+
&:hover
|
21
|
+
border 0
|
22
|
+
text-decoration none
|
23
|
+
color var(--efu-white)
|
24
|
+
border-radius 4px
|
25
|
+
background var(--efu-main)
|
26
|
+
|
27
|
+
.table-wrap
|
28
|
+
margin 1rem 0
|
29
|
+
border-radius 8px
|
30
|
+
overflow-x scroll
|
31
|
+
|
32
|
+
a.headerlink
|
33
|
+
float right
|
34
|
+
opacity .08
|
35
|
+
position relative
|
36
|
+
padding 0
|
37
|
+
border none
|
38
|
+
border-radius 8px
|
39
|
+
line-height 1
|
40
|
+
font-size .8rem
|
41
|
+
|
42
|
+
#page &
|
43
|
+
display none
|
44
|
+
|
45
|
+
&::before
|
46
|
+
content "\e082"
|
47
|
+
font-family solitude
|
48
|
+
cursor pointer
|
49
|
+
|
50
|
+
&:hover
|
51
|
+
border-bottom none
|
52
|
+
box-shadow none
|
53
|
+
background var(--efu-none)
|
54
|
+
color var(--efu-lighttext)
|
55
|
+
opacity 1
|
56
|
+
|
57
|
+
&::before
|
58
|
+
color var(--efu-main)
|
59
|
+
|
60
|
+
p
|
61
|
+
font-size .9rem
|
62
|
+
line-height 1.7
|
63
|
+
font-weight 400
|
64
|
+
margin 1rem 0
|
65
|
+
text-align left
|
66
|
+
letter-spacing .6px
|
67
|
+
|
68
|
+
img
|
69
|
+
margin auto
|
70
|
+
|
71
|
+
a
|
72
|
+
&:not(.fancybox)
|
73
|
+
text-decoration none
|
74
|
+
border-bottom 2px dotted var(--efu-lighttext)
|
75
|
+
color var(--efu-fontcolor)
|
76
|
+
font-weight 700
|
77
|
+
padding 0 4px
|
78
|
+
border-radius 4px 4px 0 0
|
79
|
+
|
80
|
+
&:hover
|
81
|
+
color var(--efu-white)
|
82
|
+
border-radius 4px
|
83
|
+
background var(--efu-main)
|
84
|
+
|
85
|
+
code:not([class*='language-'])
|
86
|
+
color var(--efu-white)
|
87
|
+
padding 0.2rem 0.4rem
|
88
|
+
border-radius 4px
|
89
|
+
margin 0 4px
|
90
|
+
background var(--efu-pink)
|
91
|
+
line-height 2
|
92
|
+
box-shadow var(--efu-shadow-border)
|
93
|
+
|
94
|
+
img
|
95
|
+
border-radius 12px
|
96
|
+
object-fit cover
|
97
|
+
display block
|
98
|
+
margin 0.8rem auto
|
99
|
+
max-width 90%
|
100
|
+
max-height 450px
|
101
|
+
|
102
|
+
ul, ol
|
103
|
+
padding 0
|
104
|
+
margin-top 0.4rem
|
105
|
+
list-style none
|
106
|
+
counter-reset li 0
|
107
|
+
|
108
|
+
li
|
109
|
+
&:before
|
110
|
+
position absolute
|
111
|
+
top 0
|
112
|
+
left 0
|
113
|
+
color var(--efu-fontcolor)
|
114
|
+
transition all .3s ease-out 0s
|
115
|
+
background var(--efu-lighttext)
|
116
|
+
|
117
|
+
&:not(.tab)
|
118
|
+
position relative
|
119
|
+
margin 0.2rem 0
|
120
|
+
|
121
|
+
ul
|
122
|
+
> li
|
123
|
+
&:not(.tab)
|
124
|
+
padding 0.2em 0.2em 0.2em 1.4em
|
125
|
+
|
126
|
+
&:before
|
127
|
+
margin 0
|
128
|
+
top 0.78em
|
129
|
+
width 0.42em
|
130
|
+
height 0.42em
|
131
|
+
border-radius 0.42em
|
132
|
+
background 0 0
|
133
|
+
content ""
|
134
|
+
line-height .42em
|
135
|
+
border 0.21em solid var(--efu-lighttext)
|
136
|
+
background var(--efu-lighttext)
|
137
|
+
|
138
|
+
ol
|
139
|
+
> li:before
|
140
|
+
margin-top .65em
|
141
|
+
width 1.45em
|
142
|
+
height 1.45em
|
143
|
+
border-radius .725em
|
144
|
+
text-align center
|
145
|
+
font-size .85em
|
146
|
+
color var(--efu-white)
|
147
|
+
line-height 1.45em
|
148
|
+
|
149
|
+
ul li
|
150
|
+
line-height 1.7
|
151
|
+
|
152
|
+
> li
|
153
|
+
|
154
|
+
&:not(.tab)
|
155
|
+
padding .2em .2em .2em 1.8em
|
156
|
+
|
157
|
+
&:before
|
158
|
+
content counter(li)
|
159
|
+
counter-increment li 1
|
160
|
+
|
161
|
+
> ol
|
162
|
+
> li
|
163
|
+
&:before
|
164
|
+
content counter(li, lower-alpha)
|
165
|
+
counter-increment li
|
166
|
+
|
167
|
+
> ol
|
168
|
+
> li
|
169
|
+
&:before
|
170
|
+
content counter(li, lower-roman)
|
171
|
+
counter-increment li
|
172
|
+
|
173
|
+
&.post-content
|
174
|
+
h1, h2, h3, h4
|
175
|
+
display flex
|
176
|
+
align-items center
|
177
|
+
justify-content space-between
|
178
|
+
flex-direction row-reverse
|
179
|
+
transition all .2s ease-out 0s
|
180
|
+
|
181
|
+
h1
|
182
|
+
font-size 1.5rem
|
183
|
+
line-height 1.3
|
184
|
+
|
185
|
+
h2
|
186
|
+
font-size 1.3rem
|
187
|
+
line-height 1.3
|
188
|
+
border-top 1px dashed var(--efu-theme-op)
|
189
|
+
padding-top 1.5rem
|
190
|
+
|
191
|
+
h3
|
192
|
+
font-size 1.1rem
|
193
|
+
line-height 1.3
|
194
|
+
|
195
|
+
h4
|
196
|
+
font-size 1.1rem
|
197
|
+
line-height 1.3
|