hexo-theme-particlex 2.4.1 → 2.4.3

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.3",
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,47 @@
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
+ .content video,
530
+ .content audio,
531
+ .content iframe {
532
+ display: block;
533
+ margin: 15px auto;
534
+ max-width: 75%;
535
+ }
536
+ .copycode {
529
537
  color: #5c6b72;
530
538
  position: absolute;
531
539
  right: 0;
532
540
  top: 0;
533
541
  }
534
- .content .copycode i {
542
+ .copycode i {
535
543
  padding: 15px;
536
544
  position: absolute;
537
545
  right: 0;
538
546
  top: 0;
539
547
  transition: transform 0.25s;
540
548
  }
541
- .content .copycode.copied i {
549
+ .copycode.copied i {
542
550
  transform: scale(1.25);
543
551
  }
544
- .content .copycode.copied i:first-child,
545
- .content .copycode:not(.copied) i:last-child {
552
+ .copycode.copied i:first-child,
553
+ .copycode:not(.copied) i:last-child {
546
554
  opacity: 0;
547
555
  }
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
556
  .icon {
616
557
  color: #5c6b72;
617
558
  margin-right: 5px;
@@ -642,6 +583,20 @@
642
583
  .into-leave-active {
643
584
  animation: into 0.6s;
644
585
  }
586
+ .language {
587
+ background: linear-gradient(to right, #ed6ea0 0, #ec8c69 100%);
588
+ border-radius: 0 0 10px 10px;
589
+ box-shadow: 1px 1px 0.75rem #ed6ea14d;
590
+ color: #fff;
591
+ font: bold 12px "Fira Code", "Noto Sans SC", monospace;
592
+ left: 30px;
593
+ padding: 10px 15px;
594
+ position: absolute;
595
+ top: 0;
596
+ }
597
+ .markdownIt-Anchor {
598
+ display: none;
599
+ }
645
600
  .math.display .katex {
646
601
  overflow: auto;
647
602
  }
@@ -717,18 +672,24 @@
717
672
  color: unset;
718
673
  }
719
674
  a {
675
+ color: #66afef;
720
676
  text-decoration: none;
721
677
  }
722
678
  a:hover,
723
679
  .content .copycode:hover {
724
680
  opacity: 0.8;
725
681
  }
682
+ b,
683
+ strong {
684
+ font-weight: bold;
685
+ line-height: 2.5;
686
+ }
726
687
  blockquote {
727
688
  background: #d9e8ff6b;
728
689
  border-left: 3px solid #1e3e3f;
729
690
  border-radius: 3px;
730
- margin: 15px 0;
731
- padding: 0.1px 15px;
691
+ display: flex;
692
+ padding: 0 15px;
732
693
  }
733
694
  body {
734
695
  background: #f6f8fa;
@@ -737,71 +698,101 @@ body {
737
698
  overflow-x: hidden;
738
699
  width: 100%;
739
700
  }
740
- body::-webkit-scrollbar-track {
741
- border-radius: 0;
742
- }
743
701
  button,
744
702
  img,
703
+ video,
704
+ audio,
745
705
  iframe,
746
706
  #home-head,
747
707
  #menu,
748
708
  .math,
749
709
  .go-post,
750
710
  .page-current,
751
- .categories-tags span a,
711
+ .categories-tags a,
752
712
  .friend-link a,
753
- pre .language,
754
- pre .copycode {
713
+ .icon-link a,
714
+ .language,
715
+ .copycode {
755
716
  user-select: none;
756
717
  }
718
+ code {
719
+ background: #bddcf76b;
720
+ border-radius: 4px;
721
+ color: #4b616b;
722
+ font: 500 14px/2.5 "Fira Code", "Noto Sans SC", monospace;
723
+ padding: 4px 8px;
724
+ }
757
725
  h1 {
726
+ font-size: 30px;
727
+ }
728
+ h1,
729
+ h2,
730
+ h3,
731
+ h4,
732
+ h5,
733
+ h6 {
758
734
  color: #1e3e3f;
759
- font: bold 30px Lexend, "Noto Sans SC", sans-serif;
735
+ font-weight: bold;
760
736
  margin: 15px 0;
761
737
  }
762
738
  h2 {
763
- color: #1e3e3f;
764
- font: bold 27px Lexend, "Noto Sans SC", sans-serif;
765
- margin: 15px 0;
739
+ font-size: 27px;
766
740
  }
767
741
  h3 {
768
- color: #1e3e3f;
769
- font: bold 24px Lexend, "Noto Sans SC", sans-serif;
770
- margin: 15px 0;
742
+ font-size: 24px;
771
743
  }
772
744
  h4 {
773
- color: #1e3e3f;
774
- font: bold 21px Lexend, "Noto Sans SC", sans-serif;
775
- margin: 15px 0;
745
+ font-size: 21px;
776
746
  }
777
747
  h5 {
778
- color: #1e3e3f;
779
- font: bold 18px Lexend, "Noto Sans SC", sans-serif;
780
- margin: 15px 0;
748
+ font-size: 18px;
749
+ }
750
+ h6 {
751
+ font-size: 15px;
781
752
  }
782
753
  hr {
783
- border-bottom: none;
784
- border-left: none;
785
- border-right: none;
786
- border-style: dashed;
754
+ border-style: dashed none none;
787
755
  border-width: 1.5px;
788
756
  }
789
- img {
757
+ img,
758
+ video,
759
+ audio,
760
+ iframe {
790
761
  border-radius: 10px;
791
762
  }
792
- p {
763
+ p,
764
+ ul,
765
+ ol {
793
766
  line-height: 1.7;
794
767
  margin: 15px 0;
795
768
  }
769
+ pre {
770
+ border: 1px solid #ebeef5;
771
+ border: 1px solid #ebeef5;
772
+ border-radius: 15px;
773
+ border-radius: 15px;
774
+ box-shadow: 0 2px 12px 0 #0000001a;
775
+ box-shadow: 0 2px 12px 0 #0000001a;
776
+ margin: 25px 0;
777
+ margin: 25px 0;
778
+ }
779
+ table tbody tr td:nth-child(even) {
780
+ background: #c7e0fb4d;
781
+ }
782
+ table tbody tr td:nth-child(odd) {
783
+ background: #d9e8ff4d;
784
+ }
785
+ table thead tr th {
786
+ background: #a3ddfb;
787
+ color: #1e3e3f;
788
+ padding: 8px 20px;
789
+ }
790
+ table tr td {
791
+ padding: 8px 20px;
792
+ }
796
793
  ul li,
797
794
  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;
795
+ margin: 8px 0;
805
796
  }
806
797
  @media (min-width: 900px) {
807
798
  #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() {