hexo-theme-particlex 2.4.1 → 2.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,11 +1,9 @@
1
- <div id="loading" style="height: 100vh; width: 100vw; left: 0; top: 0; position: fixed; display: flex; z-index: 2147483647; justify-content: space-between; background: #fff; transition: opacity 0.3s ease-out, visibility 0.3s; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none">
2
- <div style="position: fixed; height: 100vh; width: 100vw; display: flex; justify-content: center; align-items: center">
3
- <div id="loadcontent" style="width: 50vmin; height: 50vmin; padding: 50px; border-radius: 50%; display: flex; justify-content: center; align-items: center; border: solid 10px #a3ddfb; text-align: center">
4
- <div>
5
- <h2>LOADING...</h2>
6
- <p style="word-break: keep-all">加载过慢请开启缓存(浏览器默认开启)</p>
7
- <img alt="loading" src="<%- url_for("/images/loading.gif") %>" style="height: 50px">
8
- </div>
1
+ <div id="loading" style="height: 100vh; width: 100vw; left: 0; top: 0; position: fixed; display: flex; z-index: 2147483647; background: #fff; transition: opacity 0.3s ease-out; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; pointer-events: none">
2
+ <div style="width: 50vmin; height: 50vmin; margin: auto; padding: 50px; border-radius: 50%; display: flex; border: solid 10px #a3ddfb">
3
+ <div style="margin: auto; text-align: center">
4
+ <h2>LOADING</h2>
5
+ <p>加载过慢请开启缓存,浏览器默认开启</p>
6
+ <img src="<%- url_for("/images/loading.gif") %>" style="height: 50px; border-radius: 0">
9
7
  </div>
10
8
  </div>
11
9
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-particlex",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
4
4
  "description": "A concise Hexo theme, based on Particle.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -512,106 +512,51 @@
512
512
  display: inline-block;
513
513
  margin-right: 10px;
514
514
  }
