hexo-theme-yet-the-books-optimize 1.0.0

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.
Files changed (52) hide show
  1. package/.gitattributes +2 -0
  2. package/LICENSE +21 -0
  3. package/README.md +3 -0
  4. package/_config.yml +103 -0
  5. package/cover/1.png +0 -0
  6. package/cover/2.png +0 -0
  7. package/cover/3.png +0 -0
  8. package/cover/4.png +0 -0
  9. package/index.js +2 -0
  10. package/languages/default.yml +5 -0
  11. package/languages/en.yml +5 -0
  12. package/languages/zh-CN.yml +5 -0
  13. package/layout/_partial/_analytics/baidu.ejs +9 -0
  14. package/layout/_partial/_analytics/cnzz.ejs +4 -0
  15. package/layout/_partial/_analytics/google.ejs +7 -0
  16. package/layout/_partial/_analytics/gtags.ejs +8 -0
  17. package/layout/_partial/_analytics/gtm-body.ejs +6 -0
  18. package/layout/_partial/_analytics/gtm-head.ejs +9 -0
  19. package/layout/_partial/_analytics/la.ejs +4 -0
  20. package/layout/_partial/_analytics/tencent.ejs +9 -0
  21. package/layout/_partial/_comment/DiscussBot.ejs +16 -0
  22. package/layout/_partial/_comment/changyan.ejs +14 -0
  23. package/layout/_partial/_comment/disqus.ejs +17 -0
  24. package/layout/_partial/_comment/disqusjs.ejs +17 -0
  25. package/layout/_partial/_comment/giscus.ejs +13 -0
  26. package/layout/_partial/_comment/gitalk.ejs +14 -0
  27. package/layout/_partial/_comment/gitment.ejs +14 -0
  28. package/layout/_partial/_comment/livere.ejs +12 -0
  29. package/layout/_partial/_comment/utteranc.ejs +9 -0
  30. package/layout/_partial/_comment/valine.ejs +10 -0
  31. package/layout/_partial/analytics.ejs +18 -0
  32. package/layout/_partial/footer.ejs +17 -0
  33. package/layout/_partial/head.ejs +33 -0
  34. package/layout/_partial/header.ejs +10 -0
  35. package/layout/_partial/highlight.min.js +3 -0
  36. package/layout/_partial/post-nav.ejs +33 -0
  37. package/layout/archive.ejs +80 -0
  38. package/layout/category.ejs +25 -0
  39. package/layout/index.ejs +78 -0
  40. package/layout/layout.ejs +12 -0
  41. package/layout/post.ejs +40 -0
  42. package/move_config.js +18 -0
  43. package/package.json +16 -0
  44. package/scripts/helper/css_auto_version.js +17 -0
  45. package/scripts/helper/js_auto_version.js +17 -0
  46. package/source/css/style.css +621 -0
  47. package/source/image/p0402_m.jpg +0 -0
  48. package/source/image/p0438_m.jpg +0 -0
  49. package/source/image/p0440_m.jpg +0 -0
  50. package/source/image/p0452_m.jpg +0 -0
  51. package/source/image/p0459_m.jpg +0 -0
  52. package/source/js/core.js +24 -0
