hexo-theme-particlex 2.6.5 → 2.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/layout/import.ejs +1 -0
- package/layout/index.ejs +1 -1
- package/package.json +1 -1
- package/source/css/main.css +44 -33
- 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,6 +415,15 @@
|
|
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
428
|
top: -50px;
|
429
429
|
}
|
@@ -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;
|
@@ -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;
|
@@ -774,22 +785,22 @@ code,
|
|
774
785
|
.language {
|
775
786
|
font-family: "Fira Code", "Noto Sans SC", monospace;
|
776
787
|
}
|
777
|
-
table {
|
788
|
+
table:not(.hljs-ln) {
|
778
789
|
margin: 15px 0;
|
779
790
|
}
|
780
|
-
table td:nth-child(even) {
|
791
|
+
table:not(.hljs-ln) td:nth-child(even) {
|
781
792
|
background: #c7e0fb4d;
|
782
793
|
}
|
783
|
-
table td:nth-child(odd) {
|
794
|
+
table:not(.hljs-ln) td:nth-child(odd) {
|
784
795
|
background: #d9e8ff4d;
|
785
796
|
}
|
786
|
-
table th {
|
797
|
+
table:not(.hljs-ln) th {
|
787
798
|
background: #a3ddfb;
|
788
799
|
}
|
789
|
-
table tr th,
|
790
|
-
table tr td {
|
791
|
-
padding: 10px 20px;
|
800
|
+
table:not(.hljs-ln) tr th,
|
801
|
+
table:not(.hljs-ln) tr td {
|
792
802
|
border-radius: 3px;
|
803
|
+
padding: 10px 20px;
|
793
804
|
}
|
794
805
|
ul li,
|
795
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
|
},
|