hexo-theme-clarity 1.5.0 → 1.6.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.
- package/_config.yml +2 -1
- package/layout/_partial/comment_scripts.pug +2 -2
- package/layout/_partial/head.pug +1 -1
- package/layout/category.pug +3 -3
- package/layout/flink.pug +38 -0
- package/layout/page.pug +5 -4
- package/layout/tag.pug +3 -3
- package/package.json +1 -1
- package/source/css/style.scss +185 -5
package/_config.yml
CHANGED
|
@@ -134,12 +134,13 @@ icp: ## China mainland only, show icp info on the bottom.
|
|
|
134
134
|
bei: ## China mainland only, show bei info on the bottom.
|
|
135
135
|
|
|
136
136
|
# The CDN provider for third-party scripts
|
|
137
|
-
cdn_type: unpkg ## Options: jsdelivr/fastly/unpkg/
|
|
137
|
+
cdn_type: unpkg ## Options: custom/jsdelivr/fastly/unpkg/jsdmirror
|
|
138
138
|
cdn_custom_url: ## When cdn_type is 'custom', this is a required field. e.g. https://cdn1.yourdomain.com
|
|
139
139
|
cdn_providers: ## List of public CDN providers
|
|
140
140
|
unpkg: https://unpkg.com
|
|
141
141
|
jsdelivr: https://cdn.jsdelivr.net/npm
|
|
142
142
|
fastly: https://fastly.jsdelivr.net/npm
|
|
143
|
+
jsdmirror: https://cdn.jsdmirror.com/npm
|
|
143
144
|
|
|
144
145
|
# Site background image link
|
|
145
146
|
site_bg_img:
|
|
@@ -59,7 +59,7 @@ if theme.minivaline.enable == true
|
|
|
59
59
|
|
|
60
60
|
if theme.waline.enable == true
|
|
61
61
|
script(type='module').
|
|
62
|
-
import {init} from '#{cdn_url}/@waline/client@3.
|
|
62
|
+
import {init} from '#{cdn_url}/@waline/client@3.13.0/dist/waline.js';
|
|
63
63
|
init({
|
|
64
64
|
el: '#waline_box',
|
|
65
65
|
serverURL: '#{theme.waline.serverURL}',
|
|
@@ -78,7 +78,7 @@ if theme.waline.enable == true
|
|
|
78
78
|
});
|
|
79
79
|
|
|
80
80
|
if theme.twikoo.enable == true
|
|
81
|
-
script(src= cdn_url + '/twikoo@1.6.
|
|
81
|
+
script(src= cdn_url + '/twikoo@1.6.45/dist/twikoo.all.min.js')
|
|
82
82
|
script.
|
|
83
83
|
twikoo.init({
|
|
84
84
|
el: '#twikoo_box',
|
package/layout/_partial/head.pug
CHANGED
|
@@ -47,7 +47,7 @@ head
|
|
|
47
47
|
if theme.gitalk.enable == true
|
|
48
48
|
link(rel='stylesheet', href= cdn_url + '/gitalk@1.8.0/dist/gitalk.css')
|
|
49
49
|
if theme.waline.enable == true
|
|
50
|
-
link(rel='stylesheet', href= cdn_url + '/@waline/client@3.
|
|
50
|
+
link(rel='stylesheet', href= cdn_url + '/@waline/client@3.13.0/dist/waline.css')
|
|
51
51
|
if theme.artalk.enable == true
|
|
52
52
|
link(rel='stylesheet', href= cdn_url + '/artalk@2.9.1/dist/Artalk.css')
|
|
53
53
|
|
package/layout/category.pug
CHANGED
package/layout/flink.pug
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
extends base
|
|
2
|
+
|
|
3
|
+
block title
|
|
4
|
+
title= page.title + ' | ' + config.title
|
|
5
|
+
|
|
6
|
+
block content
|
|
7
|
+
.page.flink-container
|
|
8
|
+
- let title_style = {'text-align': page.title_align || undefined}
|
|
9
|
+
h1.page-title(style=title_style)= page.title
|
|
10
|
+
.page-content
|
|
11
|
+
if site.data.flinks
|
|
12
|
+
each link in site.data.flinks
|
|
13
|
+
- let className = link.link_title ? markdown(`### ${link.link_title}`) : ""
|
|
14
|
+
- let classDesc = link.link_desc ? `<div class="flink-desc">${link.link_desc}</div>` : ""
|
|
15
|
+
- let listResult = ""
|
|
16
|
+
.flink
|
|
17
|
+
h3.flink-title= link.link_title
|
|
18
|
+
if link.link_desc
|
|
19
|
+
.flink-desc= link.link_desc
|
|
20
|
+
.flink-list
|
|
21
|
+
each item in link.link_list
|
|
22
|
+
.link-item
|
|
23
|
+
a(href=item.link, title=item.name, target="_blank")
|
|
24
|
+
img.link-item-avatar(src=item.avatar, alt=item.name)
|
|
25
|
+
span.link-item-main
|
|
26
|
+
span.link-item-title.text-cut= item.name
|
|
27
|
+
span.link-item-desc(title=item.desc)= item.desc
|
|
28
|
+
|
|
29
|
+
!= page.content
|
|
30
|
+
|
|
31
|
+
if page.donate
|
|
32
|
+
include _widget/donate.pug
|
|
33
|
+
if page.comments
|
|
34
|
+
include _partial/comments.pug
|
|
35
|
+
|
|
36
|
+
block scripts
|
|
37
|
+
if page.comments
|
|
38
|
+
include _partial/comment_scripts.pug
|
package/layout/page.pug
CHANGED
|
@@ -4,9 +4,10 @@ block title
|
|
|
4
4
|
title= page.title + ' | ' + config.title
|
|
5
5
|
|
|
6
6
|
block content
|
|
7
|
-
.
|
|
8
|
-
|
|
9
|
-
.
|
|
7
|
+
.page
|
|
8
|
+
- let title_style = {'text-align': page.title_align || undefined}
|
|
9
|
+
h1.page-title(style=title_style)= page.title
|
|
10
|
+
.page-content
|
|
10
11
|
!= page.content
|
|
11
12
|
if page.donate
|
|
12
13
|
include _widget/donate.pug
|
|
@@ -15,4 +16,4 @@ block content
|
|
|
15
16
|
|
|
16
17
|
block scripts
|
|
17
18
|
if page.comments
|
|
18
|
-
include _partial/comment_scripts.pug
|
|
19
|
+
include _partial/comment_scripts.pug
|
package/layout/tag.pug
CHANGED
package/package.json
CHANGED
package/source/css/style.scss
CHANGED
|
@@ -8,6 +8,7 @@ specific font stacks to ensure the greatest OS/browser compatibility.
|
|
|
8
8
|
$primaryColor: #409eff;
|
|
9
9
|
$codeBgColor: #e1e8e9; // 新的代码块背景色
|
|
10
10
|
$hoverColor: #ff5722;
|
|
11
|
+
$linkColor: #404244; // 链接颜色
|
|
11
12
|
$linkHoverColor: #409eff; // 链接 Hover 颜色
|
|
12
13
|
|
|
13
14
|
$originCodeBgColor: #f7f8f8; // 原来的代码块背景色
|
|
@@ -91,6 +92,12 @@ div {
|
|
|
91
92
|
.mr-10 { margin-right: 10px; }
|
|
92
93
|
.ml-4 { margin-left: 4px; }
|
|
93
94
|
|
|
95
|
+
.text-cut {
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
white-space: nowrap;
|
|
98
|
+
text-overflow: ellipsis;
|
|
99
|
+
}
|
|
100
|
+
|
|
94
101
|
#header {
|
|
95
102
|
padding: 58px 0 0;
|
|
96
103
|
text-align: left;
|
|
@@ -345,8 +352,106 @@ div {
|
|
|
345
352
|
color: #888;
|
|
346
353
|
}
|
|
347
354
|
|
|
355
|
+
.page {
|
|
356
|
+
padding: 20px 0 15px;
|
|
357
|
+
}
|
|
358
|
+
.page-title {
|
|
359
|
+
margin-top: 0;
|
|
360
|
+
margin-bottom: 1.25rem;
|
|
361
|
+
color: #555;
|
|
362
|
+
// text-align: left;
|
|
363
|
+
font-size: 2rem;
|
|
364
|
+
line-height: 2;
|
|
365
|
+
}
|
|
366
|
+
.page-content {
|
|
367
|
+
clear: both;
|
|
368
|
+
line-height: 1.5;
|
|
369
|
+
// color: #444;
|
|
370
|
+
// padding-top: 15px;
|
|
371
|
+
// text-align: justify;
|
|
372
|
+
word-break: break-word;
|
|
373
|
+
|
|
374
|
+
h2 {
|
|
375
|
+
margin: 1.375em 0 1em;
|
|
376
|
+
border-bottom: 1px solid #eee;
|
|
377
|
+
overflow: hidden;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
h3 { margin: 1.375em 0 1em; }
|
|
381
|
+
|
|
382
|
+
a {
|
|
383
|
+
color: $primaryColor;
|
|
384
|
+
padding-bottom: 2px;
|
|
385
|
+
word-break: normal;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
// a:hover,
|
|
389
|
+
// a:active {
|
|
390
|
+
// text-decoration: underline;
|
|
391
|
+
// }
|
|
392
|
+
|
|
393
|
+
pre code { padding: 0 2em; }
|
|
394
|
+
|
|
395
|
+
p {
|
|
396
|
+
margin: 0 0 1.25em;
|
|
397
|
+
word-break: break-word;
|
|
398
|
+
overflow-wrap: break-word;
|
|
399
|
+
|
|
400
|
+
code {
|
|
401
|
+
padding: 3px 5px;
|
|
402
|
+
background-color: $codeBgColor;
|
|
403
|
+
font-family: Menlo, Consolas, monospace;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.caption {
|
|
408
|
+
color: #444;
|
|
409
|
+
display: block;
|
|
410
|
+
font-size: 0.9em;
|
|
411
|
+
margin-top: 0.1em;
|
|
412
|
+
position: relative;
|
|
413
|
+
text-align: center;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
hr {
|
|
417
|
+
margin: 2.4em auto;
|
|
418
|
+
border: none;
|
|
419
|
+
border-top: 1px solid #eee;
|
|
420
|
+
position: relative;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
img {
|
|
424
|
+
max-width: 100%;
|
|
425
|
+
margin: auto;
|
|
426
|
+
display: block;
|
|
427
|
+
box-sizing: border-box;
|
|
428
|
+
border: 4px solid #ccc;
|
|
429
|
+
border-radius: 1em;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
img.border-none {
|
|
433
|
+
border: none;
|
|
434
|
+
border-radius: 0;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
ul,
|
|
438
|
+
ol {
|
|
439
|
+
border-radius: 3px;
|
|
440
|
+
margin: 1em 0;
|
|
441
|
+
|
|
442
|
+
ul { margin: 0; }
|
|
443
|
+
|
|
444
|
+
code {
|
|
445
|
+
padding: 3px 5px;
|
|
446
|
+
background: $codeBgColor;
|
|
447
|
+
font-family: Menlo, Consolas, monospace;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
|
|
348
453
|
.post {
|
|
349
|
-
padding:
|
|
454
|
+
padding: 20px 0 15px;
|
|
350
455
|
|
|
351
456
|
.post-title {
|
|
352
457
|
margin: 0;
|
|
@@ -453,13 +558,13 @@ div {
|
|
|
453
558
|
word-break: break-word;
|
|
454
559
|
|
|
455
560
|
h2 {
|
|
456
|
-
margin: 1.
|
|
561
|
+
margin: 1.375em 0 1em;
|
|
457
562
|
border-bottom: 1px solid #eee;
|
|
458
563
|
overflow: hidden;
|
|
459
564
|
}
|
|
460
565
|
|
|
461
566
|
h3 {
|
|
462
|
-
margin: 1.
|
|
567
|
+
margin: 1.375em 0 1em;
|
|
463
568
|
}
|
|
464
569
|
|
|
465
570
|
a {
|
|
@@ -478,7 +583,7 @@ div {
|
|
|
478
583
|
}
|
|
479
584
|
|
|
480
585
|
p {
|
|
481
|
-
margin: 0 0 1.
|
|
586
|
+
margin: 0 0 1.5em;
|
|
482
587
|
word-break: break-word;
|
|
483
588
|
overflow-wrap: break-word;
|
|
484
589
|
|
|
@@ -619,6 +724,77 @@ div {
|
|
|
619
724
|
}
|
|
620
725
|
}
|
|
621
726
|
|
|
727
|
+
.flink {
|
|
728
|
+
margin-bottom: 1.25rem;
|
|
729
|
+
}
|
|
730
|
+
.flink-list {
|
|
731
|
+
box-sizing: border-box;
|
|
732
|
+
|
|
733
|
+
&::after {
|
|
734
|
+
content: " ";
|
|
735
|
+
display: table;
|
|
736
|
+
clear: both;
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
.link-item {
|
|
740
|
+
float: left;
|
|
741
|
+
margin: 6px 6px;
|
|
742
|
+
width: calc(33% - 12px);
|
|
743
|
+
min-width: 200px;
|
|
744
|
+
border: 1px solid #e3e8f7;
|
|
745
|
+
border-radius: 6px;
|
|
746
|
+
background-color: #fff;
|
|
747
|
+
|
|
748
|
+
a {
|
|
749
|
+
display: flex;
|
|
750
|
+
color: $linkColor;
|
|
751
|
+
|
|
752
|
+
&:hover {
|
|
753
|
+
.link-item-title {
|
|
754
|
+
color: $linkHoverColor;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
.link-item-avatar {
|
|
760
|
+
margin: 15px 10px;
|
|
761
|
+
width: 60px;
|
|
762
|
+
height: 60px;
|
|
763
|
+
object-fit: cover;
|
|
764
|
+
border: 1px solid #eee;
|
|
765
|
+
border-radius: 6px;
|
|
766
|
+
box-sizing: border-box;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
.link-item-main {
|
|
770
|
+
margin: 15px 10px 15px 0;
|
|
771
|
+
display: flex;
|
|
772
|
+
flex-direction: column; // 垂直排列
|
|
773
|
+
justify-content: space-around;
|
|
774
|
+
width: calc(100% - 90px); // 约束内容不超出范围
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
.link-item-title {
|
|
778
|
+
font-size: 1.2em;
|
|
779
|
+
font-weight: bold;
|
|
780
|
+
line-height: 1.2;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
.link-item-desc {
|
|
784
|
+
margin-top: 10px;
|
|
785
|
+
font-size: 0.875em;
|
|
786
|
+
line-height: 1.1;
|
|
787
|
+
overflow: hidden;
|
|
788
|
+
white-space: nowrap;
|
|
789
|
+
text-overflow: ellipsis;
|
|
790
|
+
// border: 1px solid #222;
|
|
791
|
+
|
|
792
|
+
// display: -webkit-box;
|
|
793
|
+
// -webkit-line-clamp: 2;
|
|
794
|
+
// -webkit-box-orient: vertical;
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
|
|
622
798
|
.large {
|
|
623
799
|
.wl-content .vemoji, .wl-content .wl-emoji {
|
|
624
800
|
height: 4em;
|
|
@@ -769,6 +945,10 @@ screen and (max-width: 48em) {
|
|
|
769
945
|
|
|
770
946
|
@media print,
|
|
771
947
|
screen and (max-width: 35.5em) {
|
|
948
|
+
html {
|
|
949
|
+
font-size: 14px;
|
|
950
|
+
}
|
|
951
|
+
|
|
772
952
|
.body_container {
|
|
773
953
|
padding: 0 20px;
|
|
774
954
|
}
|
|
@@ -2586,4 +2766,4 @@ html[data-dark='true'] {
|
|
|
2586
2766
|
|
|
2587
2767
|
.article-tag-list {
|
|
2588
2768
|
padding-left: 0rem;
|
|
2589
|
-
}
|
|
2769
|
+
}
|