@@ -0,0 +1,621 @@
1
+ body {
2
+ margin: 0;
3
+ font-size: 14px;
4
+ }
5
+
6
+ @media screen and (max-width: 768px) {
7
+ body {
8
+ font-size: 14px;
9
+ }
10
+ }
11
+
12
+ body * {
13
+ font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
14
+ }
15
+
16
+ a {
17
+ transition: color 0.2s ease;
18
+ text-decoration: none;
19
+ color: #000;
20
+ }
21
+
22
+ /* 设置表格的边框样式 */
23
+ table {
24
+ border-collapse: collapse;
25
+ width: 100%;
26
+ }
27
+
28
+ /* 设置表格行的背景颜色交替显示 */
29
+ tr:nth-child(even) {
30
+ background-color: #f2f2f2;
31
+ }
32
+
33
+ /* 设置表头的背景颜色和字体样式 */
34
+ th {
35
+ background-color: #333;
36
+ color: white;
37
+ padding: 8px;
38
+ text-align: left;
39
+ }
40
+
41
+ /* 设置表格单元格的边框样式和内边距 */
42
+ td {
43
+ border: 1px solid #ddd;
44
+ padding: 8px;
45
+ }
46
+
47
+ img {
48
+ margin: 15px 0;
49
+ border: 1px solid #eee;
50
+ border-radius: 5px;
51
+ }
52
+
53
+ a:hover {
54
+ color: #aa874b;
55
+ }
56
+
57
+ ::selection {
58
+ background-color: #aa874b;
59
+ color: #fff;
60
+ }
61
+ ::-moz-selection {
62
+ background-color: #aa874b;
63
+ color: #fff;
64
+ }
65
+
66
+ .container {
67
+ max-width: 992px;
68
+ margin: 0 auto;
69
+ padding: 0 1em;
70
+ }
71
+
72
+ .header {
73
+ height: 4em;
74
+ background-color: transparent;
75
+ line-height: 4em;
76
+ background-color: #fff;
77
+ border-bottom: 2px solid #eee;
78
+ }
79
+
80
+ .header.home {
81
+ background-color: #f6f3ed;
82
+ border-bottom: 2px solid #f6f3ed;
83
+ }
84
+
85
+ .header .container {
86
+ display: flex;
87
+ flex-direction: row;
88
+ }
89
+
90
+ .header .logo {
91
+ font-weight: 700;
92
+ white-space: nowrap;
93
+ overflow: hidden;
94
+ text-overflow: ellipsis;
95
+ max-width: 10em;
96
+ }
97
+
98
+ .header .nav {
99
+ display: flex;
100
+ flex-direction: row;
101
+ list-style: none;
102
+ margin: 0;
103
+ margin-left: auto;
104
+ }
105
+
106
+ .header .nav .nav-item {
107
+ margin-left: 1.5em;
108
+ }
109
+
110
+ .content {
111
+ min-height: calc(100vh - 10em);
112
+ }
113
+
114
+ .content.home {
115
+ background-color: #fff;
116
+ }
117
+
118
+ .content .banner {
119
+ background-color: #f7f3ed;
120
+ display: block;
121
+ position: relative;
122
+ padding: 5rem 0;
123
+ }
124
+
125
+ .content.home .banner {
126
+ margin-bottom: calc(1.5rem + 4rem);
127
+ }
128
+
129
+ .content .banner h1 {
130
+ text-align: center;
131
+ color: #aa874b;
132
+ display: block;
133
+ margin: 0 auto;
134
+ }
135
+
136
+ .content.home .banner {
137
+ padding: 3rem 0;
138
+ }
139
+
140
+ .content .banner .search {
141
+ position: relative;
142
+ bottom: -4.5rem;
143
+ width: 100%;
144
+ }
145
+
146
+ .content .banner .search form {
147
+ background-color: #fff;
148
+ border-radius: 30px;
149
+ box-shadow: 0 2px 10px rgb(170 135 75 / 15%);
150
+ width: 74%;
151
+ margin: auto 13%;
152
+ position: relative;
153
+ display: flex;
154
+ }
155
+
156
+ .content .banner .search #search_value {
157
+ width: 100%;
158
+ border: none;
159
+ background-color: transparent;
160
+ padding: 1rem 2rem;
161
+ font-size: 1rem;
162
+ box-sizing: border-box;
163
+ outline: 0;
164
+ }
165
+
166
+ .content .banner .search .submit {
167
+ border: none;
168
+ background-color: transparent;
169
+ padding: 1rem 2rem;
170
+ font-size: 1rem;
171
+ box-sizing: border-box;
172
+ outline: 0;
173
+ }
174
+
175
+ @media screen and (max-width: 768px) {
176
+ .content .banner .search form {
177
+ width: 90%;
178
+ margin: auto 5%;
179
+ }
180
+ }
181
+
182
+ .content .category {
183
+ margin-top: 2em;
184
+ display: flex;
185
+ flex-wrap: wrap;
186
+ }
187
+
188
+ .content .category .category-item {
189
+ flex: 0 0 calc(25% - 1.5em);
190
+ max-width: calc(25% - 1.5em);
191
+ margin: 0;
192
+ margin-right: 2em;
193
+ margin-bottom: 2em;
194
+ }
195
+
196
+ .content .category .category-item:nth-child(4n + 4) {
197
+ margin-right: 0;
198
+ }
199
+
200
+ @media screen and (max-width: 768px) {
201
+ .content .category .category-item {
202
+ flex: 0 0 calc(33.3333333333333% - 0.66666666666666666em);
203
+ max-width: calc(33.3333333333333% - 0.66666666666666666em);
204
+ margin-right: 1em;
205
+ margin-bottom: 1em;
206
+
207
+ }
208
+ .content .category .category-item:nth-child(4n + 4) {
209
+ margin-right: 1em;
210
+ }
211
+ .content .category .category-item:nth-child(3n + 3) {
212
+ margin-right: 0;
213
+ }
214
+ }
215
+
216
+ .content .category .category-item .cover {
217
+ width: 100%;
218
+ padding-bottom: 144%;
219
+ position: relative;
220
+ overflow: hidden;
221
+ height: 0;
222
+ border-radius: 3px;
223
+ background-color: #f6f3ed;
224
+ background-size: cover;
225
+ border: 1px solid #f7f3ed;
226
+ text-align: center;
227
+ }
228
+
229
+ /* .content .category .category-item .cover h1 {
230
+ background-color: #f6f3ed;
231
+ margin: 2.5em 1.6em;
232
+ text-align: center;
233
+ font-size: .9em;
234
+ padding: .5em;
235
+ border: 2px solid #A1615A;
236
+ box-shadow: 0 0 0 5px #f6f3ed;
237
+ color: #000!important;
238
+ background-color: #f6f3ed;
239
+ box-shadow: 0 0 0 5px #f6f3ed;
240
+ } */
241
+
242
+ .content .category .category-item .cover .custom-h1 {
243
+ margin-top: 30px;
244
+ background-color: #f6f3ed;
245
+ text-align: center;
246
+ font-size: 16px;
247
+ padding: .5em;
248
+ box-shadow: 0 0 0 5px #f6f3ed;
249
+ color: #000!important;
250
+ background-color: #f6f3ed;
251
+ box-shadow: 0 0 0 5px #f6f3ed;
252
+ }
253
+
254
+ .custom-desc {
255
+ font-size: 12px;
256
+ color: #3f4c54;
257
+ }
258
+
259
+ .content .category .category-item .cover.red {
260
+ background-image: url(../image/p0452_m.jpg);
261
+ }
262
+
263
+ .content .category .category-item .cover.red h1 {
264
+ border: 2px solid #A1615A;
265
+ }
266
+
267
+ .content .category .category-item .cover.purple {
268
+ background-image: url(../image/p0459_m.jpg);
269
+ }
270
+
271
+ .content .category .category-item .cover.purple h1 {
272
+ border: 2px solid #a2839c;
273
+ }
274
+
275
+ .content .category .category-item .cover.gray {
276
+ background-image: url(../image/p0402_m.jpg);
277
+ }
278
+
279
+ .content .category .category-item .cover.gray h1 {
280
+ border: 2px solid #989399;
281
+ }
282
+
283
+ .content .category .category-item .cover.blue {
284
+ background-image: url(../image/p0438_m.jpg);
285
+ }
286
+
287
+ .content .category .category-item .cover.blue h1 {
288
+ border: 2px solid #424f60;
289
+ }
290
+
291
+ .content .category .category-item .cover.green {
292
+ background-image: url(../image/p0440_m.jpg);
293
+ }
294
+
295
+ .content .category .category-item .cover.green h1 {
296
+ border: 2px solid #3f4c54;
297
+ }
298
+
299
+ .content .category .category-item .cover img {
300
+ /* display: block; */
301
+ /* position: absolute; */
302
+ left: 0;
303
+ top: 0;
304
+ object-fit: cover;
305
+ border: none;
306
+ /* width: 100%; */
307
+ /* height: 100%; */
308
+ }
309
+
310
+ .content .category .category-item .title {
311
+ margin-top: 5px;
312
+ line-height: 1em;
313
+ font-family: Noto Serif SC;
314
+ text-align: center;
315
+ }
316
+
317
+ .content .post {
318
+ font-family: Noto Serif SC;
319
+ padding: 3em 0;
320
+ }
321
+
322
+ .content .post .date {
323
+ text-align: right;
324
+ }
325
+
326
+ .content .info {
327
+ width: 100%;
328
+ text-align: center;
329
+ padding-top: 1rem;
330
+ }
331
+
332
+ .content .post-nav {
333
+ width: 100%;
334
+ display: flex;
335
+ justify-content: space-between;
336
+ flex-flow: row-reverse
337
+ }
338
+
339
+ .content .post-nav span {
340
+ display: block;
341
+ color: #bfbfbf;
342
+ }
343
+
344
+ .content .post-nav > * {
345
+ width: 50%;
346
+ }
347
+
348
+ .content .post-nav .new {
349
+ text-align: right;
350
+ }
351
+
352
+ .content .other {
353
+ background-color: #f4f4f4;
354
+ padding: 3em 0;
355
+ }
356
+
357
+ .content .catalogue {
358
+ list-style: none;
359
+ padding-left: 0;
360
+ margin: 3em 0;
361
+ }
362
+
363
+ .content .catalogue li {
364
+ line-height: 1em;
365
+ margin: 2em 0;
366
+ }
367
+
368
+ .content .catalogue li a {
369
+ display: flex;
370
+ justify-content: space-between;
371
+ flex-direction: row;
372
+ position: relative;
373
+ }
374
+
375
+ .content .catalogue .title {
376
+ background: #fff;
377
+ z-index: 1;
378
+ margin-right: 5em;
379
+ padding-right: 1em;
380
+ }
381
+
382
+ .content .catalogue .date {
383
+ width: 100%;
384
+ text-align: right;
385
+ position: absolute;
386
+ right: 0;
387
+ }
388
+
389
+ .content .catalogue .date:before {
390
+ content: " ";
391
+ width: 100%;
392
+ border-bottom: 1px dashed #000;
393
+ position: absolute;
394
+ top: 50%;
395
+ right: 0;
396
+ }
397
+
398
+ .content .catalogue .date span {
399
+ background: #fff;
400
+ z-index: 1;
401
+ padding-left: 1em;
402
+ position: relative;
403
+ }
404
+
405
+ .content .catalogue .hidden {
406
+ display: none;
407
+ }
408
+
409
+ .content .catalogue .display {
410
+ display: block;
411
+ }
412
+
413
+ .content .archive .display-btn {
414
+ cursor: pointer;
415
+ }
416
+
417
+ .content .tag-unordered {
418
+ word-break: break-word;
419
+ }
420
+
421
+ .content .tag-unordered .list-count::before {
422
+ content: "("
423
+ }
424
+
425
+ .content .tag-unordered .list-count::after {
426
+ content: ")"
427
+ }
428
+
429
+
430
+ .comment {
431
+ padding: 3em 1em;
432
+ }
433
+
434
+ .comment .utterances {
435
+ max-width: 100%;
436
+ }
437
+
438
+ .footer {
439
+ background-color: #f7f3ed;
440
+ border-top: 2px solid #eee;
441
+ }
442
+
443
+ .footer a {
444
+ color: #aa874b;
445
+ }
446
+
447
+ .footer-content {
448
+ height: 6em;
449
+ margin: auto;
450
+ display: -webkit-box;
451
+ display: -ms-flexbox;
452
+ display: flex;
453
+ flex-direction: row;
454
+ align-items: center;
455
+ justify-content: space-between;
456
+ flex-wrap: wrap;
457
+ }
458
+
459
+ .footer-left {
460
+ font-size: 2.2rem;
461
+ }
462
+
463
+ .footer-right {
464
+ font-size: 1.1rem;
465
+ text-align: right;
466
+ max-width: calc(100% - 14em);
467
+ }
468
+
469
+ .footer-links a {
470
+ margin-left: .5em;
471
+ }
472
+
473
+ article p {
474
+ line-height: 1.5em;
475
+ }
476
+
477
+ article a {
478
+ color: #aa874b;
479
+ word-break: break-all;
480
+ }
481
+
482
+ article > table {
483
+ margin: 1em 0;
484
+ padding: 0;
485
+ border-collapse: collapse;
486
+ }
487
+
488
+ article > table tr {
489
+ border-top: 1px solid #dfe2e5;
490
+ margin: 0;
491
+ padding: 0;
492
+ }
493
+
494
+ article > table tr:nth-child(2n), article > thead {
495
+ background-color: #f8f8f8;
496
+ }
497
+
498
+ article > table tr th {
499
+ font-weight: bold;
500
+ border: 1px solid #dfe2e5;
501
+ border-bottom: 0;
502
+ margin: 0;
503
+ padding: 6px 16px;
504
+ }
505
+
506
+ article > table tr td {
507
+ border: 1px solid #dfe2e5;
508
+ margin: 0;
509
+ padding: 6px 16px;
510
+ }
511
+
512
+ article > table tr th:first-child, article > table tr td:first-child {
513
+ margin-top: 0;
514
+ }
515
+
516
+ article > table tr th:last-child, article > table tr td:last-child {
517
+ margin-bottom: 0;
518
+ }
519
+
520
+ article blockquote {
521
+ margin: 0;
522
+ }
523
+
524
+ article > blockquote {
525
+ margin-left: -1em;
526
+ border-left: 4px solid #aa874b;
527
+ padding-left: calc(1em - 4px);
528
+ font-style: italic;
529
+ color: #777;
530
+ }
531
+
532
+ .highlight {
533
+ padding: 0 0.5em;
534
+ /* background: #fdf6e3; */
535
+ color: #657b83;
536
+ margin: 0;
537
+ border-radius: 3px;
538
+ width: 100%;
539
+ line-height: 20px;
540
+ }
541
+
542
+ article code {
543
+ background-color: #fafafa;
544
+ /* color: #aa874b; */
545
+ padding: 10px 7px;
546
+ line-height: 20px;
547
+ border-radius: 3px;
548
+ margin: auto .2em;
549
+ display: block;
550
+ overflow-wrap: break-word;
551
+ word-wrap:break-word !important;
552
+ word-break:normal;
553
+ white-space: pre-wrap;
554
+ }
555
+
556
+ pre {
557
+ width: 100%;
558
+ overflow-wrap: break-word;
559
+ word-wrap:break-word !important;
560
+ word-break:normal;
561
+ white-space: pre-wrap;
562
+ }
563
+
564
+ article pre,
565
+ article pre code {
566
+ margin: 0;
567
+ }
568
+
569
+ article ul {
570
+ list-style: square;
571
+ }
572
+
573
+ article a:hover {
574
+ text-decoration: underline;
575
+ }
576
+
577
+ article del,
578
+ article s {
579
+ color: #888;
580
+ }
581
+
582
+ article img {
583
+ text-align: center;
584
+ max-width: 100%;
585
+ zoom: 50% !important;
586
+ border-radius: 15px;
587
+ }
588
+
589
+ article h1 {
590
+ font-size: 2em;
591
+ }
592
+
593
+ article .catalogue {
594
+ margin: auto!important;
595
+ }
596
+
597
+ .count {
598
+ width: 100%;
599
+ /* color: white; */
600
+ font-size: 13px;
601
+ position: absolute;
602
+ bottom: 15px;
603
+ text-align: center;
604
+ }
605
+
606
+ h2 {
607
+ margin-top: 40px !important;
608
+ }
609
+
610
+ h3 {
611
+ margin-top: 30px !important;
612
+ }
613
+
614
+ hr {
615
+ height: 1px; /* 设置水平线的高度 */
616
+ width: 100%; /* 设置水平线的宽度 */
617
+ color: #f4f4f4; /* 设置水平线的颜色 */
618
+ background-color: #f4f4f4; /* 设置水平线的背景颜色 */
619
+ border: none; /* 去除水平线的边框 */
620
+ margin: 20px auto; /* 设置水平线的外边距,使其居中显示 */
621
+ }
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,24 @@
1
+ function search() {
2
+ window.open(
3
+ document.getElementById("search_form").getAttribute("action_e") +
4
+ " " +
5
+ document.getElementById("search_value").value
6
+ );
7
+ return false;
8
+ }
9
+
10
+ let display = false;
11
+ function displayAll() {
12
+ let elements = document.querySelectorAll(".catalogue .hidden");
13
+ if (!display) {
14
+ for (let elem of elements) {
15
+ elem.style.display = "block";
16
+ display = true;
17
+ }
18
+ } else {
19
+ for (let elem of elements) {
20
+ elem.style.display = "none";
21
+ display = false;
22
+ }
23
+ }
24
+ }