hexo-theme-particlex 2.6.4 → 2.6.6
Sign up to get free protection for your applications and to get access to all the features.
- package/layout/import.ejs +1 -0
- package/layout/index.ejs +1 -1
- package/package.json +1 -1
- package/source/css/main.css +51 -44
- package/source/js/lib/highlight.js +4 -2
- package/source/js/main.js +1 -2
package/layout/import.ejs
CHANGED
@@ -7,6 +7,7 @@
|
|
7
7
|
<% } %>
|
8
8
|
<% if (theme.highlight.enable) { %>
|
9
9
|
<script src="https://cdn.staticfile.org/highlight.js/11.7.0/highlight.min.js"></script>
|
10
|
+
<script src="https://cdn.staticfile.org/highlightjs-line-numbers.js/2.8.0/highlightjs-line-numbers.min.js"></script>
|
10
11
|
<link
|
11
12
|
rel="stylesheet"
|
12
13
|
href="https://cdn.staticfile.org/highlight.js/11.7.0/styles/<%- theme.highlight.style %>.min.css"
|
package/layout/index.ejs
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
</span>
|
15
15
|
</div>
|
16
16
|
</div>
|
17
|
-
<div id="home-posts-wrap" <%- theme.card.enable
|
17
|
+
<div id="home-posts-wrap" <%- theme.card.enable || 'class="home-posts-wrap-no-card"' %> ref="homePostsWrap">
|
18
18
|
<div id="home-posts">
|
19
19
|
<%- partial("posts") %>
|
20
20
|
<%- partial("current") %>
|
package/package.json
CHANGED
package/source/css/main.css
CHANGED
@@ -396,15 +396,6 @@
|
|
396
396
|
min-height: 50px;
|
397
397
|
text-align: center;
|
398
398
|
}
|
399
|
-
#menu-curtain {
|
400
|
-
background: #0003;
|
401
|
-
height: 100%;
|
402
|
-
left: 0;
|
403
|
-
position: fixed;
|
404
|
-
top: 0;
|
405
|
-
width: 100%;
|
406
|
-
z-index: 1001;
|
407
|
-
}
|
408
399
|
#menu #mobile-menu .items {
|
409
400
|
padding: 10px 0 20px;
|
410
401
|
z-index: 1002;
|
@@ -424,16 +415,25 @@
|
|
424
415
|
cursor: pointer;
|
425
416
|
z-index: 1003;
|
426
417
|
}
|
418
|
+
#menu-curtain {
|
419
|
+
background: #0003;
|
420
|
+
height: 100%;
|
421
|
+
left: 0;
|
422
|
+
position: fixed;
|
423
|
+
top: 0;
|
424
|
+
width: 100%;
|
425
|
+
z-index: 1001;
|
426
|
+
}
|
427
427
|
#menu.hidden {
|
428
|
-
top: -50px
|
428
|
+
top: -50px;
|
429
429
|
}
|
430
430
|
#menu.menu-color {
|
431
|
-
background: #0003
|
432
|
-
box-shadow: 0 -1px 10px 0 transparent !important;
|
431
|
+
background: #0003;
|
433
432
|
}
|
434
|
-
#menu.menu-color
|
435
|
-
#menu.menu-color a
|
436
|
-
|
433
|
+
#menu.menu-color #desktop-menu a,
|
434
|
+
#menu.menu-color #mobile-menu a,
|
435
|
+
#menu.menu-color #mobile-menu .title {
|
436
|
+
color: #fff;
|
437
437
|
}
|
438
438
|
#preview {
|
439
439
|
align-items: center;
|
@@ -535,6 +535,16 @@ body::-webkit-scrollbar-track {
|
|
535
535
|
.fade-leave-to {
|
536
536
|
opacity: 0;
|
537
537
|
}
|
538
|
+
.hljs-ln-code {
|
539
|
+
padding-left: 20px !important;
|
540
|
+
}
|
541
|
+
.hljs-ln-numbers {
|
542
|
+
border-right: 1px solid #ccc;
|
543
|
+
color: #ccc;
|
544
|
+
padding-right: 10px !important;
|
545
|
+
text-align: center;
|
546
|
+
vertical-align: top;
|
547
|
+
}
|
538
548
|
.icon {
|
539
549
|
color: #5c6b72;
|
540
550
|
margin-right: 5px;
|
@@ -571,7 +581,7 @@ body::-webkit-scrollbar-track {
|
|
571
581
|
transform: scale(1.1);
|
572
582
|
}
|
573
583
|
.katex {
|
574
|
-
|
584
|
+
white-space: normal !important;
|
575
585
|
}
|
576
586
|
.language {
|
577
587
|
background: linear-gradient(to right, #ed6ea0 0%, #ec8c69 100%);
|
@@ -664,6 +674,24 @@ a:hover,
|
|
664
674
|
.content .copycode:hover {
|
665
675
|
opacity: 0.8;
|
666
676
|
}
|
677
|
+
audio,
|
678
|
+
button,
|
679
|
+
iframe,
|
680
|
+
img,
|
681
|
+
video,
|
682
|
+
#home-head,
|
683
|
+
#menu,
|
684
|
+
.categories-tags a,
|
685
|
+
.copycode,
|
686
|
+
.friend-link a,
|
687
|
+
.go-post,
|
688
|
+
.hljs-ln-numbers,
|
689
|
+
.icon-link a,
|
690
|
+
.katex,
|
691
|
+
.language,
|
692
|
+
.page-current {
|
693
|
+
user-select: none;
|
694
|
+
}
|
667
695
|
b,
|
668
696
|
strong {
|
669
697
|
font-weight: bold;
|
@@ -684,23 +712,6 @@ body {
|
|
684
712
|
overflow-x: hidden;
|
685
713
|
width: 100%;
|
686
714
|
}
|
687
|
-
button,
|
688
|
-
img,
|
689
|
-
video,
|
690
|
-
audio,
|
691
|
-
iframe,
|
692
|
-
#home-head,
|
693
|
-
#menu,
|
694
|
-
.katex,
|
695
|
-
.go-post,
|
696
|
-
.page-current,
|
697
|
-
.categories-tags a,
|
698
|
-
.friend-link a,
|
699
|
-
.icon-link a,
|
700
|
-
.language,
|
701
|
-
.copycode {
|
702
|
-
user-select: none;
|
703
|
-
}
|
704
715
|
code {
|
705
716
|
background: #bddcf76b;
|
706
717
|
border-radius: 4px;
|
@@ -759,14 +770,10 @@ ol {
|
|
759
770
|
margin: 15px 0;
|
760
771
|
}
|
761
772
|
pre {
|
762
|
-
border: 1px solid #ebeef5;
|
763
773
|
border: 1px solid #ebeef5;
|
764
774
|
border-radius: 15px;
|
765
|
-
border-radius: 15px;
|
766
|
-
box-shadow: 0 2px 12px 0 #0000001a;
|
767
775
|
box-shadow: 0 2px 12px 0 #0000001a;
|
768
776
|
margin: 25px 0;
|
769
|
-
margin: 25px 0;
|
770
777
|
white-space: normal;
|
771
778
|
}
|
772
779
|
pre,
|
@@ -778,22 +785,22 @@ code,
|
|
778
785
|
.language {
|
779
786
|
font-family: "Fira Code", "Noto Sans SC", monospace;
|
780
787
|
}
|
781
|
-
table {
|
788
|
+
table:not(.hljs-ln) {
|
782
789
|
margin: 15px 0;
|
783
790
|
}
|
784
|
-
table td:nth-child(even) {
|
791
|
+
table:not(.hljs-ln) td:nth-child(even) {
|
785
792
|
background: #c7e0fb4d;
|
786
793
|
}
|
787
|
-
table td:nth-child(odd) {
|
794
|
+
table:not(.hljs-ln) td:nth-child(odd) {
|
788
795
|
background: #d9e8ff4d;
|
789
796
|
}
|
790
|
-
table th {
|
797
|
+
table:not(.hljs-ln) th {
|
791
798
|
background: #a3ddfb;
|
792
799
|
}
|
793
|
-
table tr th,
|
794
|
-
table tr td {
|
795
|
-
padding: 10px 20px;
|
800
|
+
table:not(.hljs-ln) tr th,
|
801
|
+
table:not(.hljs-ln) tr td {
|
796
802
|
border-radius: 3px;
|
803
|
+
padding: 10px 20px;
|
797
804
|
}
|
798
805
|
ul li,
|
799
806
|
ol li {
|
@@ -7,8 +7,8 @@ mixins.highlight = {
|
|
7
7
|
this.renderers.push(this.highlight);
|
8
8
|
},
|
9
9
|
methods: {
|
10
|
-
sleep(
|
11
|
-
return new Promise(resolve => setTimeout(resolve,
|
10
|
+
sleep(delay) {
|
11
|
+
return new Promise(resolve => setTimeout(resolve, delay));
|
12
12
|
},
|
13
13
|
highlight() {
|
14
14
|
let codes = document.querySelectorAll("pre");
|
@@ -29,6 +29,8 @@ mixins.highlight = {
|
|
29
29
|
<i class="fa-solid fa-clone fa-fw"></i>
|
30
30
|
</div>
|
31
31
|
`;
|
32
|
+
let content = i.querySelector(".code-content");
|
33
|
+
hljs.lineNumbersBlock(content, { singleLine: true });
|
32
34
|
let copycode = i.querySelector(".copycode");
|
33
35
|
copycode.addEventListener("click", async () => {
|
34
36
|
if (this.copying) return;
|
package/source/js/main.js
CHANGED
@@ -32,10 +32,9 @@ const app = Vue.createApp({
|
|
32
32
|
this.showMenuItems = false;
|
33
33
|
} else this.hiddenMenu = false;
|
34
34
|
if (wrap) {
|
35
|
+
wrap.style.top = -Math.min(newScrollTop / 5, 80) + "px";
|
35
36
|
if (newScrollTop <= window.innerHeight - 100) this.menuColor = true;
|
36
37
|
else this.menuColor = false;
|
37
|
-
if (newScrollTop <= 400) wrap.style.marginTop = -newScrollTop / 5 + "px";
|
38
|
-
else wrap.style.marginTop = "-80px";
|
39
38
|
}
|
40
39
|
this.scrollTop = newScrollTop;
|
41
40
|
},
|