hexo-theme-particlex 2.2.9 → 2.2.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@
5
5
  <div id="archives">
6
6
  <% if (theme.search.enable) { %>
7
7
  <div id="search-mask" style="z-index: <%= posts.length + 1 %>"></div>
8
- <input id="search-bar" class="ipt" placeholder="搜索" style="z-index: <%= posts.length + 2 %>">
8
+ <input id="search-bar" class="input" placeholder="搜索" style="z-index: <%= posts.length + 2 %>">
9
9
  <% } %>
10
10
  <% posts.forEach((post, id) => { %>
11
11
  <div class="timeline" style="z-index: <%= posts.length - id %>" data-title="<%- post.title.toLowerCase().replace(/\s+/gm, "") %>">
package/layout/index.ejs CHANGED
@@ -1,7 +1,7 @@
1
- <div id="home-background" style="background-image: url(<%- theme.background %>)"></div>
2
1
  <div id="home-head">
2
+ <div id="home-background" style="background-image: url(<%- theme.background %>)"></div>
3
3
  <% if (theme.headBlockEnable) { %>
4
- <div id="home-info" class="home-info" @click="homeclick">
4
+ <div id="home-info" @click="homeclick">
5
5
  <span class="loop"></span>
6
6
  <span class="loop"></span>
7
7
  <span class="loop"></span>
package/layout/layout.ejs CHANGED
@@ -53,18 +53,14 @@
53
53
  <%- partial("loading") %>
54
54
  <div id="layout">
55
55
  <transition name="into">
56
- <div v-show="showpage" style="display: -not-none">
57
- <div id="menushow">
58
- <%- partial("menu") %>
59
- </div>
60
- <div id="main">
61
- <%- partial(type) %>
62
- <%- partial("footer") %>
63
- </div>
56
+ <div id="main" v-show="showpage" style="display: -not-none">
57
+ <%- partial("menu") %>
58
+ <%- partial(type) %>
59
+ <%- partial("footer") %>
64
60
  </div>
65
61
  </transition>
66
62
  <div id="showimg">
67
- <img id="showimg-content" alt="showimg">
63
+ <img id="showimg-content">
68
64
  </div>
69
65
  </div>
70
66
  <%- partial("script", { type }) %>
package/layout/post.ejs CHANGED
@@ -51,7 +51,7 @@
51
51
  }).toString();
52
52
  }
53
53
  %>
54
- <input id="crypto" class="ipt" placeholder="文章被加密,请输入密码" data-encrypt="<%- encrypt(page.content, page.password.toString()) %>" data-check="<%- sha(page.content) %>">
54
+ <input id="crypto" class="input" placeholder="文章被加密,请输入密码" data-encrypt="<%- encrypt(page.content, page.password.toString()) %>" data-check="<%- sha(page.content) %>">
55
55
  <div class="content" style="opacity: 0" v-pre></div>
56
56
  <% } else { %>
57
57
  <div class="content" v-pre>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-particlex",
3
- "version": "2.2.9",
3
+ "version": "2.2.10",
4
4
  "description": "A concise Hexo theme, based on Particle.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -51,7 +51,6 @@
51
51
  #archives {
52
52
  margin: auto;
53
53
  padding: 20px;
54
- position: relative;
55
54
  top: 100px;
56
55
  }
57
56
  #archives .categories-tags {
@@ -111,20 +110,7 @@
111
110
  border-color: #34d058;
112
111
  color: #34d058;
113
112
  }
114
- #home-background {
115
- position: absolute;
116
- z-index: -1;
117
- height: 100vh;
118
- left: 0;
119
- top: 0;
120
- width: 100vw;
121
- background-position: center;
122
- background-repeat: no-repeat;
123
- background-size: cover;
124
- background-attachment: fixed;
125
- }
126
113
  #home-card {
127
- position: relative;
128
114
  width: 300px;
129
115
  }
130
116
  #home-card .card-style {
