hexo-theme-gnix 8.0.0 → 9.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/include/hexo/feed.js
CHANGED
|
@@ -101,6 +101,7 @@ module.exports = (hexo) => {
|
|
|
101
101
|
const { limit, order_by } = feedConfig;
|
|
102
102
|
let processedPosts = posts.sort(order_by || "-date");
|
|
103
103
|
processedPosts = processedPosts.filter((post) => post.draft !== true);
|
|
104
|
+
processedPosts = processedPosts.filter((post) => !post.password);
|
|
104
105
|
if (limit) processedPosts = processedPosts.limit(limit);
|
|
105
106
|
return processedPosts;
|
|
106
107
|
}
|
|
@@ -34,14 +34,6 @@ module.exports = class extends Component {
|
|
|
34
34
|
{/* Cover image */}
|
|
35
35
|
{cover ? <ArticleCover page={page} cover={cover} index={index} helper={helper} /> : null}
|
|
36
36
|
<article class={`card-content article${"direction" in page ? ` ${page.direction}` : ""}`}>
|
|
37
|
-
{/* Title */}
|
|
38
|
-
{page.title !== "" && index ? (
|
|
39
|
-
<h2 class="article-title">
|
|
40
|
-
<a href={url_for(page.link || page.path)}>{page.title}</a>
|
|
41
|
-
</h2>
|
|
42
|
-
) : null}
|
|
43
|
-
{page.title !== "" && !index ? <h1 class="article-title">{page.title}</h1> : null}
|
|
44
|
-
|
|
45
37
|
{/* Metadata - Medium style */}
|
|
46
38
|
{page.layout !== "page" ? (
|
|
47
39
|
<div class="article-header-meta">
|
|
@@ -51,11 +43,11 @@ module.exports = class extends Component {
|
|
|
51
43
|
{dateFormatters.shortDay.format(page.date)}
|
|
52
44
|
</time>
|
|
53
45
|
)}
|
|
54
|
-
{page.date && (wordCount > 0 || !index) && <span class="meta-separator"
|
|
46
|
+
{page.date && (wordCount > 0 || !index) && <span class="meta-separator">·</span>}
|
|
55
47
|
{wordCount > 0 && <span class="article-reading-time">{readTime} min</span>}
|
|
56
48
|
{!index && (
|
|
57
49
|
<Fragment>
|
|
58
|
-
<span class="meta-separator"
|
|
50
|
+
<span class="meta-separator">·</span>
|
|
59
51
|
<span
|
|
60
52
|
class="article-visit-count"
|
|
61
53
|
data-flag-title={page.title}
|
|
@@ -66,27 +58,50 @@ module.exports = class extends Component {
|
|
|
66
58
|
</Fragment>
|
|
67
59
|
)}
|
|
68
60
|
</div>
|
|
69
|
-
{page.tags?.length ? (
|
|
70
|
-
<div class="article-tags-inline">
|
|
71
|
-
{page.tags.map((tag) => (
|
|
72
|
-
<Fragment>
|
|
73
|
-
<a class="article-tag" rel="tag" href={url_for(tag.path)}>
|
|
74
|
-
{tag.name}
|
|
75
|
-
</a>
|
|
76
|
-
</Fragment>
|
|
77
|
-
))}
|
|
78
|
-
</div>
|
|
79
|
-
) : null}
|
|
80
61
|
</div>
|
|
81
62
|
) : null}
|
|
82
63
|
|
|
83
|
-
{/*
|
|
84
|
-
|
|
85
|
-
class="
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
64
|
+
{/* Title */}
|
|
65
|
+
{page.title !== "" && index ? (
|
|
66
|
+
<h2 class="article-title">
|
|
67
|
+
<a href={url_for(page.link || page.path)}>{page.title}</a>
|
|
68
|
+
</h2>
|
|
69
|
+
) : null}
|
|
70
|
+
{page.title !== "" && !index ? <h1 class="article-title">{page.title}</h1> : null}
|
|
71
|
+
|
|
72
|
+
{!index && page.excerpt && <div class="content article-excerpt" dangerouslySetInnerHTML={{ __html: page.excerpt }}></div>}
|
|
73
|
+
|
|
74
|
+
{(index || !page.excerpt) && (
|
|
75
|
+
<div
|
|
76
|
+
class={index && page.excerpt ? "content article-excerpt" : "content"}
|
|
77
|
+
dangerouslySetInnerHTML={{
|
|
78
|
+
__html: index && page.excerpt ? page.excerpt : page.content,
|
|
79
|
+
}}
|
|
80
|
+
></div>
|
|
81
|
+
)}
|
|
82
|
+
|
|
83
|
+
{page.tags?.length && (
|
|
84
|
+
<div class="article-footer">
|
|
85
|
+
<div class="article-tags">
|
|
86
|
+
{page.tags.map((tag, i) => (
|
|
87
|
+
<Fragment>
|
|
88
|
+
{i > 0 && <span class="meta-separator">·</span>}
|
|
89
|
+
<a class="article-tag" rel="tag" href={url_for(tag.path)}>
|
|
90
|
+
{tag.name}
|
|
91
|
+
</a>
|
|
92
|
+
</Fragment>
|
|
93
|
+
))}
|
|
94
|
+
</div>
|
|
95
|
+
{index && (
|
|
96
|
+
<a class="article-read-more" href={url_for(page.link || page.path)}>
|
|
97
|
+
Read More →
|
|
98
|
+
</a>
|
|
99
|
+
)}
|
|
100
|
+
</div>
|
|
101
|
+
)}
|
|
102
|
+
|
|
103
|
+
{!index && page.excerpt && <div class="content" dangerouslySetInnerHTML={{ __html: page.content }}></div>}
|
|
104
|
+
|
|
90
105
|
{/* Licensing block */}
|
|
91
106
|
{!index && article && article.licenses && Object.keys(article.licenses) ? <ArticleLicensing.Cacheable page={page} config={config} helper={helper} /> : null}
|
|
92
107
|
</article>
|
package/layout/common/head.jsx
CHANGED
|
@@ -134,15 +134,15 @@ module.exports = class extends Component {
|
|
|
134
134
|
) : null}
|
|
135
135
|
{canonical_url ? <link rel="canonical" href={canonical_url} /> : null}
|
|
136
136
|
{favicon ? <link rel="icon" href={url_for(favicon)} /> : null}
|
|
137
|
-
<link rel="preload" href={url_for("/css/font/woff2/HomemadeApple.woff2")} as="font" type="font/woff2" crossorigin />
|
|
138
137
|
<link rel="stylesheet" href={url_for("/css/default.css")} />
|
|
139
138
|
<link rel="stylesheet" href={url_for("/css/responsive/mobile.css")} media="screen and (max-width:768px)" />
|
|
140
139
|
<link rel="stylesheet" href={url_for("/css/responsive/tablet.css")} media="screen and (min-width:769px)" />
|
|
141
140
|
<link rel="stylesheet" href={url_for("/css/responsive/touch.css")} media="screen and (max-width:1023px)" />
|
|
142
141
|
<link rel="stylesheet" href={url_for("/css/responsive/desktop.css")} media="screen and (min-width:1024px)" />
|
|
143
142
|
<link rel="preload" as="style" href={url_for("/css/callout_blocks.css")} onload="this.onload=null;this.rel='stylesheet'" />
|
|
144
|
-
{
|
|
143
|
+
<link rel="preload" href={url_for("/css/font/woff2/HomemadeApple.woff2")} as="font" type="font/woff2" crossorigin />
|
|
145
144
|
<link rel="preconnect" href="https://fontsapi.zeoseven.com" />
|
|
145
|
+
<link rel="preload" as="style" href="https://fontsapi.zeoseven.com/285/main/result.css" onload="this.onload=null;this.rel='stylesheet'" />
|
|
146
146
|
<link rel="preload" as="style" href="https://fontsapi.zeoseven.com/442/main/result.css" onload="this.onload=null;this.rel='stylesheet'" />
|
|
147
147
|
<link rel="preload" as="style" href="/css/shiki/shiki.css" onload="this.onload=null;this.rel='stylesheet'" />
|
|
148
148
|
{page.encrypt ? <link rel="stylesheet" href={url_for("/css/encrypt.css")} /> : null}
|
package/package.json
CHANGED
package/source/css/default.css
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
--overlay1: color-mix(in oklch, var(--base) 45%, var(--text));
|
|
11
11
|
--overlay2: color-mix(in oklch, var(--base) 34%, var(--text));
|
|
12
12
|
|
|
13
|
-
--font-serif:
|
|
13
|
+
--font-serif: New York, Georgia, Noto Serif CJK, STFangsong, STSong, Songti SC, serif;
|
|
14
14
|
--font-sans-serif: system-ui, sans-serif;
|
|
15
|
-
--font-mono: "SF Mono", "
|
|
15
|
+
--font-mono: "SF Mono", "Maple Mono NF CN Local", "Maple Mono NF CN", Monaco, Consolas, monospace;
|
|
16
16
|
--font-handwriting: "Bradley Hand", "homemade-apple", cursive;
|
|
17
17
|
--radius: 12px;
|
|
18
18
|
}
|
|
@@ -154,7 +154,7 @@ body {
|
|
|
154
154
|
background: var(--mantle);
|
|
155
155
|
color: var(--subtext1);
|
|
156
156
|
min-height: 100%;
|
|
157
|
-
line-height: 1.
|
|
157
|
+
line-height: 1.7;
|
|
158
158
|
display: flex;
|
|
159
159
|
flex-direction: column;
|
|
160
160
|
/* Ref: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/text-autospace */
|
|
@@ -307,14 +307,10 @@ html {
|
|
|
307
307
|
max-width: 100%;
|
|
308
308
|
position: relative;
|
|
309
309
|
overflow: visible;
|
|
310
|
-
border: 0.5px solid var(--surface0);
|
|
311
|
-
}
|
|
312
|
-
.card + .card {
|
|
313
|
-
border-top: none;
|
|
314
310
|
}
|
|
315
311
|
|
|
316
312
|
.card-content {
|
|
317
|
-
padding: 1.25rem;
|
|
313
|
+
padding: 1.25em 1.25rem 0 1.25rem;
|
|
318
314
|
}
|
|
319
315
|
|
|
320
316
|
/* #region Navbar */
|
|
@@ -511,7 +507,8 @@ html {
|
|
|
511
507
|
flex-grow: 1;
|
|
512
508
|
margin: 0 auto;
|
|
513
509
|
position: relative;
|
|
514
|
-
max-width:
|
|
510
|
+
max-width: 50em;
|
|
511
|
+
counter-reset: h2-counter;
|
|
515
512
|
}
|
|
516
513
|
|
|
517
514
|
/* #region Footer */
|
|
@@ -599,10 +596,15 @@ html {
|
|
|
599
596
|
a.header-anchor {
|
|
600
597
|
color: var(--text);
|
|
601
598
|
font-family: var(--font-serif);
|
|
599
|
+
&::after {
|
|
600
|
+
margin-left: 0.4em;
|
|
601
|
+
opacity: 0;
|
|
602
|
+
color: var(--surface0);
|
|
603
|
+
transition: opacity 0.2s ease;
|
|
604
|
+
}
|
|
602
605
|
|
|
603
606
|
&:hover::after {
|
|
604
|
-
|
|
605
|
-
color: var(--surface0);
|
|
607
|
+
opacity: 1;
|
|
606
608
|
}
|
|
607
609
|
}
|
|
608
610
|
|
|
@@ -621,18 +623,32 @@ html {
|
|
|
621
623
|
}
|
|
622
624
|
|
|
623
625
|
h2 {
|
|
624
|
-
font-size:
|
|
625
|
-
margin:
|
|
626
|
+
font-size: 1.5em;
|
|
627
|
+
margin: 1.5rem 0 1rem;
|
|
628
|
+
line-height: 1.3;
|
|
626
629
|
border-bottom: 0.8px solid var(--surface0);
|
|
627
630
|
|
|
628
|
-
> a.header-anchor
|
|
629
|
-
|
|
631
|
+
> a.header-anchor {
|
|
632
|
+
counter-increment: h2-counter;
|
|
633
|
+
&::before {
|
|
634
|
+
content: counter(h2-counter, decimal-leading-zero) ".";
|
|
635
|
+
color: var(--flamingo);
|
|
636
|
+
font-family: var(--font-mono);
|
|
637
|
+
padding-right: 0.2em;
|
|
638
|
+
font-size: 0.75em;
|
|
639
|
+
font-variant-numeric: tabular-nums;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
&:hover::after {
|
|
643
|
+
content: "##";
|
|
644
|
+
}
|
|
630
645
|
}
|
|
631
646
|
}
|
|
632
647
|
|
|
633
648
|
h3 {
|
|
634
|
-
font-size: 1.
|
|
635
|
-
margin: 1.
|
|
649
|
+
font-size: 1.45em;
|
|
650
|
+
margin: 1.4rem 0 1rem;
|
|
651
|
+
line-height: 1.35;
|
|
636
652
|
|
|
637
653
|
> a.header-anchor:hover::after {
|
|
638
654
|
content: "###";
|
|
@@ -640,8 +656,9 @@ html {
|
|
|
640
656
|
}
|
|
641
657
|
|
|
642
658
|
h4 {
|
|
643
|
-
font-size: 1.
|
|
644
|
-
margin: 1.
|
|
659
|
+
font-size: 1.35em;
|
|
660
|
+
margin: 1.3rem 0 1rem;
|
|
661
|
+
line-height: 1.4;
|
|
645
662
|
|
|
646
663
|
> a.header-anchor:hover::after {
|
|
647
664
|
content: "####";
|
|
@@ -651,6 +668,7 @@ html {
|
|
|
651
668
|
h5 {
|
|
652
669
|
font-size: 1.25em;
|
|
653
670
|
margin: 1.2rem 0 1rem;
|
|
671
|
+
line-height: 1.4;
|
|
654
672
|
|
|
655
673
|
> a.header-anchor:hover::after {
|
|
656
674
|
content: "#####";
|
|
@@ -660,6 +678,7 @@ html {
|
|
|
660
678
|
h6 {
|
|
661
679
|
font-size: 1.1em;
|
|
662
680
|
margin: 1.2rem 0 1rem;
|
|
681
|
+
line-height: 1.45;
|
|
663
682
|
|
|
664
683
|
> a.header-anchor:hover::after {
|
|
665
684
|
content: "######";
|
|
@@ -671,7 +690,8 @@ html {
|
|
|
671
690
|
dl,
|
|
672
691
|
pre,
|
|
673
692
|
details {
|
|
674
|
-
margin-bottom:
|
|
693
|
+
margin-bottom: 1.5rem;
|
|
694
|
+
line-height: 1.7;
|
|
675
695
|
}
|
|
676
696
|
|
|
677
697
|
li {
|
|
@@ -688,16 +708,19 @@ html {
|
|
|
688
708
|
video {
|
|
689
709
|
display: block;
|
|
690
710
|
max-width: 100%;
|
|
691
|
-
margin: 0 auto;
|
|
711
|
+
margin: 0 auto 0.5rem auto;
|
|
692
712
|
|
|
693
713
|
&:hover {
|
|
694
714
|
cursor: pointer;
|
|
695
715
|
}
|
|
696
716
|
}
|
|
717
|
+
figure {
|
|
718
|
+
text-align: center;
|
|
719
|
+
}
|
|
697
720
|
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
721
|
+
figcaption {
|
|
722
|
+
font-style: italic;
|
|
723
|
+
font-family: var(--font-serif);
|
|
701
724
|
}
|
|
702
725
|
|
|
703
726
|
button.physical-btn,
|
|
@@ -754,27 +777,6 @@ html {
|
|
|
754
777
|
margin-bottom: 1rem;
|
|
755
778
|
}
|
|
756
779
|
|
|
757
|
-
figure {
|
|
758
|
-
margin: 1em 2.5rem;
|
|
759
|
-
text-align: center;
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
figure:not(:first-child) {
|
|
763
|
-
margin-top: 1.5rem;
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
figure:not(:last-child) {
|
|
767
|
-
margin-bottom: 1rem;
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
figure img {
|
|
771
|
-
display: inline-block;
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
figure figcaption {
|
|
775
|
-
font-style: italic;
|
|
776
|
-
}
|
|
777
|
-
|
|
778
780
|
pre {
|
|
779
781
|
overflow-x: auto;
|
|
780
782
|
font-size: 0.85em;
|
|
@@ -972,10 +974,11 @@ section {
|
|
|
972
974
|
/* #region Article Meta*/
|
|
973
975
|
|
|
974
976
|
.article-title {
|
|
975
|
-
font-size:
|
|
977
|
+
font-size: 1.75em;
|
|
976
978
|
font-family: var(--font-serif);
|
|
977
979
|
line-height: 1.2;
|
|
978
980
|
margin-bottom: 0.3em;
|
|
981
|
+
text-wrap: balance;
|
|
979
982
|
|
|
980
983
|
> a {
|
|
981
984
|
color: var(--text);
|
|
@@ -986,8 +989,6 @@ section {
|
|
|
986
989
|
font-family: var(--font-mono);
|
|
987
990
|
overflow: auto;
|
|
988
991
|
padding-bottom: 0.5em;
|
|
989
|
-
margin-bottom: 1rem;
|
|
990
|
-
border-bottom: 1px dashed var(--surface0);
|
|
991
992
|
color: var(--subtext0);
|
|
992
993
|
display: flex;
|
|
993
994
|
align-items: center;
|
|
@@ -1004,24 +1005,52 @@ section {
|
|
|
1004
1005
|
}
|
|
1005
1006
|
}
|
|
1006
1007
|
|
|
1007
|
-
.article-meta-info
|
|
1008
|
-
.article-tags-inline {
|
|
1008
|
+
.article-meta-info {
|
|
1009
1009
|
display: flex;
|
|
1010
1010
|
align-items: center;
|
|
1011
1011
|
flex-wrap: wrap;
|
|
1012
1012
|
gap: 0.2rem;
|
|
1013
1013
|
}
|
|
1014
1014
|
|
|
1015
|
-
.article-tags-inline {
|
|
1016
|
-
/* Push to the right */
|
|
1017
|
-
gap: 0.8rem;
|
|
1018
|
-
margin-left: auto;
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
1015
|
.meta-separator {
|
|
1022
1016
|
color: var(--overlay0);
|
|
1023
1017
|
}
|
|
1024
1018
|
|
|
1019
|
+
.article-footer {
|
|
1020
|
+
display: flex;
|
|
1021
|
+
justify-content: space-between;
|
|
1022
|
+
align-items: center;
|
|
1023
|
+
margin-top: 1rem;
|
|
1024
|
+
padding-bottom: 0.75rem;
|
|
1025
|
+
border-bottom: 1px dashed var(--surface0);
|
|
1026
|
+
font-family: var(--font-mono);
|
|
1027
|
+
font-size: 0.75rem;
|
|
1028
|
+
& + .content {
|
|
1029
|
+
margin-top: 1rem;
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
.article-excerpt {
|
|
1034
|
+
font-family: var(--font-serif);
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
.article-tags {
|
|
1038
|
+
display: flex;
|
|
1039
|
+
align-items: center;
|
|
1040
|
+
flex-wrap: wrap;
|
|
1041
|
+
gap: 0.2rem;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
.article-read-more {
|
|
1045
|
+
color: var(--subtext0);
|
|
1046
|
+
text-decoration: none;
|
|
1047
|
+
white-space: nowrap;
|
|
1048
|
+
|
|
1049
|
+
&:hover {
|
|
1050
|
+
color: var(--blue);
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1025
1054
|
/* #endregion Article Meta */
|
|
1026
1055
|
|
|
1027
1056
|
/* #region Licensing */
|
|
@@ -1060,7 +1089,7 @@ section {
|
|
|
1060
1089
|
.level-item p {
|
|
1061
1090
|
margin-right: 1.5rem;
|
|
1062
1091
|
margin-bottom: 0;
|
|
1063
|
-
font-size: 0.
|
|
1092
|
+
font-size: 0.7rem;
|
|
1064
1093
|
}
|
|
1065
1094
|
|
|
1066
1095
|
iconify-icon {
|
|
@@ -1171,6 +1200,7 @@ input.searchbox-input {
|
|
|
1171
1200
|
display: block;
|
|
1172
1201
|
overflow: hidden;
|
|
1173
1202
|
height: 380px;
|
|
1203
|
+
border-radius: var(--radius);
|
|
1174
1204
|
|
|
1175
1205
|
img {
|
|
1176
1206
|
display: block;
|
|
@@ -1299,3 +1329,6 @@ input.searchbox-input {
|
|
|
1299
1329
|
}
|
|
1300
1330
|
|
|
1301
1331
|
/* #endregion TOC */
|
|
1332
|
+
#comments {
|
|
1333
|
+
border-top: 1px dashed var(--surface0);
|
|
1334
|
+
}
|
|
@@ -19,20 +19,11 @@ td {
|
|
|
19
19
|
padding: 0;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.card {
|
|
23
|
-
border-left: none;
|
|
24
|
-
border-right: none;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
22
|
.cover-image {
|
|
28
23
|
max-height: 25vh;
|
|
29
24
|
border-radius: 0;
|
|
30
25
|
}
|
|
31
26
|
|
|
32
|
-
.card .card-content {
|
|
33
|
-
padding: 1rem;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
27
|
.pagination {
|
|
37
28
|
height: 2.5em;
|
|
38
29
|
}
|
package/source/css/twikoo.css
CHANGED
|
@@ -374,9 +374,9 @@
|
|
|
374
374
|
max-height: 200px;
|
|
375
375
|
overflow: hidden;
|
|
376
376
|
position: relative;
|
|
377
|
-
margin-top: 0.
|
|
377
|
+
margin-top: 0.65rem;
|
|
378
378
|
padding-left: 1rem;
|
|
379
|
-
border-left:
|
|
379
|
+
border-left: 1px dashed var(--surface0);
|
|
380
380
|
}
|
|
381
381
|
|
|
382
382
|
.tk-replies .tk-comment {
|