hexo-theme-particlex 2.4.3 → 2.4.4
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/layout/posts.ejs +4 -3
- package/package.json +1 -1
- package/source/css/particlex.css +18 -6
package/README.md
CHANGED
@@ -189,7 +189,7 @@ highlightStyle: github # Highlight style
|
|
189
189
|
|
190
190
|
- 文章置顶
|
191
191
|
|
192
|
-
在 [Front-Matter](https://hexo.io/zh-cn/docs/front-matter) 里设置 `
|
192
|
+
在 [Front-Matter](https://hexo.io/zh-cn/docs/front-matter) 里设置 `pinned` 作为置顶参数,越大越靠前,默认为 0
|
193
193
|
|
194
194
|
- 文章加密
|
195
195
|
|
package/layout/posts.ejs
CHANGED
@@ -2,8 +2,9 @@
|
|
2
2
|
let posts = site.posts,
|
3
3
|
current = (page.current - 1) * config.index_generator.per_page;
|
4
4
|
posts.data.sort((a, b) => {
|
5
|
-
let
|
6
|
-
|
5
|
+
let x = a.pinned ?? 0,
|
6
|
+
y = b.pinned ?? 0;
|
7
|
+
return x === y ? b.date - a.date : y - x;
|
7
8
|
});
|
8
9
|
posts = posts.slice(current, config.index_generator.per_page + current);
|
9
10
|
%>
|
@@ -34,7 +35,7 @@
|
|
34
35
|
<i class="fa-solid fa-lock fa-fw"></i>
|
35
36
|
</span>
|
36
37
|
<% } %>
|
37
|
-
<% if (typeof post.
|
38
|
+
<% if (typeof post.pinned !== "undefined") { %>
|
38
39
|
<span class="special">
|
39
40
|
<i class="fa-solid fa-grip-vertical fa-fw"></i>
|
40
41
|
</span>
|
package/package.json
CHANGED
package/source/css/particlex.css
CHANGED
@@ -514,7 +514,8 @@
|
|
514
514
|
}
|
515
515
|
.code-content {
|
516
516
|
background: none;
|
517
|
-
font:
|
517
|
+
font-size: 13px;
|
518
|
+
line-height: 2;
|
518
519
|
overflow: auto;
|
519
520
|
padding: 50px 30px 20px;
|
520
521
|
}
|
@@ -564,7 +565,7 @@ body::-webkit-scrollbar-track {
|
|
564
565
|
box-sizing: border-box;
|
565
566
|
color: #000;
|
566
567
|
display: block;
|
567
|
-
font: 15px
|
568
|
+
font-size: 15px;
|
568
569
|
height: 50px;
|
569
570
|
text-indent: 20px;
|
570
571
|
transition: background 0.25s, border 0.25s, box-shadow 0.25s;
|
@@ -584,11 +585,12 @@ body::-webkit-scrollbar-track {
|
|
584
585
|
animation: into 0.6s;
|
585
586
|
}
|
586
587
|
.language {
|
587
|
-
background: linear-gradient(to right, #ed6ea0 0
|
588
|
+
background: linear-gradient(to right, #ed6ea0 0%, #ec8c69 100%);
|
588
589
|
border-radius: 0 0 10px 10px;
|
589
590
|
box-shadow: 1px 1px 0.75rem #ed6ea14d;
|
590
591
|
color: #fff;
|
591
|
-
font: bold
|
592
|
+
font-weight: bold;
|
593
|
+
font-size: 12px;
|
592
594
|
left: 30px;
|
593
595
|
padding: 10px 15px;
|
594
596
|
position: absolute;
|
@@ -698,6 +700,15 @@ body {
|
|
698
700
|
overflow-x: hidden;
|
699
701
|
width: 100%;
|
700
702
|
}
|
703
|
+
pre,
|
704
|
+
code,
|
705
|
+
.hljs,
|
706
|
+
.highlight,
|
707
|
+
.commit-tease-sha,
|
708
|
+
.input,
|
709
|
+
.language {
|
710
|
+
font-family: "Fira Code", "Noto Sans SC", monospace;
|
711
|
+
}
|
701
712
|
button,
|
702
713
|
img,
|
703
714
|
video,
|
@@ -719,7 +730,8 @@ code {
|
|
719
730
|
background: #bddcf76b;
|
720
731
|
border-radius: 4px;
|
721
732
|
color: #4b616b;
|
722
|
-
font:
|
733
|
+
font-size: 14px;
|
734
|
+
line-height: 2.5;
|
723
735
|
padding: 4px 8px;
|
724
736
|
}
|
725
737
|
h1 {
|
@@ -891,7 +903,7 @@ ol li {
|
|
891
903
|
padding: 50px;
|
892
904
|
}
|
893
905
|
#home-head #home-info .info .wrap h1 {
|
894
|
-
font:
|
906
|
+
font-size: 46px;
|
895
907
|
margin-bottom: 10px;
|
896
908
|
}
|
897
909
|
#home-head #home-info .info .wrap h3 {
|