@@ -159,9 +145,9 @@
159
145
  margin-bottom: 5px;
160
146
  }
161
147
  #home-card .card-style .friend-links a {
162
- display: block;
163
148
  border-radius: 5px;
164
149
  color: #5c6b72;
150
+ display: block;
165
151
  padding: 8px 0;
166
152
  }
167
153
  #home-card .card-style .icon-links .icon-link {
@@ -174,7 +160,8 @@
174
160
  padding: 5px;
175
161
  }
176
162
  #home-card .card-style .icon-links a:hover,
177
- #home-card .card-style .friend-links a:hover {
163
+ #home-card .card-style .friend-links a:hover,
164
+ #home-posts .page-current .page-num:hover {
178
165
  background: #66afef;
179
166
  color: #fff;
180
167
  }
@@ -194,50 +181,58 @@
194
181
  #home-head {
195
182
  display: flex;
196
183
  height: 100vh;
197
- position: relative;
198
184
  width: 100vw;
199
185
  }
200
- #home-head .home-info .info {
186
+ #home-head #home-background {
187
+ background-position: center;
188
+ background-repeat: no-repeat;
189
+ background-size: cover;
190
+ height: 100vh;
191
+ left: 0;
192
+ position: absolute;
193
+ top: 0;
194
+ width: 100vw;
195
+ z-index: -1;
196
+ }
197
+ #home-head #home-info .info {
201
198
  align-items: center;
202
199
  border-radius: 50%;
203
200
  color: #333;
204
201
  display: flex;
205
202
  justify-content: center;
206
- position: absolute;
207
203
  text-align: center;
208
204
  }
209
- #home-head .home-info .loop:nth-child(1) {
205
+ #home-head #home-info .loop:nth-child(1) {
210
206
  animation: loop1 10s linear infinite;
211
207
  background: #fff;
212
208
  border-radius: 38% 62% 63% 37%/41% 44% 56% 59%;
213
209
  opacity: 0.3;
214
210
  transform: rotate(30deg);
215
211
  }
216
- #home-head .home-info .loop:nth-child(2) {
212
+ #home-head #home-info .loop:nth-child(2) {
217
213
  animation: loop2 15s linear infinite;
218
214
  background: #fff;
219
215
  border-radius: 38% 62% 63% 37%/41% 44% 56% 59%;
220
216
  opacity: 0.45;
221
217
  transform: rotate(60deg);
222
218
  }
223
- #home-head .home-info .loop:nth-child(3) {
219
+ #home-head #home-info .loop:nth-child(3) {
224
220
  animation: loop3 10s linear infinite;
225
221
  background: #fff;
226
222
  border-radius: 38% 62% 63% 37%/41% 44% 56% 59%;
227
223
  opacity: 0.3;
228
224
  transform: rotate(90deg);
229
225
  }
230
- #home-head .home-info .loop:nth-child(4) {
226
+ #home-head #home-info .loop:nth-child(4) {
231
227
  animation: loop4 15s linear infinite;
232
228
  background: #fff;
233
229
  border-radius: 38% 62% 63% 37%/41% 44% 56% 59%;
234
230
  opacity: 0.45;
235
231
  transform: rotate(120deg);
236
232
  }
237
- #home-head .home-info,
233
+ #home-head #home-info,
238
234
  #home-posts {
239
235
  margin: auto;
240
- position: relative;
241
236
  }
242
237
  #home-posts .page-current {
243
238
  align-items: center;
@@ -272,10 +267,6 @@
272
267
  padding: 5px;
273
268
  width: 35px;
274
269
  }
275
- #home-posts .page-current .page-num:hover {
276
- background: #66afef;
277
- color: #fff;
278
- }
279
270
  #home-posts .page-current .prev,
280
271
  #home-posts .page-current .next {
281
272
  text-align: center;
@@ -288,7 +279,6 @@
288
279
  background: #fff;
289
280
  border-radius: 20px;
