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.
Files changed (66) hide show
  1. package/README.md +4 -2
  2. package/include/hexo/feed.js +6 -5
  3. package/include/hexo/filter.js +25 -1
  4. package/include/hexo/generator/archive.js +116 -0
  5. package/include/hexo/generator/home.js +64 -0
  6. package/include/hexo/generator/index.js +82 -0
  7. package/include/hexo/generator/md_generator.js +87 -0
  8. package/include/hexo/generator/page.js +55 -0
  9. package/include/hexo/generator/tag.js +84 -0
  10. package/include/hexo/helper.js +38 -0
  11. package/include/hexo/i18n.js +183 -0
  12. package/include/util/article_font.js +132 -0
  13. package/include/util/i18n.js +280 -0
  14. package/include/util/theme.js +84 -0
  15. package/languages/en.yml +28 -0
  16. package/languages/zh-CN.yml +28 -0
  17. package/layout/archive.jsx +131 -127
  18. package/layout/common/article.jsx +316 -34
  19. package/layout/common/article_info.jsx +339 -0
  20. package/layout/common/article_media.jsx +11 -4
  21. package/layout/common/comment.jsx +15 -7
  22. package/layout/common/footer.jsx +6 -5
  23. package/layout/common/head.jsx +122 -33
  24. package/layout/common/navbar.jsx +195 -65
  25. package/layout/common/theme_selector.jsx +16 -14
  26. package/layout/layout.jsx +43 -5
  27. package/layout/misc/open_graph.jsx +162 -66
  28. package/layout/misc/paginator.jsx +2 -8
  29. package/layout/plugin/cookie_consent.jsx +252 -53
  30. package/layout/plugin/swup.jsx +1 -1
  31. package/layout/search/insight.jsx +1 -1
  32. package/layout/tag.jsx +3 -2
  33. package/layout/tags.jsx +81 -73
  34. package/package.json +5 -5
  35. package/scripts/index.js +1 -0
  36. package/source/css/archive.css +225 -180
  37. package/source/css/default.css +1223 -126
  38. package/source/css/responsive.css +426 -0
  39. package/source/css/shiki/shiki.css +12 -2081
  40. package/source/css/tags.css +183 -0
  41. package/source/css/twikoo.css +1053 -1049
  42. package/source/img/favicon.svg +1 -6
  43. package/source/img/og_image.webp +0 -0
  44. package/source/js/article-font-utils.js +99 -0
  45. package/source/js/busuanzi.js +91 -24
  46. package/source/js/components/chat.js +169 -50
  47. package/source/js/components/image-carousel.js +152 -108
  48. package/source/js/components/sidenote.js +210 -0
  49. package/source/js/components/text-image-section.js +78 -90
  50. package/source/js/components/theme-stacked.js +65 -33
  51. package/source/js/components/tree.js +30 -16
  52. package/source/js/decrypt.js +7 -2
  53. package/source/js/main.js +428 -5
  54. package/source/js/swup.js +39 -0
  55. package/source/js/theme-selector.js +26 -16
  56. package/include/hexo/generator.js +0 -53
  57. package/layout/misc/article_licensing.jsx +0 -99
  58. package/source/css/responsive/desktop.css +0 -36
  59. package/source/css/responsive/mobile.css +0 -38
  60. package/source/css/responsive/tablet.css +0 -43
  61. package/source/css/responsive/touch.css +0 -155
  62. package/source/img/logo.svg +0 -9
  63. package/source/js/archive-breadcrumb.js +0 -132
  64. package/source/js/host/cookieconsent/3.1.1/build/cookieconsent.min.css +0 -6
  65. package/source/js/host/cookieconsent/3.1.1/build/cookieconsent.min.js +0 -1
  66. package/source/js/swup.bundle.js +0 -1
