hexo-theme-gnix 8.0.0 → 10.0.0
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 +4 -2
- package/include/hexo/feed.js +6 -5
- package/include/hexo/filter.js +25 -1
- package/include/hexo/generator/archive.js +116 -0
- package/include/hexo/generator/home.js +64 -0
- package/include/hexo/generator/index.js +82 -0
- package/include/hexo/generator/md_generator.js +87 -0
- package/include/hexo/generator/page.js +55 -0
- package/include/hexo/generator/tag.js +84 -0
- package/include/hexo/helper.js +38 -0
- package/include/hexo/i18n.js +183 -0
- package/include/util/article_font.js +132 -0
- package/include/util/i18n.js +280 -0
- package/include/util/theme.js +84 -0
- package/languages/en.yml +28 -0
- package/languages/zh-CN.yml +28 -0
- package/layout/archive.jsx +131 -127
- package/layout/common/article.jsx +316 -34
- package/layout/common/article_info.jsx +339 -0
- package/layout/common/article_media.jsx +11 -4
- package/layout/common/comment.jsx +15 -7
- package/layout/common/footer.jsx +6 -5
- package/layout/common/head.jsx +122 -33
- package/layout/common/navbar.jsx +195 -65
- package/layout/common/theme_selector.jsx +16 -14
- package/layout/layout.jsx +43 -5
- package/layout/misc/open_graph.jsx +162 -66
- package/layout/misc/paginator.jsx +2 -8
- package/layout/plugin/cookie_consent.jsx +252 -53
- package/layout/plugin/swup.jsx +1 -1
- package/layout/search/insight.jsx +1 -1
- package/layout/tag.jsx +3 -2
- package/layout/tags.jsx +81 -73
- package/package.json +5 -5
- package/scripts/index.js +1 -0
- package/source/css/archive.css +225 -180
- package/source/css/default.css +1223 -126
- package/source/css/responsive.css +426 -0
- package/source/css/shiki/shiki.css +12 -2081
- package/source/css/tags.css +183 -0
- package/source/css/twikoo.css +1053 -1049
- package/source/img/favicon.svg +1 -6
- package/source/img/og_image.webp +0 -0
- package/source/js/article-font-utils.js +99 -0
- package/source/js/busuanzi.js +91 -24
- package/source/js/components/chat.js +169 -50
- package/source/js/components/image-carousel.js +152 -108
- package/source/js/components/sidenote.js +210 -0
- package/source/js/components/text-image-section.js +78 -90
- package/source/js/components/theme-stacked.js +65 -33
- package/source/js/components/tree.js +30 -16
- package/source/js/decrypt.js +7 -2
- package/source/js/main.js +428 -5
- package/source/js/swup.js +39 -0
- package/source/js/theme-selector.js +26 -16
- package/include/hexo/generator.js +0 -53
- package/layout/misc/article_licensing.jsx +0 -99
- package/source/css/responsive/desktop.css +0 -36
- package/source/css/responsive/mobile.css +0 -38
- package/source/css/responsive/tablet.css +0 -43
- package/source/css/responsive/touch.css +0 -155
- package/source/img/logo.svg +0 -9
- package/source/js/archive-breadcrumb.js +0 -132
- package/source/js/host/cookieconsent/3.1.1/build/cookieconsent.min.css +0 -6
- package/source/js/host/cookieconsent/3.1.1/build/cookieconsent.min.js +0 -1
- package/source/js/swup.bundle.js +0 -1
package/source/css/archive.css
CHANGED
|
@@ -1,251 +1,296 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
1
|
+
.archive-page {
|
|
2
|
+
--archive-line: color-mix(in oklch, var(--surface1) 72%, var(--text));
|
|
3
|
+
--archive-muted: color-mix(in oklch, var(--subtext1) 78%, var(--base));
|
|
4
|
+
--archive-accent: var(--lavender);
|
|
5
|
+
display: grid;
|
|
6
|
+
gap: 1.5rem;
|
|
7
|
+
padding: 1.25em 1.25rem 0;
|
|
9
8
|
}
|
|
10
9
|
|
|
11
|
-
.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
.archive-hero {
|
|
11
|
+
display: grid;
|
|
12
|
+
grid-template-columns: minmax(0, 1fr) minmax(14rem, 18rem);
|
|
13
|
+
gap: 1.25rem;
|
|
14
|
+
align-items: start;
|
|
15
|
+
padding-bottom: 1.25rem;
|
|
16
|
+
border-bottom: 1px solid var(--archive-line);
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
.archive-eyebrow {
|
|
20
|
+
margin: 0 0 0.35rem;
|
|
21
|
+
color: var(--archive-muted);
|
|
22
|
+
font-family: var(--font-mono);
|
|
23
|
+
font-size: 0.75rem;
|
|
24
|
+
font-weight: 600;
|
|
25
|
+
letter-spacing: 0.08em;
|
|
26
|
+
text-transform: uppercase;
|
|
22
27
|
}
|
|
23
28
|
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
.archive-hero h1 {
|
|
30
|
+
margin: 0;
|
|
31
|
+
color: var(--text);
|
|
32
|
+
font-family: var(--font-serif);
|
|
33
|
+
font-size: 2.75rem;
|
|
34
|
+
font-weight: 700;
|
|
35
|
+
line-height: 1;
|
|
36
|
+
letter-spacing: 0;
|
|
26
37
|
}
|
|
27
38
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-wrap: wrap;
|
|
36
|
-
align-items: center;
|
|
37
|
-
gap: 0;
|
|
39
|
+
.archive-hero__summary {
|
|
40
|
+
max-width: 34rem;
|
|
41
|
+
margin: 1rem 0 0;
|
|
42
|
+
color: var(--subtext1);
|
|
43
|
+
font-family: var(--font-serif);
|
|
44
|
+
font-style: italic;
|
|
38
45
|
}
|
|
39
46
|
|
|
40
|
-
.archive-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
margin
|
|
47
|
+
.archive-stats {
|
|
48
|
+
display: grid;
|
|
49
|
+
gap: 0.45rem;
|
|
50
|
+
margin: 0;
|
|
44
51
|
}
|
|
45
52
|
|
|
46
|
-
.archive-
|
|
47
|
-
display:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
animation: blink 1s step-end infinite;
|
|
52
|
-
user-select: none;
|
|
53
|
+
.archive-stats > div {
|
|
54
|
+
display: grid;
|
|
55
|
+
grid-template-columns: 4.5rem minmax(0, 1fr);
|
|
56
|
+
gap: 0.65rem;
|
|
57
|
+
align-items: baseline;
|
|
53
58
|
}
|
|
54
59
|
|
|
55
|
-
.archive-
|
|
56
|
-
color: var(--
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
.archive-stats dt {
|
|
61
|
+
color: var(--archive-muted);
|
|
62
|
+
font-family: var(--font-mono);
|
|
63
|
+
font-size: 0.72rem;
|
|
64
|
+
text-transform: uppercase;
|
|
59
65
|
}
|
|
60
66
|
|
|
61
|
-
.archive-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
67
|
+
.archive-stats dd {
|
|
68
|
+
min-width: 0;
|
|
69
|
+
margin: 0;
|
|
70
|
+
color: var(--text);
|
|
71
|
+
font-weight: 700;
|
|
72
|
+
overflow-wrap: anywhere;
|
|
65
73
|
}
|
|
66
74
|
|
|
67
|
-
.archive-
|
|
68
|
-
display:
|
|
75
|
+
.archive-years {
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-wrap: wrap;
|
|
78
|
+
gap: 0.5rem 0.75rem;
|
|
69
79
|
align-items: center;
|
|
70
|
-
border: none;
|
|
71
|
-
background: transparent;
|
|
72
|
-
color: var(--yellow);
|
|
73
80
|
font-family: var(--font-mono);
|
|
74
|
-
|
|
75
|
-
|
|
81
|
+
font-size: 0.85rem;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.archive-years a {
|
|
85
|
+
color: var(--archive-muted);
|
|
86
|
+
text-decoration: none;
|
|
87
|
+
text-underline-offset: 0.25em;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.archive-years a:hover,
|
|
91
|
+
.archive-years a:focus-visible,
|
|
92
|
+
.archive-years a.is-active {
|
|
93
|
+
color: var(--archive-accent);
|
|
76
94
|
text-decoration: underline;
|
|
77
|
-
text-decoration-color: hsl(from var(--yellow) h s l / 0.6);
|
|
78
|
-
text-decoration-thickness: 1px;
|
|
79
|
-
text-underline-offset: 0.22em;
|
|
80
|
-
cursor: pointer;
|
|
81
|
-
transition:
|
|
82
|
-
transform 120ms ease,
|
|
83
|
-
color 120ms ease,
|
|
84
|
-
background 120ms ease,
|
|
85
|
-
text-decoration-color 120ms ease;
|
|
86
95
|
}
|
|
87
96
|
|
|
88
|
-
.archive-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
text-decoration-color: hsl(from var(--mauve) h s l / 0.75);
|
|
97
|
+
.archive-stack {
|
|
98
|
+
display: grid;
|
|
99
|
+
gap: 1.35rem;
|
|
92
100
|
}
|
|
93
101
|
|
|
94
|
-
.archive-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
102
|
+
.archive-group {
|
|
103
|
+
--archive-accent: var(--lavender);
|
|
104
|
+
position: relative;
|
|
105
|
+
content-visibility: auto;
|
|
106
|
+
contain-intrinsic-size: auto 18rem;
|
|
107
|
+
padding: 1.35rem 0 0;
|
|
108
|
+
border-top: 1px dashed var(--archive-line);
|
|
98
109
|
}
|
|
99
110
|
|
|
100
|
-
.archive-
|
|
101
|
-
|
|
102
|
-
color: var(--mauve);
|
|
103
|
-
text-decoration-color: hsl(from var(--mauve) h s l / 0.9);
|
|
111
|
+
.archive-group.spring {
|
|
112
|
+
--archive-accent: var(--peach);
|
|
104
113
|
}
|
|
105
114
|
|
|
106
|
-
.archive-
|
|
107
|
-
|
|
108
|
-
cursor: not-allowed;
|
|
109
|
-
text-decoration-color: hsl(from var(--subtext1) h s l / 0.4);
|
|
115
|
+
.archive-group.summer {
|
|
116
|
+
--archive-accent: var(--green);
|
|
110
117
|
}
|
|
111
118
|
|
|
112
|
-
.archive-
|
|
113
|
-
|
|
114
|
-
top: calc(100% + 6px);
|
|
115
|
-
left: 0;
|
|
116
|
-
min-width: 12rem;
|
|
117
|
-
max-height: 15rem;
|
|
118
|
-
overflow: auto;
|
|
119
|
-
background: hsl(from var(--base) h s l / 0.9);
|
|
120
|
-
border: 1px solid hsl(from var(--surface1) h s l / 0.9);
|
|
121
|
-
border-radius: 10px;
|
|
122
|
-
padding: 0.35rem;
|
|
123
|
-
box-shadow: 0 18px 50px hsl(from var(--crust) h s l / 0.45);
|
|
124
|
-
opacity: 0;
|
|
125
|
-
transform: translateY(-6px);
|
|
126
|
-
visibility: hidden;
|
|
127
|
-
pointer-events: none;
|
|
128
|
-
transition:
|
|
129
|
-
opacity 160ms ease,
|
|
130
|
-
transform 160ms ease,
|
|
131
|
-
visibility 0s linear 160ms;
|
|
132
|
-
z-index: 20;
|
|
119
|
+
.archive-group.autumn {
|
|
120
|
+
--archive-accent: var(--red);
|
|
133
121
|
}
|
|
134
122
|
|
|
135
|
-
.archive-
|
|
136
|
-
|
|
137
|
-
transform: translateY(0);
|
|
138
|
-
visibility: visible;
|
|
139
|
-
pointer-events: auto;
|
|
140
|
-
transition:
|
|
141
|
-
opacity 160ms ease,
|
|
142
|
-
transform 160ms ease,
|
|
143
|
-
visibility 0s;
|
|
123
|
+
.archive-group.winter {
|
|
124
|
+
--archive-accent: var(--blue);
|
|
144
125
|
}
|
|
145
126
|
|
|
146
|
-
.archive-
|
|
147
|
-
width: 100%;
|
|
127
|
+
.archive-group__header {
|
|
148
128
|
display: flex;
|
|
129
|
+
gap: 1rem;
|
|
130
|
+
align-items: start;
|
|
149
131
|
justify-content: space-between;
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
background: transparent;
|
|
132
|
+
margin-bottom: 1rem;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.archive-group__title {
|
|
136
|
+
margin: 0;
|
|
156
137
|
color: var(--text);
|
|
157
|
-
font-family: var(--font-
|
|
158
|
-
font-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
text-align: left;
|
|
138
|
+
font-family: var(--font-serif);
|
|
139
|
+
font-style: italic;
|
|
140
|
+
font-size: 1.7rem;
|
|
141
|
+
line-height: 1.08;
|
|
142
|
+
letter-spacing: 0;
|
|
143
|
+
padding-inline: 0.2rem;
|
|
164
144
|
}
|
|
165
145
|
|
|
166
|
-
.archive-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
146
|
+
.archive-group__count {
|
|
147
|
+
flex: 0 0 auto;
|
|
148
|
+
border: 1px solid color-mix(in oklch, var(--archive-accent) 46%, var(--archive-line));
|
|
149
|
+
border-radius: 999px;
|
|
150
|
+
color: var(--text);
|
|
151
|
+
font-family: var(--font-mono);
|
|
152
|
+
font-size: 0.78rem;
|
|
153
|
+
padding: 0.2rem 0.6rem;
|
|
171
154
|
}
|
|
172
155
|
|
|
173
|
-
.
|
|
174
|
-
|
|
175
|
-
|
|
156
|
+
.timeline {
|
|
157
|
+
position: relative;
|
|
158
|
+
display: grid;
|
|
159
|
+
gap: 0.15rem;
|
|
160
|
+
padding-left: 1.25rem;
|
|
176
161
|
}
|
|
177
162
|
|
|
178
|
-
|
|
179
|
-
.card-content {
|
|
163
|
+
.archive-item {
|
|
180
164
|
position: relative;
|
|
181
|
-
|
|
165
|
+
text-align: left;
|
|
182
166
|
}
|
|
183
167
|
|
|
184
|
-
|
|
168
|
+
.archive-item::before {
|
|
185
169
|
position: absolute;
|
|
186
|
-
top:
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
user-select: none;
|
|
170
|
+
top: 0.86rem;
|
|
171
|
+
left: -1.18rem;
|
|
172
|
+
width: 0.55rem;
|
|
173
|
+
height: 0.55rem;
|
|
174
|
+
border-radius: 999px;
|
|
175
|
+
background: transparent;
|
|
176
|
+
content: "";
|
|
177
|
+
transition:
|
|
178
|
+
background 140ms ease,
|
|
179
|
+
transform 140ms ease;
|
|
197
180
|
}
|
|
198
181
|
|
|
199
|
-
|
|
200
|
-
.
|
|
201
|
-
|
|
182
|
+
.archive-item:hover::before,
|
|
183
|
+
.archive-item:focus-within::before {
|
|
184
|
+
background: var(--archive-accent);
|
|
185
|
+
transform: scale(1.08);
|
|
202
186
|
}
|
|
203
187
|
|
|
204
|
-
.
|
|
205
|
-
|
|
188
|
+
.archive-item > div {
|
|
189
|
+
display: grid;
|
|
190
|
+
grid-template-columns: 4.9rem minmax(0, 1fr);
|
|
191
|
+
gap: 0.85rem;
|
|
192
|
+
align-items: baseline;
|
|
193
|
+
padding: 0.55rem 0.35rem 0.55rem 0;
|
|
206
194
|
}
|
|
207
195
|
|
|
208
|
-
.
|
|
209
|
-
|
|
196
|
+
.archive-item + .archive-item {
|
|
197
|
+
border-top: 1px solid color-mix(in oklch, var(--archive-line) 52%, transparent);
|
|
210
198
|
}
|
|
211
199
|
|
|
212
|
-
.
|
|
213
|
-
|
|
200
|
+
.article-meta {
|
|
201
|
+
margin: 0;
|
|
202
|
+
color: var(--archive-muted);
|
|
203
|
+
font-family: var(--font-mono);
|
|
204
|
+
font-size: 0.78rem;
|
|
205
|
+
line-height: 1.4;
|
|
206
|
+
white-space: nowrap;
|
|
214
207
|
}
|
|
215
208
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
209
|
+
a.archive-title {
|
|
210
|
+
color: var(--text);
|
|
211
|
+
font-family: var(--font-serif);
|
|
212
|
+
font-size: 1.02rem;
|
|
213
|
+
font-weight: 500;
|
|
214
|
+
line-height: 1.45;
|
|
215
|
+
overflow-wrap: anywhere;
|
|
216
|
+
text-decoration: none;
|
|
217
|
+
text-decoration-color: transparent;
|
|
218
|
+
text-decoration-thickness: 1px;
|
|
219
|
+
text-underline-offset: 0.28em;
|
|
220
|
+
transition:
|
|
221
|
+
color 140ms ease,
|
|
222
|
+
text-decoration-color 140ms ease;
|
|
222
223
|
}
|
|
223
224
|
|
|
224
|
-
.archive-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
225
|
+
a.archive-title:hover,
|
|
226
|
+
a.archive-title:focus-visible {
|
|
227
|
+
color: var(--archive-accent);
|
|
228
|
+
text-decoration-color: currentColor;
|
|
228
229
|
}
|
|
229
230
|
|
|
230
|
-
.archive-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
a.archive-title:focus-visible {
|
|
232
|
+
outline: 2px solid color-mix(in oklch, var(--archive-accent) 70%, transparent);
|
|
233
|
+
outline-offset: 3px;
|
|
234
|
+
border-radius: 3px;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
@media (max-width: 720px) {
|
|
238
|
+
.archive-page {
|
|
239
|
+
gap: 1.25rem;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.archive-hero {
|
|
243
|
+
grid-template-columns: 1fr;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.archive-hero h1 {
|
|
247
|
+
font-size: 2.35rem;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.archive-stats {
|
|
251
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
252
|
+
gap: 0.5rem;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.archive-stats > div {
|
|
256
|
+
display: block;
|
|
257
|
+
border-bottom: 0;
|
|
258
|
+
border-left: 1px solid color-mix(in oklch, var(--archive-line) 72%, transparent);
|
|
259
|
+
padding: 0 0 0 0.6rem;
|
|
260
|
+
}
|
|
234
261
|
}
|
|
235
262
|
|
|
236
|
-
/* Responsive */
|
|
237
263
|
@media (max-width: 480px) {
|
|
238
|
-
.archive-
|
|
239
|
-
padding
|
|
264
|
+
.archive-page {
|
|
265
|
+
padding: 1rem 0.875rem 0;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.archive-hero h1 {
|
|
269
|
+
font-size: 2rem;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.archive-group__header {
|
|
273
|
+
display: grid;
|
|
240
274
|
}
|
|
241
275
|
|
|
242
|
-
.archive-
|
|
243
|
-
|
|
244
|
-
max-width: calc(100vw - 2rem);
|
|
276
|
+
.archive-group__count {
|
|
277
|
+
justify-self: start;
|
|
245
278
|
}
|
|
246
279
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
280
|
+
.archive-item > div {
|
|
281
|
+
grid-template-columns: 1fr;
|
|
282
|
+
gap: 0.1rem;
|
|
283
|
+
padding: 0.7rem 0.5rem 0.7rem 0;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.article-meta {
|
|
287
|
+
white-space: normal;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
@media (prefers-reduced-motion: reduce) {
|
|
292
|
+
.archive-item::before,
|
|
293
|
+
a.archive-title {
|
|
294
|
+
transition: none;
|
|
250
295
|
}
|
|
251
296
|
}
|