290
281
  box-shadow: 0 0 20px #d9d9d980;
291
- position: relative;
292
282
  transition: box-shadow 0.25s, transform 0.25s;
293
283
  }
294
284
  #home-posts .post .category-and-date {
@@ -310,7 +300,8 @@
310
300
  color: #5c6b72;
311
301
  }
312
302
  #home-posts .post .category-and-date .date,
313
- #archives .tags {
303
+ #archives .tags,
304
+ #menu .desktop-menu a span {
314
305
  display: inline-block;
315
306
  }
316
307
  #home-posts .post .category-and-date .special {
@@ -365,7 +356,6 @@
365
356
  display: flex;
366
357
  margin: auto;
367
358
  padding: 20px;
368
- position: relative;
369
359
  }
370
360
  #home-posts-wrap,
371
361
  #archives,
@@ -393,7 +383,7 @@ footer .footer-wrap {
393
383
  #menu .desktop-menu .title {
394
384
  color: #555;
395
385
  display: inline-block;
396
- font-family: "Lexend", "Noto Sans SC", sans-serif;
386
+ font-family: Lexend, "Noto Sans SC", sans-serif;
397
387
  margin-left: 30px;
398
388
  text-transform: uppercase;
399
389
  }
@@ -402,13 +392,8 @@ footer .footer-wrap {
402
392
  display: inline-block;
403
393
  margin-left: 30px;
404
394
  }
405
- #menu .desktop-menu a span {
406
- display: inline-block;
407
- position: relative;
408
- }
409
395
  #menu .desktop-menu a span img {
410
396
  height: 20px;
411
- position: relative;
412
397
  top: 3px;
413
398
  width: 20px;
414
399
  }
@@ -429,7 +414,6 @@ footer .footer-wrap {
429
414
  }
430
415
  #menu .phone-menu .items {
431
416
  padding: 10px 0 20px;
432
- position: relative;
433
417
  z-index: 10003;
434
418
  }
435
419
  #menu .phone-menu .items .item {
@@ -446,9 +430,19 @@ footer .footer-wrap {
446
430
  color: #555;
447
431
  cursor: pointer;
448
432
  text-transform: uppercase;
449
- position: relative;
450
433
  z-index: 10004;
451
434
  }
435
+ #menu.hidden-menu {
436
+ top: -70px !important;
437
+ }
438
+ #menu.menu-color {
439
+ background: #0003 !important;
440
+ box-shadow: 0 -1px 10px 0 transparent !important;
441
+ }
442
+ #menu.menu-color .title,
443
+ #menu.menu-color a {
444
+ color: #fff !important;
445
+ }
452
446
  #search-bar {
453
447
  margin: 0 auto 50px;
454
448
  }
@@ -458,14 +452,13 @@ footer .footer-wrap {
458
452
  margin: auto;
459
453
  margin-bottom: -25px;
460
454
  margin-top: -125px;
461
- position: relative;
462
455
  width: 100%;
463
456
  }
464
457
  #showimg {
465
458
  align-items: center;
466
459
  background-color: #fffc;
467
460
  display: flex;
468
- height: 100%;
461
+ height: 100vh;
469
462
  justify-content: center;
470
463
  left: 0;
471
464
  opacity: 0;
@@ -473,7 +466,7 @@ footer .footer-wrap {
473
466
  top: 0;
474
467
  transition: opacity 0.25s, visibility 0.25s;
475
468
  visibility: hidden;
476
- width: 100%;
469
+ width: 100vw;
477
470
  z-index: 10006;
478
471
  }
479
472
  #showimg-content {
@@ -481,11 +474,11 @@ footer .footer-wrap {
481
474
  margin: auto;
482
475
  max-height: 95%;
483
476
  max-width: 95%;
484
- position: relative;
485
477
  }