@@ -0,0 +1,426 @@
1
+ @charset "UTF-8";
2
+
3
+ @media (min-width: 900px) {
4
+ .article-font-popover {
5
+ width: clamp(864px, 67.2vw, 1056px);
6
+ min-width: 864px;
7
+ max-width: 96vw;
8
+
9
+ .article-popover-header {
10
+ padding: 1rem 1.5rem;
11
+ }
12
+
13
+ .article-popover-body {
14
+ display: grid;
15
+ grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
16
+ gap: 0;
17
+ align-items: start;
18
+ padding: 0;
19
+ }
20
+
21
+ .font-settings-column {
22
+ max-width: 36rem;
23
+ padding: 1.5rem;
24
+ border-right: 1px dashed var(--surface0);
25
+ }
26
+
27
+ .font-preview-column {
28
+ min-width: 0;
29
+ padding: 1.5rem;
30
+ background: linear-gradient(180deg, hsl(from var(--base) h s calc(l + 0.02) / 0.72), hsl(from var(--mantle) h s l / 0.94));
31
+ }
32
+
33
+ .font-setting-group {
34
+ min-width: 0;
35
+ }
36
+
37
+ .font-preview-group {
38
+ align-self: start;
39
+ width: 100%;
40
+ }
41
+
42
+ .font-preview-box {
43
+ min-height: 100%;
44
+ padding: 1.75rem 1.875rem;
45
+ border-radius: 18px;
46
+ box-shadow:
47
+ inset 0 0 0 1px hsl(from var(--surface0) h s l / 0.8),
48
+ 0 18px 40px -28px rgba(0, 0, 0, 0.32);
49
+ }
50
+
51
+ .font-preview-title {
52
+ margin-bottom: 0.875rem;
53
+ font-size: 1.5em;
54
+ line-height: 1.3;
55
+ }
56
+
57
+ .font-preview-excerpt {
58
+ font-size: 1em;
59
+ }
60
+ }
61
+ }
62
+
63
+ @media (min-width: 900px) {
64
+ :popover-open.article-font-popover {
65
+ width: clamp(864px, 67.2vw, 1056px);
66
+ min-width: 864px;
67
+ max-width: 96vw;
68
+ }
69
+ }
70
+
71
+ @media screen and (max-width: 768px) {
72
+ #icarus-toc-container {
73
+ .toc {
74
+ max-height: 70vh;
75
+ width: min(86vw, 420px);
76
+ }
77
+
78
+ .toc-item {
79
+ margin-bottom: 0.35rem;
80
+ }
81
+
82
+ .toc-child {
83
+ padding-left: 1rem;
84
+ }
85
+
86
+ .toc-text {
87
+ .toc-level-2 & {
88
+ font-size: 1.25rem;
89
+ }
90
+ .toc-level-3 & {
91
+ font-size: 1.15rem;
92
+ }
93
+ .toc-level-4 & {
94
+ font-size: 1rem;
95
+ }
96
+ .toc-level-5 & {
97
+ font-size: 0.9rem;
98
+ }
99
+ .toc-level-6 & {
100
+ font-size: 0.8rem;
101
+ }
102
+ }
103
+ }
104
+
105
+ span.year {
106
+ font-size: 3em !important;
107
+ }
108
+
109
+ .font-weight-selector {
110
+ margin-bottom: 0.5rem;
111
+ }
112
+
113
+ .is-hidden-mobile {
114
+ display: none;
115
+ }
116
+
117
+ table {
118
+ font-size: 14px;
119
+ }
120
+
121
+ th,
122
+ td {
123
+ padding: 8px 12px;
124
+ }
125
+
126
+ .section {
127
+ padding: 0;
128
+ }
129
+
130
+ .main-content {
131
+ width: 100%;
132
+ }
133
+
134
+ .card-content {
135
+ padding: 1rem 0.875rem 0;
136
+ }
137
+
138
+ .cover-image {
139
+ max-height: 25vh;
140
+ border-radius: 0;
141
+ }
142
+
143
+ .pagination {
144
+ height: 2.5em;
145
+ }
146
+
147
+ .article-comment-popover,
148
+ .article-comment-popover-body {
149
+ width: calc(100vw - 1rem);
150
+ max-width: calc(100vw - 1rem);
151
+ }
152
+
153
+ .article-comment-popover-body {
154
+ max-height: calc(90dvh - 4.25rem);
155
+ }
156
+
157
+ .article-comment-panel {
158
+ padding: 1rem 1.75rem;
159
+ }
160
+
161
+ :popover-open.article-comment-popover {
162
+ width: calc(100vw - 1rem);
163
+ max-width: calc(100vw - 1rem);
164
+ }
165
+
166
+ .article-comment-popover-body {
167
+ padding: 0;
168
+ }
169
+ }
170
+
171
+ @media screen and (min-width: 769px) {
172
+ .is-hidden-tablet {
173
+ display: none;
174
+ }
175
+
176
+ .level {
177
+ display: flex;
178
+ flex-grow: 1;
179
+ }
180
+
181
+ .pagination-list {
182
+ flex-grow: 1;
183
+ flex-shrink: 1;
184
+ justify-content: flex-start;
185
+ order: 1;
186
+ }
187
+
188
+ .pagination-previous {
189
+ order: 2;
190
+ }
191
+
192
+ .pagination-next {
193
+ order: 3;
194
+ }
195
+
196
+ .pagination {
197
+ justify-content: space-between;
198
+ }
199
+
200
+ .pagination-previous {
201
+ order: 1;
202
+ }
203
+
204
+ .pagination-list {
205
+ justify-content: center;
206
+ order: 2;
207
+ }
208
+
209
+ .pagination-next {
210
+ order: 3;
211
+ }
212
+ }
213
+
214
+ @media screen and (max-width: 1023px) {
215
+ /* This is used for mobile and tablet devices */
216
+ /* #region Navbar */
217
+ /* Navbar Burger */
218
+ .navbar-menu {
219
+ display: none;
220
+ }
221
+
222
+ .navbar-menu.is-active {
223
+ display: block;
224
+ position: fixed;
225
+ top: 4rem;
226
+ left: 0;
227
+ width: 100%;
228
+ height: 100vh;
229
+ background-color: var(--mantle);
230
+ overflow-y: auto;
231
+ }
232
+
233
+ .navbar-start {
234
+ display: flex;
235
+ flex-direction: column;
236
+ height: 70%;
237
+ }
238
+
239
+ .navbar-end {
240
+ justify-content: center;
241
+ display: inline-flex;
242
+ flex-direction: row;
243
+ width: 100%;
244
+ > .navbar-item {
245
+ font-size: 1.25em;
246
+ padding: 1em;
247
+ }
248
+ }
249
+
250
+ .navbar-burger {
251
+ position: relative;
252
+ width: 4rem;
253
+ margin-left: auto;
254
+ color: var(--text);
255
+ > span {
256
+ background-color: currentColor;
257
+ height: 2px;
258
+ left: calc(50% - 8px);
259
+ position: absolute;
260
+ transform-origin: center;
261
+ transition-duration: 86ms;
262
+ transition-property: background-color, opacity, transform;
263
+ transition-timing-function: ease-out;
264
+ width: 16px;
265
+
266
+ &:nth-child(1) {
267
+ top: calc(50% - 6px);
268
+ }
269
+
270
+ &:nth-child(2) {
271
+ top: calc(50% - 1px);
272
+ }
273
+
274
+ &:nth-child(3) {
275
+ top: calc(50% + 4px);
276
+ }
277
+ }
278
+ }
279
+
280
+ .navbar-burger.is-active span:nth-child(1) {
281
+ transform: translateY(5px) rotate(45deg);
282
+ }
283
+
284
+ .navbar-burger.is-active span:nth-child(2) {
285
+ opacity: 0;
286
+ }
287
+
288
+ .navbar-burger.is-active span:nth-child(3) {
289
+ transform: translateY(-5px) rotate(-45deg);
290
+ }
291
+
292
+ @keyframes fadeInUp {
293
+ from {
294
+ opacity: 0;
295
+ transform: translateY(15px);
296
+ /* 从下方15px处开始 */
297
+ }
298
+
299
+ to {
300
+ opacity: 1;
301
+ transform: translateY(0);
302
+ /* 移动到原始位置 */
303
+ }
304
+ }
305
+
306
+ .navbar-start .navbar-item {
307
+ /* 先将元素设置为透明,为动画做准备 */
308
+ opacity: 0;
309
+ animation-name: fadeInUp;
310
+ animation-duration: 0.56s;
311
+ animation-timing-function: ease-out;
312
+ animation-fill-mode: forwards;
313
+ font-size: 2rem;
314
+ font-family: var(--font-serif);
315
+ color: var(--rosewater);
316
+ flex: 1;
317
+ display: flex;
318
+ align-items: center;
319
+ justify-content: center;
320
+
321
+ &:nth-child(1) {
322
+ animation-delay: 0.08s;
323
+ }
324
+
325
+ &:nth-child(2) {
326
+ animation-delay: 0.16s;
327
+ }
328
+
329
+ &:nth-child(3) {
330
+ animation-delay: 0.24s;
331
+ }
332
+
333
+ &:nth-child(4) {
334
+ animation-delay: 0.32s;
335
+ }
336
+
337
+ &:nth-child(5) {
338
+ animation-delay: 0.4s;
339
+ }
340
+
341
+ &:nth-child(6) {
342
+ animation-delay: 0.48s;
343
+ }
344
+
345
+ &:nth-child(7) {
346
+ animation-delay: 0.56s;
347
+ }
348
+ }
349
+
350
+ /* #endregion Navbar */
351
+
352
+ .theme-selector-list {
353
+ width: 80%;
354
+ padding: 1.5rem;
355
+ }
356
+
357
+ .searchbox-container {
358
+ top: 15px;
359
+ width: 90%;
360
+ }
361
+
362
+ .toc-button {
363
+ top: auto;
364
+ bottom: 3rem;
365
+ right: 1rem;
366
+ left: auto;
367
+ background-color: var(--base);
368
+ border: 2px solid var(--surface0);
369
+ }
370
+ }
371
+
372
+ @media screen and (min-width: 1024px) {
373
+ .navbar-burger {
374
+ display: none;
375
+ }
376
+
377
+ .navbar-container {
378
+ max-width: 1260px;
379
+ }
380
+
381
+ .navbar-menu,
382
+ .navbar-start,
383
+ .navbar-end {
384
+ align-items: stretch;
385
+ display: flex;
386
+ padding: 0;
387
+ flex-shrink: 0;
388
+ }
389
+
390
+ .navbar-menu {
391
+ flex-grow: 1;
392
+ flex-shrink: 0;
393
+ overflow-x: auto;
394
+ background-color: transparent;
395
+ }
396
+
397
+ .navbar-start {
398
+ justify-content: flex-start;
399
+ margin-right: auto;
400
+ }
401
+
402
+ .navbar-end {
403
+ justify-content: flex-end;
404
+ margin-left: auto;
405
+ }
406
+ }
407
+
408
+ @media screen and (min-width: 1280px) {
409
+ /* Side note: float aside into the right margin so it doesn't squeeze .content */
410
+ .content {
411
+ overflow: visible;
412
+ display: flow-root;
413
+ }
414
+
415
+ .content > aside {
416
+ float: right;
417
+ clear: right;
418
+ width: 11rem;
419
+ /* margin-right: -(width + gap) so the aside box pulls itself past .content's right edge */
420
+ margin: 0 -12.5rem 1rem 1.5rem;
421
+ padding: 0 0 0 0.875rem;
422
+ font-size: 0.8em;
423
+ }
424
+
425
+ /* <side-note> uses its component stylesheet for measured placement. */
426
+ }