515
- .article h1 {
516
- font-weight: bold;
517
- margin: 20px 0;
518
- }
519
- .content {
520
- transition: opacity 0.25s;
521
- }
522
- .content .code-content {
515
+ .code-content {
523
516
  background: none;
524
517
  font: 500 13px/2 "Fira Code", "Noto Sans SC", monospace;
525
518
  overflow: auto;
526
519
  padding: 50px 30px 20px;
527
520
  }
528
- .content .copycode {
521
+ .comment iframe,
522
+ body::-webkit-scrollbar-track {
523
+ border-radius: 0;
524
+ }
525
+ .content {
526
+ transition: opacity 0.25s;
527
+ }
528
+ .content img {
529
+ display: block;
530
+ margin: 15px auto;
531
+ max-width: 75%;
532
+ }
533
+ .content video,
534
+ .content audio,
535
+ .content iframe {
536
+ display: block;
537
+ margin: 15px auto;
538
+ width: 75%;
539
+ }
540
+ .copycode {
529
541
  color: #5c6b72;
530
542
  position: absolute;
531
543
  right: 0;
532
544
  top: 0;
533
545
  }
534
- .content .copycode i {
546
+ .copycode i {
535
547
  padding: 15px;
536
548
  position: absolute;
537
549
  right: 0;
538
550
  top: 0;
539
551
  transition: transform 0.25s;
540
552
  }
541
- .content .copycode.copied i {
553
+ .copycode.copied i {
542
554
  transform: scale(1.25);
543
555
  }
544
- .content .copycode.copied i:first-child,
545
- .content .copycode:not(.copied) i:last-child {
556
+ .copycode.copied i:first-child,
557
+ .copycode:not(.copied) i:last-child {
546
558
  opacity: 0;
547
559
  }
548
- .content .language {
549
- background: linear-gradient(to right, #ed6ea0 0, #ec8c69 100%);
550
- border-radius: 0 0 10px 10px;
551
- box-shadow: 1px 1px 0.75rem #ed6ea14d;
552
- color: #fff;
553
- font: bold 12px "Fira Code", "Noto Sans SC", monospace;
554
- left: 30px;
555
- padding: 10px 15px;
556
- position: absolute;
557
- top: 0;
558
- }
559
- .content .markdownIt-Anchor {
560
- display: none;
561
- }
562
- .content a,
563
- #footer .footer-wrap a {
564
- color: #66afef;
565
- }
566
- .content b,
567
- .content strong {
568
- font-weight: bold;
569
- line-height: 2.5;
570
- }
571
- .content code {
572
- background: #bddcf76b;
573
- border-radius: 4px;
574
- color: #4b616b;
575
- font: 500 14px/2.5 "Fira Code", "Noto Sans SC", monospace;
576
- padding: 4px 8px;
577
- }
578
- .content h1,
579
- .content h2,
580
- .content h3,
581
- .content h4,
582
- .content h5 {
583
- margin: 18px 0;
584
- text-align: left !important;
585
- }
586
- .content img {
587
- display: block;
588
- margin: 0 auto;
589
- max-width: 70%;
590
- }
591
- .content pre {
592
- border: 1px solid #ebeef5;
593
- border-radius: 15px;
594
- box-shadow: 0 2px 12px 0 #0000001a;
595
- margin: 25px 0;
596
- }
597
- .content pre code {
598
- background: none;
599
- padding: 0;
600
- }
601
- .content table tbody tr td:nth-child(even) {
602
- background: #c7e0fb4d;
603
- }
604
- .content table tbody tr td:nth-child(odd) {
605
- background: #d9e8ff4d;
606
- }
607
- .content table thead tr th {
608
- background: #a3ddfb;
609
- color: #1e3e3f;
610
- padding: 8px 20px;
611
- }
612
- .content table tr td {
613
- padding: 8px 20px;
614
- }
615
560
  .icon {
616
561
  color: #5c6b72;
617
562
  margin-right: 5px;
@@ -642,6 +587,20 @@
642
587
  .into-leave-active {
643
588
  animation: into 0.6s;
644
589
  }
590
+ .language {
591
+ background: linear-gradient(to right, #ed6ea0 0, #ec8c69 100%);
592
+ border-radius: 0 0 10px 10px;
593
+ box-shadow: 1px 1px 0.75rem #ed6ea14d;
594
+ color: #fff;
595
+ font: bold 12px "Fira Code", "Noto Sans SC", monospace;
596
+ left: 30px;
597
+ padding: 10px 15px;
598
+ position: absolute;
599
+ top: 0;
600
+ }
601
+ .markdownIt-Anchor {
602
+ display: none;
603
+ }
645
604
  .math.display .katex {
646
605
  overflow: auto;
647
606
  }
@@ -717,18 +676,24 @@
717
676
  color: unset;
718
677
  }
719
678
  a {
679
+ color: #66afef;
720
680
  text-decoration: none;
721
681
  }
722
682
  a:hover,
723
683
  .content .copycode:hover {
724
684
  opacity: 0.8;
725
685
  }
686
+ b,
687
+ strong {
688
+ font-weight: bold;
689
+ line-height: 2.5;
690
+ }
726
691
  blockquote {
727
692
  background: #d9e8ff6b;
728
693
  border-left: 3px solid #1e3e3f;
729
694
  border-radius: 3px;
730
- margin: 15px 0;
731
- padding: 0.1px 15px;
695
+ display: flex;
696
+ padding: 0 15px;
732
697
  }
733
698
  body {
734
699
  background: #f6f8fa;
@@ -737,71 +702,101 @@ body {
737
702
  overflow-x: hidden;
738
703
  width: 100%;
739
704
  }
740
- body::-webkit-scrollbar-track {
741
- border-radius: 0;
742
- }
743
705
  button,
744
706
  img,
707
+ video,
708
+ audio,
745
709
  iframe,
746
710
  #home-head,
747
711
  #menu,
748
712
  .math,
749
713
  .go-post,
750
714
  .page-current,
751
- .categories-tags span a,
715
+ .categories-tags a,
752
716
  .friend-link a,
753
- pre .language,
754
- pre .copycode {
717
+ .icon-link a,
718
+ .language,
719
+ .copycode {
755
720
  user-select: none;
756
721
  }
722
+ code {
723
+ background: #bddcf76b;
724
+ border-radius: 4px;
725
+ color: #4b616b;
726
+ font: 500 14px/2.5 "Fira Code", "Noto Sans SC", monospace;
727
+ padding: 4px 8px;
728
+ }
757
729
  h1 {
730
+ font-size: 30px;
731
+ }
732
+ h1,
733
+ h2,
734
+ h3,
735
+ h4,
736
+ h5,
737
+ h6 {
758
738
  color: #1e3e3f;
759
- font: bold 30px Lexend, "Noto Sans SC", sans-serif;
739
+ font-weight: bold;
760
740
  margin: 15px 0;
761
741
  }
762
742
  h2 {
763
- color: #1e3e3f;
764
- font: bold 27px Lexend, "Noto Sans SC", sans-serif;
765
- margin: 15px 0;
743
+ font-size: 27px;
766
744
  }
767
745
  h3 {
768
- color: #1e3e3f;
769
- font: bold 24px Lexend, "Noto Sans SC", sans-serif;
770
- margin: 15px 0;
746
+ font-size: 24px;
771
747
  }
772
748
  h4 {
773
- color: #1e3e3f;
774
- font: bold 21px Lexend, "Noto Sans SC", sans-serif;
775
- margin: 15px 0;
749
+ font-size: 21px;
776
750
  }
777
751
  h5 {
778
- color: #1e3e3f;
779
- font: bold 18px Lexend, "Noto Sans SC", sans-serif;
780
- margin: 15px 0;
752
+ font-size: 18px;
753
+ }
754
+ h6 {
755
+ font-size: 15px;
781
756
  }
782
757
  hr {
783
- border-bottom: none;
784
- border-left: none;
785
- border-right: none;
786
- border-style: dashed;
758
+ border-style: dashed none none;
787
759
  border-width: 1.5px;
788
760
  }
789
- img {
761
+ img,
762
+ video,
763
+ audio,
764
+ iframe {
790
765
  border-radius: 10px;
791
766
  }
792
- p {
767
+ p,
768
+ ul,
769
+ ol {
793
770
  line-height: 1.7;
794
771
  margin: 15px 0;
795
772
  }
773
+ pre {
774
+ border: 1px solid #ebeef5;
775
+ border: 1px solid #ebeef5;
776
+ border-radius: 15px;
777
+ border-radius: 15px;
778
+ box-shadow: 0 2px 12px 0 #0000001a;
779
+ box-shadow: 0 2px 12px 0 #0000001a;
780
+ margin: 25px 0;
781
+ margin: 25px 0;
782
+ }
783
+ table tbody tr td:nth-child(even) {
784
+ background: #c7e0fb4d;
785
+ }
786
+ table tbody tr td:nth-child(odd) {
787
+ background: #d9e8ff4d;
788
+ }
789
+ table thead tr th {
790
+ background: #a3ddfb;
791
+ color: #1e3e3f;
792
+ padding: 8px 20px;
793
+ }
794
+ table tr td {
795
+ padding: 8px 20px;
796
+ }
796
797
  ul li,
797
798
  ol li {
798
- margin: 8px auto;
799
- }
800
- ul,
801
- ol {
802
- line-height: 1.7;
803
- margin-bottom: 10px !important;
804
- margin-top: 15px !important;
799
+ margin: 8px 0;
805
800
  }
806
801
  @media (min-width: 900px) {
807
802
  #home-card {
@@ -53,6 +53,11 @@ function rendermath() {
53
53
  ],
54
54
  });
55
55
  }
56
+ function renderall() {
57
+ highlight();
58
+ showimg();
59
+ rendermath();
60
+ }
56
61
  function sha(str) {
57
62
  return CryptoJS.SHA256(str).toString();
58
63
  }
@@ -12,7 +12,6 @@ const app = Vue.createApp({
12
12
  window.addEventListener("load", () => {
13
13
  this.showpage = true;
14
14
  document.getElementById("loading").style.opacity = 0;
15
- document.getElementById("loading").style.visibility = "hidden";
16
15
  });
17
16
  },
18
17
  mounted() {
@@ -45,17 +44,12 @@ const app = Vue.createApp({
45
44
  });
46
45
  }
47
46
  window.addEventListener("scroll", this.handlescroll, true);
48
- this.render();
47
+ renderall();
49
48
  },
50
49
  methods: {
51
50
  homeclick() {
52
51
  window.scrollTo({ top: window.innerHeight, behavior: "smooth" });
53
52
  },
54
- render() {
55
- highlight();
56
- showimg();
57
- rendermath();
58
- },
59
53
  handlescroll() {
60
54
  let newlocal = document.documentElement.scrollTop;
61
55
  let menu = document.getElementById("menu");
@@ -81,7 +75,7 @@ const app = Vue.createApp({
81
75
  input.classList.add("success");
82
76
  content.innerHTML = res.decrypt;
83
77
  content.style.opacity = 1;
84
- this.render();
78
+ renderall();
85
79
  } else input.classList.add("fail");
86
80
  },
87
81
  handlesearch() {