486
478
  * {
487
479
  margin: 0;
488
480
  padding: 0;
481
+ position: relative;
489
482
  scrollbar-color: #8ab5ff #e6efff;
490
483
  scrollbar-width: thin;
491
484
  word-break: keep-all;
@@ -496,7 +489,6 @@ footer .footer-wrap {
496
489
  font-size: 15px;
497
490
  margin: auto;
498
491
  padding: 20px;
499
- position: relative;
500
492
  top: 100px;
501
493
  }
502
494
  .article .content {
@@ -588,39 +580,51 @@ footer .footer-wrap a {
588
580
  border-radius: 15px;
589
581
  box-shadow: 0 2px 12px 0 #0000001a;
590
582
  margin: 25px 0;
591
- position: relative;
592
583
  }
593
584
  .content pre code {
594
585
  background: none;
595
586
  padding: 0;
596
587
  }
597
- .content table tbody tr {
598
- border-top: 2px solid #fff;
599
- }
600
- .content table tr td {
601
- padding: 8px 20px;
602
- }
603
- .content table tr td:nth-child(2n) {
588
+ .content table tbody tr td:nth-child(even) {
604
589
  background: #c7e0fb4d;
605
590
  }
606
- .content table tr td:nth-child(2n-1) {
591
+ .content table tbody tr td:nth-child(odd) {
607
592
  background: #d9e8ff4d;
608
593
  }
609
- .content table tr th {
594
+ .content table thead tr th {
595
+ background: #a3ddfb;
610
596
  color: #1e3e3f;
611
597
  padding: 8px 20px;
612
598
  }
613
- .content table tr th:nth-child(2n),
614
- .content table tr th:nth-child(2n-1) {
615
- background: #a3ddfb;
616
- }
617
- .hidden-menu {
618
- top: -70px !important;
599
+ .content table tr td {
600
+ padding: 8px 20px;
619
601
  }
620
602
  .icon {
621
603
  color: #5c6b72;
622
604
  margin-right: 5px;
623
605
  }
606
+ .input {
607
+ background: #f6f8fa;
608
+ border: 1px solid #d0d7de;
609
+ border-radius: 50px;
610
+ box-sizing: border-box;
611
+ color: #000;
612
+ display: block;
613
+ font: 15px "Fira Code", "Noto Sans SC", monospace;
614
+ height: 50px;
615
+ text-indent: 20px;
616
+ transition: background 0.25s, border 0.25s, box-shadow 0.25s;
617
+ width: 100%;
618
+ }
619
+ .input:focus {
620
+ background: #fff;
621
+ border-color: #0969da;
622
+ box-shadow: 0 0 0 3px #0969da4d;
623
+ outline: none;
624
+ }
625
+ .input:hover {
626
+ background: #fff;
627
+ }
624
628
  .into-enter-active,
625
629
  .into-leave-active {
626
630
  animation: into 0.6s;
@@ -628,14 +632,6 @@ footer .footer-wrap a {
628
632
  .math.display .katex {
629
633
  overflow: auto;
630
634
  }
631
- .menu-color {
632
- background: #0003 !important;
633
- box-shadow: 0 -1px 10px 0 transparent !important;
634
- }
635
- .menu-color .title,
636
- .menu-color a {
637
- color: #fff !important;
638
- }
639
635
  .page-num,
640
636
  .icon-link a,
641
637
  .friend-link a {
@@ -659,7 +655,6 @@ footer .footer-wrap a {
659
655
  }
660
656
  .timeline {
661
657
  margin-bottom: 30px;
662
- position: relative;
663
658
  transition: margin-top 0.5s, opacity 0.25s;
664
659
  }
665
660
  .timeline-content {
@@ -725,7 +720,7 @@ blockquote {
725
720
  body {
726
721
  background: #f6f8fa;
727
722
  color: #000000d9;
728
- font: 500 14px "Lexend", "Noto Sans SC", sans-serif;
723
+ font: 500 14px Lexend, "Noto Sans SC", sans-serif;
729
724
  overflow-x: hidden;
730
725
  width: 100%;
731
726
  }
@@ -749,7 +744,6 @@ pre .copycode {
749
744
  footer {
750
745
  font-size: 14px;
751
746
  padding-bottom: 20px;
752
- position: relative;
753
747
  text-align: center;
754
748
  top: 150px;
755
749
  width: 100%;
@@ -771,27 +765,27 @@ footer .footer-wrap div {
771
765
  }
772
766
  h1 {
773
767
  color: #1e3e3f;
774
- font: bold 30px "Lexend", "Noto Sans SC", sans-serif;
768
+ font: bold 30px Lexend, "Noto Sans SC", sans-serif;
775
769
  margin: 15px 0;
776
770
  }
777
771
  h2 {
778
772
  color: #1e3e3f;
779
- font: bold 27px "Lexend", "Noto Sans SC", sans-serif;
773
+ font: bold 27px Lexend, "Noto Sans SC", sans-serif;
780
774
  margin: 15px 0;
781
775
  }
782
776
  h3 {
783
777
  color: #1e3e3f;
784
- font: bold 24px "Lexend", "Noto Sans SC", sans-serif;
778
+ font: bold 24px Lexend, "Noto Sans SC", sans-serif;
785
779
  margin: 15px 0;
786
780
  }
787
781
  h4 {
788
782
  color: #1e3e3f;
789
- font: bold 21px "Lexend", "Noto Sans SC", sans-serif;
783
+ font: bold 21px Lexend, "Noto Sans SC", sans-serif;
790
784
  margin: 15px 0;
791
785
  }
792
786
  h5 {
793
787
  color: #1e3e3f;
794
- font: bold 18px "Lexend", "Noto Sans SC", sans-serif;
788
+ font: bold 18px Lexend, "Noto Sans SC", sans-serif;
795
789
  margin: 15px 0;
796
790
  }
797
791
  hr {
@@ -804,29 +798,6 @@ hr {
804
798
  img {
805
799
  border-radius: 10px;
806
800
  }
807
- input.ipt {
808
- background: #f6f8fa;
809
- border: 1px solid #d0d7de;
810
- border-radius: 50px;
811
- box-sizing: border-box;
812
- color: #000;
813
- display: block;
814
- font: 15px "Fira Code", "Noto Sans SC", monospace;
815
- height: 50px;
816
- position: relative;
817
- text-indent: 20px;
818
- transition: background 0.25s, border 0.25s, box-shadow 0.25s;
819
- width: 100%;
820
- }
821
- input.ipt:focus {
822
- background: #fff;
823
- border-color: #0969da;
824
- box-shadow: 0 0 0 3px #0969da4d;
825
- outline: none;
826
- }
827
- input.ipt:hover {
828
- background: #fff;
829
- }
830
801
  p {
831
802
  line-height: 1.7;
832
803
  margin: 15px 0;
@@ -845,30 +816,30 @@ ol {
845
816
  #home-card {
846
817
  margin-right: auto;
847
818
  }
848
- #home-head .home-info .info .wrap {
819
+ #home-head #home-info .info .wrap {
849
820
  padding: 25px;
850
821
  }
851
- #home-head .home-info .info .wrap h1 {
822
+ #home-head #home-info .info .wrap h1 {
852
823
  font-size: 52px;
853
824
  font-weight: bold;
854
825
  margin-bottom: 10px;
855
826
  }
856
- #home-head .home-info .info .wrap h3 {
827
+ #home-head #home-info .info .wrap h3 {
857
828
  font-size: 24px;
858
829
  margin: 10px 0;
859
830
  }
860
- #home-head .home-info .info .wrap h5 {
831
+ #home-head #home-info .info .wrap h5 {
861
832
  font-size: 16px;
862
833
  margin: 20px 0;
863
834
  }
864
- #home-head .home-info .loop {
835
+ #home-head #home-info .loop {
865
836
  display: inline-block;
866
837
  height: 500px;
867
838
  position: absolute;
868
839
  width: 500px;
869
840
  }
870
- #home-head .home-info,
871
- #home-head .home-info .info {
841
+ #home-head #home-info,
842
+ #home-head #home-info .info {
872
843
  height: 500px;
873
844
  width: 500px;
874
845
  }
@@ -921,11 +892,11 @@ ol {
921
892
  }
922
893
  }
923
894
  @media (max-width: 900px) {
924
- #home-head .home-info {
895
+ #home-head #home-info {
925
896
  height: 350px;
926
897
  width: 350px;
927
898
  }
928
- #home-head .home-info .info {
899
+ #home-head #home-info .info {
929
900
  align-items: center;
930
901
  background: #ffffffa6;
931
902
  display: flex;
@@ -934,22 +905,22 @@ ol {
934
905
  margin: auto;
935
906
  width: 350px;
936
907
  }
937
- #home-head .home-info .info .wrap {
908
+ #home-head #home-info .info .wrap {
938
909
  padding: 50px;
939
910
  }
940
- #home-head .home-info .info .wrap h1 {
941
- font: bold 46px "Lexend", "Noto Sans SC", sans-serif;
911
+ #home-head #home-info .info .wrap h1 {
912
+ font: bold 46px Lexend, "Noto Sans SC", sans-serif;
942
913
  margin-bottom: 10px;
943
914
  }
944
- #home-head .home-info .info .wrap h3 {
915
+ #home-head #home-info .info .wrap h3 {
945
916
  font-size: 20px;
946
917
  margin: 10px 0;
947
918
  }
948
- #home-head .home-info .info .wrap h5 {
919
+ #home-head #home-info .info .wrap h5 {
949
920
  font-size: 14px;
950
921
  margin: 20px 0;
951
922
  }
952
- #home-head .home-info .loop {
923
+ #home-head #home-info .loop {
953
924
  display: none;
954
925
  height: 350px;
955
926
  position: absolute;
@@ -25,8 +25,9 @@ function showimg() {
25
25
  let wrap = document.getElementById("showimg"),
26
26
  content = document.getElementById("showimg-content"),
27
27
  images = document.querySelectorAll(".article .content img");
28
- function show(src) {
29
- content.src = src;
28
+ function show(image) {
29
+ content.alt = image.alt;
30
+ content.src = image.src;
30
31
  wrap.style.opacity = 1;
31
32
  wrap.style.visibility = "visible";
32
33
  }
@@ -36,7 +37,7 @@ function showimg() {
36
37
  }
37
38
  for (let i of images)
38
39
  i.addEventListener("click", function () {
39
- show(this.getAttribute("src"));
40
+ show(this);
40
41
  });
41
42
  wrap.addEventListener("click", hide);
42
43
  window.addEventListener("resize", hide);
@@ -57,20 +57,14 @@ const app = Vue.createApp({
57
57
  let newlocal = document.documentElement.scrollTop;
58
58
  let menu = document.getElementById("menu");
59
59
  let wrap = document.getElementById("home-posts-wrap");
60
- let footer = document.getElementById("footer");
61
60
  if (this.barlocal < newlocal) {
62
61
  menu.className = "hidden-menu";
63
62
  this.menushow = false;
64
63
  } else menu.className = "show-menu";
65
64
  if (wrap) {
66
65
  if (newlocal <= window.innerHeight - 100) menu.className += " menu-color";
67
- if (newlocal <= 400) {
68
- wrap.style.top = newlocal / -5 + "px";
69
- footer.style.top = newlocal / -5 + 150 + "px";
70
- } else {
71
- wrap.style.top = "-80px";
72
- footer.style.top = "70px";
73
- }
66
+ if (newlocal <= 400) wrap.style.marginTop = newlocal / -5 + "px";
67
+ else wrap.style.marginTop = "-80px";
74
68
  }
75
69
  this.barlocal = newlocal;
76
70
  },