hexo-theme-particlex 2.4.2 → 2.4.4

Sign up to get free protection for your applications and to get access to all the features.
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) 里设置 `pin` 作为置顶参数,越大越靠前,默认为 0
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 pina = a.pin ?? 0, pinb = b.pin ?? 0;
6
- return pina === pinb ? b.date - a.date : pinb - pina;
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.pin !== "undefined" && post.pin > 0) { %>
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-particlex",
3
- "version": "2.4.2",
3
+ "version": "2.4.4",
4
4
  "description": "A concise Hexo theme, based on Particle.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -514,7 +514,8 @@
514
514
  }
515
515
  .code-content {
516
516
  background: none;
517
- font: 500 13px/2 "Fira Code", "Noto Sans SC", monospace;
517
+ font-size: 13px;
518
+ line-height: 2;
518
519
  overflow: auto;
519
520
  padding: 50px 30px 20px;
520
521
  }
@@ -525,17 +526,13 @@ body::-webkit-scrollbar-track {
525
526
  .content {
526
527
  transition: opacity 0.25s;
527
528
  }
528
- .content img {
529
- display: block;
530
- margin: 15px auto;
531
- max-width: 75%;
532
- }
529
+ .content img,
533
530
  .content video,
534
531
  .content audio,
535
532
  .content iframe {
536
533
  display: block;
537
534
  margin: 15px auto;
538
- width: 75%;
535
+ max-width: 75%;
539
536
  }
540
537
  .copycode {
541
538
  color: #5c6b72;
@@ -568,7 +565,7 @@ body::-webkit-scrollbar-track {
568
565
  box-sizing: border-box;
569
566
  color: #000;
570
567
  display: block;
571
- font: 15px "Fira Code", "Noto Sans SC", monospace;
568
+ font-size: 15px;
572
569
  height: 50px;
573
570
  text-indent: 20px;
574
571
  transition: background 0.25s, border 0.25s, box-shadow 0.25s;
@@ -588,11 +585,12 @@ body::-webkit-scrollbar-track {
588
585
  animation: into 0.6s;
589
586
  }
590
587
  .language {
591
- background: linear-gradient(to right, #ed6ea0 0, #ec8c69 100%);
588
+ background: linear-gradient(to right, #ed6ea0 0%, #ec8c69 100%);
592
589
  border-radius: 0 0 10px 10px;
593
590
  box-shadow: 1px 1px 0.75rem #ed6ea14d;
594
591
  color: #fff;
595
- font: bold 12px "Fira Code", "Noto Sans SC", monospace;
592
+ font-weight: bold;
593
+ font-size: 12px;
596
594
  left: 30px;
597
595
  padding: 10px 15px;
598
596
  position: absolute;
@@ -702,6 +700,15 @@ body {
702
700
  overflow-x: hidden;
703
701
  width: 100%;
704
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
+ }
705
712
  button,
706
713
  img,
707
714
  video,
@@ -723,7 +730,8 @@ code {
723
730
  background: #bddcf76b;
724
731
  border-radius: 4px;
725
732
  color: #4b616b;
726
- font: 500 14px/2.5 "Fira Code", "Noto Sans SC", monospace;
733
+ font-size: 14px;
734
+ line-height: 2.5;
727
735
  padding: 4px 8px;
728
736
  }
729
737
  h1 {
@@ -895,7 +903,7 @@ ol li {
895
903
  padding: 50px;
896
904
  }
897
905
  #home-head #home-info .info .wrap h1 {
898
- font: bold 46px Lexend, "Noto Sans SC", sans-serif;
906
+ font-size: 46px;
899
907
  margin-bottom: 10px;
900
908
  }
901
909
  #home-head #home-info .info .wrap h3 {