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