hexo-theme-stellar 1.22.0 → 1.23.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 +18 -10
- package/_data/widgets.yml +3 -0
- package/languages/en.yml +1 -0
- package/languages/zh-CN.yml +1 -0
- package/languages/zh-TW.yml +1 -0
- package/layout/_partial/head.ejs +29 -19
- package/layout/_partial/main/footer.ejs +1 -1
- package/layout/_partial/main/navbar/author_banner.ejs +31 -0
- package/layout/_partial/main/navbar/breadcrumb.ejs +20 -4
- package/layout/_partial/main/post_list/post_card.ejs +13 -1
- package/layout/_partial/plugins/comments/giscus/script.ejs +0 -1
- package/layout/_partial/plugins/parser/head.ejs +3 -0
- package/layout/_partial/plugins/parser/katex/head.ejs +3 -0
- package/layout/_partial/plugins/parser/katex/script.ejs +4 -0
- package/layout/_partial/plugins/parser/mathjax/script.ejs +20 -0
- package/layout/_partial/plugins/parser/mermaid/script.ejs +29 -0
- package/layout/_partial/plugins/parser/script.ejs +9 -0
- package/layout/_partial/scripts/index.ejs +19 -5
- package/layout/_partial/sidebar/index.ejs +1 -1
- package/layout/_partial/widgets/toc.ejs +1 -1
- package/layout/archive.ejs +54 -37
- package/layout/page.ejs +1 -4
- package/layout/post.ejs +1 -7
- package/layout/wiki.ejs +1 -4
- package/package.json +1 -1
- package/scripts/events/index.js +2 -0
- package/scripts/events/lib/authors.js +21 -0
- package/scripts/events/lib/doc_tree.js +1 -2
- package/scripts/events/lib/links.js +17 -0
- package/scripts/filters/index.js +0 -13
- package/scripts/generators/author.js +22 -0
- package/scripts/tags/index.js +2 -0
- package/scripts/tags/lib/albums.js +47 -0
- package/scripts/tags/lib/copy.js +11 -13
- package/scripts/tags/lib/friends.js +13 -24
- package/scripts/tags/lib/gallery.js +6 -5
- package/scripts/tags/lib/posters.js +47 -0
- package/scripts/tags/lib/sites.js +15 -24
- package/scripts/tags/lib/swiper.js +1 -1
- package/source/css/_common/toast.styl +25 -5
- package/source/css/_custom.styl +2 -1
- package/source/css/_defines/func.styl +11 -0
- package/source/css/_defines/theme.styl +2 -2
- package/source/css/_layout/list.styl +6 -2
- package/source/css/_layout/main.styl +4 -0
- package/source/css/_layout/pages/archives.styl +7 -3
- package/source/css/_layout/partial/bread-nav.styl +3 -5
- package/source/css/_layout/partial/navbar.styl +5 -5
- package/source/css/_layout/tag-plugins/banner.styl +22 -8
- package/source/css/_layout/tag-plugins/copy.styl +16 -13
- package/source/css/_layout/tag-plugins/friends.styl +7 -37
- package/source/css/_layout/tag-plugins/gallery.styl +32 -15
- package/source/css/_layout/tag-plugins/grid.styl +1 -4
- package/source/css/_layout/tag-plugins/link.styl +1 -4
- package/source/css/_layout/tag-plugins/sites.styl +11 -39
- package/source/css/_layout/tag-plugins/tabs.styl +2 -0
- package/source/css/_layout/widgets/ghrepo.styl +1 -4
- package/source/css/_layout/widgets/toc_common.styl +22 -8
- package/source/css/_plugins/copycode.styl +2 -1
- package/source/css/_plugins/fancybox.styl +1 -4
- package/source/css/_plugins/index.styl +1 -1
- package/source/css/_plugins/lazyload.styl +4 -4
- package/source/js/main.js +6 -8
- package/source/js/plugins/copycode.js +1 -1
- package/source/js/plugins/friends.js +11 -11
- package/source/js/plugins/sites.js +13 -14
- package/_data/links.yml +0 -7
- package/layout/mathjax.ejs +0 -29
- package/layout/mermaid.ejs +0 -32
|
@@ -2,17 +2,21 @@
|
|
|
2
2
|
display: flex
|
|
3
3
|
justify-content: space-between
|
|
4
4
|
box-sizing: border-box
|
|
5
|
-
background: var(--
|
|
5
|
+
background: var(--card)
|
|
6
6
|
border-radius: $border-bar
|
|
7
7
|
border: 1px solid var(--block-border)
|
|
8
8
|
overflow: hidden
|
|
9
|
-
width:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
width: 100%
|
|
10
|
+
span
|
|
11
|
+
line-height: 3
|
|
12
|
+
padding: 0 1rem
|
|
13
|
+
background: var(--block)
|
|
14
|
+
border-right: 1px solid var(--block-border)
|
|
15
|
+
color: var(--text-p3)
|
|
16
|
+
font-family: $ff-code
|
|
17
|
+
font-size: $fs-12
|
|
18
|
+
font-weight: 700
|
|
19
|
+
flex-shrink: 0
|
|
16
20
|
input.copy-area
|
|
17
21
|
display: inline-block
|
|
18
22
|
padding: 0
|
|
@@ -21,14 +25,13 @@
|
|
|
21
25
|
line-height: 3
|
|
22
26
|
text-indent: 1rem
|
|
23
27
|
button.copy-btn
|
|
24
|
-
margin:
|
|
25
|
-
|
|
26
|
-
border-left: 1px solid var(--block-border)
|
|
28
|
+
margin: 2px
|
|
29
|
+
border-radius: 'calc(%s - 2px)' % $border-bar
|
|
27
30
|
display: inline-block
|
|
28
|
-
background:
|
|
31
|
+
background: none
|
|
29
32
|
line-height: 0
|
|
30
33
|
font-size: 1rem
|
|
31
34
|
padding: 0 .75rem
|
|
32
35
|
color: var(--text-p2)
|
|
33
36
|
&:hover
|
|
34
|
-
background: var(--
|
|
37
|
+
background: var(--block-hover)
|
|
@@ -1,42 +1,9 @@
|
|
|
1
|
-
.users-wrap
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
margin: 0 0 1rem
|
|
5
|
-
p
|
|
6
|
-
margin: 0
|
|
7
|
-
font-size: $fs-14
|
|
8
|
-
&:first-child
|
|
9
|
-
font-size: 1.25rem
|
|
10
|
-
font-weight: 500
|
|
11
|
-
.group-body
|
|
12
|
-
width: 100%
|
|
13
|
-
display: flex
|
|
14
|
-
flex-wrap: wrap
|
|
15
|
-
align-items: stretch
|
|
16
|
-
&+.group-header
|
|
17
|
-
margin-top: 2rem
|
|
18
|
-
.stellar-friends-api
|
|
19
|
-
display: block
|
|
20
|
-
|
|
1
|
+
.users-wrap .grid-box
|
|
2
|
+
display: grid
|
|
3
|
+
grid-template-columns: repeat(auto-fill, minmax(80px, 1fr))
|
|
21
4
|
|
|
22
5
|
.users-wrap .user-card
|
|
23
|
-
flex-shrink: 1
|
|
24
|
-
display: flex
|
|
25
|
-
align-items: stretch
|
|
26
|
-
width: 12.5%
|
|
27
|
-
@media screen and (max-width: 980px)
|
|
28
|
-
width: 14.28%
|
|
29
|
-
@media screen and (max-width: 900px)
|
|
30
|
-
width: 16.66%
|
|
31
|
-
@media screen and (max-width: 820px)
|
|
32
|
-
width: 20%
|
|
33
|
-
@media screen and (max-width: $device-mobile-max)
|
|
34
|
-
width: 16.66%
|
|
35
|
-
@media screen and (max-width: $device-mobile)
|
|
36
|
-
width: 25%
|
|
37
6
|
.card-link
|
|
38
|
-
margin: 0
|
|
39
|
-
width: 100%
|
|
40
7
|
color: var(--text-p1)
|
|
41
8
|
font-size: 10px
|
|
42
9
|
font-weight: 500
|
|
@@ -50,6 +17,9 @@
|
|
|
50
17
|
overflow: hidden
|
|
51
18
|
position: relative
|
|
52
19
|
padding: 1rem 0.5rem
|
|
20
|
+
.name
|
|
21
|
+
max-width: 100%
|
|
22
|
+
txt-ellipsis()
|
|
53
23
|
img
|
|
54
24
|
object-fit: cover
|
|
55
25
|
display: block
|
|
@@ -62,7 +32,7 @@
|
|
|
62
32
|
// transform
|
|
63
33
|
.users-wrap .user-card .card-link
|
|
64
34
|
>img
|
|
65
|
-
|
|
35
|
+
floatable-trans()
|
|
66
36
|
&:hover
|
|
67
37
|
background: var(--block-hover)
|
|
68
38
|
img
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.tag-plugin.gallery
|
|
2
|
-
.cell
|
|
2
|
+
.grid-cell,.flow-cell
|
|
3
3
|
display: block
|
|
4
4
|
overflow hidden
|
|
5
5
|
z-index 0
|
|
@@ -30,66 +30,83 @@
|
|
|
30
30
|
display: block
|
|
31
31
|
font-size: $fs-13
|
|
32
32
|
color: transparent
|
|
33
|
+
pointer-events: none
|
|
33
34
|
line-height: 1.2
|
|
34
35
|
margin: 0.5rem
|
|
35
36
|
trans1(color)
|
|
37
|
+
text-align: left
|
|
36
38
|
&:empty
|
|
37
39
|
display: none
|
|
38
40
|
|
|
39
|
-
.tag-plugin.gallery
|
|
40
|
-
|
|
41
|
+
.tag-plugin.gallery .grid-cell
|
|
42
|
+
>img
|
|
43
|
+
trans1(transform, 0.5s)
|
|
41
44
|
&:hover
|
|
42
|
-
img
|
|
45
|
+
>img
|
|
43
46
|
transform: scale(1.1)
|
|
44
47
|
|
|
45
48
|
|
|
46
49
|
// 网格布局
|
|
47
|
-
.tag-plugin.gallery
|
|
50
|
+
.tag-plugin.gallery.grid-box
|
|
48
51
|
display: grid
|
|
52
|
+
&[size='xs']
|
|
53
|
+
grid-template-columns: repeat(auto-fill, minmax(80px, 1fr))
|
|
54
|
+
grid-gap: 2px
|
|
55
|
+
.grid-cell,img
|
|
56
|
+
border-radius: 2px
|
|
57
|
+
.image-caption
|
|
58
|
+
font-size: $fs-12
|
|
49
59
|
&[size='s']
|
|
50
60
|
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr))
|
|
51
61
|
grid-gap: 2px
|
|
52
|
-
.cell,img
|
|
62
|
+
.grid-cell,img
|
|
53
63
|
border-radius: 2px
|
|
54
64
|
&[size='m']
|
|
55
65
|
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr))
|
|
56
66
|
grid-gap: 4px
|
|
57
|
-
.cell,img
|
|
67
|
+
.grid-cell,img
|
|
58
68
|
border-radius: 4px
|
|
59
69
|
&[size='l']
|
|
60
70
|
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr))
|
|
61
71
|
grid-gap: 8px
|
|
62
|
-
.cell,img
|
|
72
|
+
.grid-cell,img
|
|
63
73
|
border-radius: 8px
|
|
64
74
|
&[size='xl'] // 2列
|
|
65
75
|
grid-template-columns: repeat(2, 1fr)
|
|
66
76
|
grid-gap: 16px
|
|
67
|
-
.cell,img
|
|
77
|
+
.grid-cell,img
|
|
68
78
|
border-radius: 16px
|
|
69
79
|
&[size='mix'] // 1张大图+2张小图
|
|
70
80
|
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr))
|
|
71
81
|
grid-gap: 4px
|
|
72
|
-
.cell,img
|
|
82
|
+
.grid-cell,img
|
|
73
83
|
border-radius: 4px
|
|
74
|
-
.cell
|
|
84
|
+
.grid-cell
|
|
75
85
|
&:nth-child(3n+1)
|
|
76
86
|
grid-column: auto / span 2
|
|
77
87
|
grid-row: auto / span 2
|
|
78
88
|
&[ratio='square']
|
|
79
|
-
.cell
|
|
89
|
+
.grid-cell
|
|
80
90
|
aspect-ratio: 1
|
|
81
|
-
|
|
91
|
+
&[ratio='portrait']
|
|
92
|
+
.grid-cell
|
|
93
|
+
aspect-ratio: 2 / 3
|
|
94
|
+
.grid-cell
|
|
82
95
|
background: var(--block)
|
|
83
96
|
img
|
|
84
97
|
width: 100%
|
|
85
98
|
height: 100%
|
|
99
|
+
|
|
86
100
|
// 瀑布流布局
|
|
87
|
-
.tag-plugin.gallery
|
|
101
|
+
.tag-plugin.gallery.flow-box
|
|
88
102
|
column-count: 3
|
|
89
103
|
column-gap: 8px
|
|
90
|
-
.cell
|
|
104
|
+
.flow-cell
|
|
91
105
|
border-radius: 8px
|
|
92
106
|
padding-bottom: 8px
|
|
107
|
+
img
|
|
108
|
+
width: 100%
|
|
109
|
+
height: 100%
|
|
93
110
|
.image-meta
|
|
94
111
|
border-radius: 8px
|
|
95
112
|
margin-bottom: 8px
|
|
@@ -13,10 +13,7 @@
|
|
|
13
13
|
max-width: 100%
|
|
14
14
|
box-shadow: $boxshadow-card
|
|
15
15
|
border-radius: $border-bar
|
|
16
|
-
|
|
17
|
-
&:hover
|
|
18
|
-
box-shadow: $boxshadow-card-float
|
|
19
|
-
transform: translateY(-1px)
|
|
16
|
+
hover-float()
|
|
20
17
|
|
|
21
18
|
.md-text .link-card.plain
|
|
22
19
|
flex-direction: row
|
|
@@ -1,46 +1,19 @@
|
|
|
1
|
-
.sites-wrap
|
|
2
|
-
.group-header
|
|
3
|
-
margin: 1rem 0
|
|
4
|
-
p
|
|
5
|
-
margin: 0
|
|
6
|
-
font-size: $fs-14
|
|
7
|
-
&:first-child
|
|
8
|
-
font-size: 1.25rem
|
|
9
|
-
font-weight: 500
|
|
10
|
-
.group-body
|
|
11
|
-
width: 100%
|
|
12
|
-
&+.group-header
|
|
13
|
-
margin-top: 2rem
|
|
14
|
-
.stellar-sites-api
|
|
15
|
-
display: block
|
|
16
|
-
|
|
17
|
-
.sites-wrap .group-body
|
|
1
|
+
.sites-wrap .grid-box
|
|
18
2
|
display: grid
|
|
3
|
+
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr))
|
|
19
4
|
grid-gap: 1rem 1rem
|
|
20
|
-
grid-
|
|
21
|
-
|
|
22
|
-
grid-template-columns: repeat(auto-fill, "calc((100% - 2 * %s) / 3)" % 1rem)
|
|
23
|
-
@media screen and (max-width: 900px)
|
|
24
|
-
grid-template-columns: repeat(auto-fill, "calc((100% - 1 * %s) / 2)" % 1rem)
|
|
25
|
-
@media screen and (max-width: $device-mobile-max)
|
|
26
|
-
grid-template-columns: repeat(auto-fill, "calc((100% - 2 * %s) / 3)" % 1rem)
|
|
27
|
-
@media screen and (max-width: $device-mobile)
|
|
28
|
-
grid-template-columns: repeat(auto-fill, "calc((100% - 1 * %s) / 2)" % 1rem)
|
|
5
|
+
.grid-cell
|
|
6
|
+
aspect-ratio: 1.5
|
|
29
7
|
|
|
30
|
-
.sites-wrap .
|
|
8
|
+
.sites-wrap .site-card .card-link
|
|
31
9
|
width: 100%
|
|
32
10
|
display: flex
|
|
33
11
|
flex-direction: column
|
|
34
12
|
>img
|
|
35
|
-
width: 100%
|
|
36
|
-
height 100px
|
|
37
|
-
@media screen and (max-width: $device-laptop)
|
|
38
|
-
height: 120px
|
|
39
|
-
@media screen and (max-width: 900px)
|
|
40
|
-
height: 150px
|
|
41
|
-
@media screen and (max-width: $device-tablet)
|
|
42
|
-
height: 120px
|
|
43
13
|
object-fit: cover
|
|
14
|
+
aspect-ratio: 1.5
|
|
15
|
+
width: 100%
|
|
16
|
+
height: 100%
|
|
44
17
|
box-shadow: 0 1px 2px 0px rgba(0, 0, 0, 0.2)
|
|
45
18
|
.info
|
|
46
19
|
margin-top: 0.5rem
|
|
@@ -71,13 +44,12 @@
|
|
|
71
44
|
display: -webkit-box
|
|
72
45
|
-webkit-box-orient: vertical
|
|
73
46
|
overflow: hidden
|
|
74
|
-
-webkit-line-clamp:
|
|
47
|
+
-webkit-line-clamp: 1
|
|
75
48
|
|
|
76
49
|
// transform
|
|
77
50
|
.sites-wrap .site-card .card-link
|
|
78
51
|
>img
|
|
79
|
-
|
|
52
|
+
floatable-trans()
|
|
80
53
|
&:hover
|
|
81
54
|
>img
|
|
82
|
-
|
|
83
|
-
transform: translateY(-2px)
|
|
55
|
+
floatable-float()
|
|
@@ -6,14 +6,11 @@
|
|
|
6
6
|
background: var(--card)
|
|
7
7
|
border-radius: $border-block
|
|
8
8
|
box-shadow: $boxshadow-card
|
|
9
|
-
|
|
9
|
+
hover-float()
|
|
10
10
|
>div+div
|
|
11
11
|
margin-top: 0.5rem
|
|
12
12
|
span
|
|
13
13
|
color: var(--text-p2)
|
|
14
|
-
&:hover
|
|
15
|
-
box-shadow: $boxshadow-card-float
|
|
16
|
-
transform: translateY(-1px)
|
|
17
14
|
svg
|
|
18
15
|
margin-right: 4px
|
|
19
16
|
.flex-row
|
|
@@ -69,14 +69,28 @@
|
|
|
69
69
|
color: $color-theme !important
|
|
70
70
|
&:before
|
|
71
71
|
visibility: visible
|
|
72
|
+
|
|
73
|
+
// 始终折叠
|
|
74
|
+
.widget-wrapper.toc[collapse='true']
|
|
75
|
+
.toc-item a.toc-link+ol
|
|
76
|
+
display: none
|
|
77
|
+
// 激活上级目录时显示子目录
|
|
78
|
+
.toc a.toc-link.active+ol
|
|
79
|
+
display: block
|
|
72
80
|
|
|
81
|
+
// 自动折叠
|
|
82
|
+
.widget-wrapper.toc[collapse='auto']
|
|
83
|
+
.toc-item a.toc-link+ol
|
|
84
|
+
display: none
|
|
85
|
+
// 激活上级目录时显示子目录
|
|
86
|
+
.toc a.toc-link.active+ol
|
|
87
|
+
display: block
|
|
88
|
+
// 鼠标放上去时显示子目录
|
|
89
|
+
&:hover a.toc-link+ol
|
|
90
|
+
display: block
|
|
73
91
|
|
|
74
|
-
//
|
|
75
|
-
.toc-item a.
|
|
76
|
-
display: none
|
|
77
|
-
.toc a.toc-link.active+ol
|
|
78
|
-
display: block
|
|
79
|
-
ol:has(> .toc-item a.active)
|
|
80
|
-
display: block
|
|
81
|
-
.doc-tree:hover a.toc-link+ol
|
|
92
|
+
// 子目录激活时显示
|
|
93
|
+
.widget-wrapper.toc[collapse='true'] ol:has(> .toc-item a.active)
|
|
82
94
|
display: block
|
|
95
|
+
.widget-wrapper.toc[collapse='auto'] ol:has(> .toc-item a.active)
|
|
96
|
+
display: block
|
|
@@ -9,7 +9,7 @@ if hexo-config('plugins.scrollreveal.enable')
|
|
|
9
9
|
@import 'scrollreveal'
|
|
10
10
|
if hexo-config('plugins.fancybox.enable')
|
|
11
11
|
@import 'fancybox'
|
|
12
|
-
if hexo-config('plugins.mermaid.
|
|
12
|
+
if hexo-config('plugins.mermaid.style_optimization')
|
|
13
13
|
@import 'mermaid'
|
|
14
14
|
if hexo-config('plugins.copycode.enable')
|
|
15
15
|
@import 'copycode'
|
|
@@ -14,9 +14,9 @@ if hexo-config('plugins.lazyload.transition') == 'blur'
|
|
|
14
14
|
&.loaded,&.error
|
|
15
15
|
filter none
|
|
16
16
|
-webkit-filter none
|
|
17
|
-
.
|
|
17
|
+
.site-card .card-link>img
|
|
18
18
|
trans-site filter
|
|
19
|
-
.
|
|
19
|
+
.user-card .card-link>img
|
|
20
20
|
trans-user filter
|
|
21
21
|
else
|
|
22
22
|
img.lazy
|
|
@@ -25,7 +25,7 @@ else
|
|
|
25
25
|
opacity: 0
|
|
26
26
|
&.loaded,&.error
|
|
27
27
|
opacity: 1
|
|
28
|
-
.
|
|
28
|
+
.site-card .card-link>img
|
|
29
29
|
trans-site opacity
|
|
30
|
-
.
|
|
30
|
+
.user-card .card-link>img
|
|
31
31
|
trans-user opacity
|
package/source/js/main.js
CHANGED
|
@@ -44,7 +44,7 @@ const util = {
|
|
|
44
44
|
el.select();
|
|
45
45
|
document.execCommand("Copy");
|
|
46
46
|
if (msg && msg.length > 0) {
|
|
47
|
-
hud.toast(msg);
|
|
47
|
+
hud.toast(msg, 2500);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
},
|
|
@@ -59,17 +59,15 @@ const util = {
|
|
|
59
59
|
|
|
60
60
|
const hud = {
|
|
61
61
|
toast: (msg, duration) => {
|
|
62
|
-
|
|
62
|
+
const d = Number(isNaN(duration) ? 2000 : duration);
|
|
63
63
|
var el = document.createElement('div');
|
|
64
64
|
el.classList.add('toast');
|
|
65
|
+
el.classList.add('show');
|
|
65
66
|
el.innerHTML = msg;
|
|
66
67
|
document.body.appendChild(el);
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
el.style.opacity = '0';
|
|
71
|
-
setTimeout(function () { document.body.removeChild(el) }, d * 1000);
|
|
72
|
-
}, duration);
|
|
68
|
+
|
|
69
|
+
setTimeout(function(){ document.body.removeChild(el) }, d);
|
|
70
|
+
|
|
73
71
|
},
|
|
74
72
|
|
|
75
73
|
}
|
|
@@ -13,7 +13,7 @@ codeElementArr.forEach(code => {
|
|
|
13
13
|
|
|
14
14
|
codeCopyBtn.innerText = stellar.plugins.copycode.success_text
|
|
15
15
|
codeCopyBtn.classList.add('success')
|
|
16
|
-
|
|
16
|
+
hud.toast(stellar.plugins.copycode.toast)
|
|
17
17
|
setTimeout(() => {
|
|
18
18
|
codeCopyBtn.innerText = stellar.plugins.copycode.default_text
|
|
19
19
|
codeCopyBtn.classList.remove('success')
|
|
@@ -47,17 +47,17 @@ const friendsjs = {
|
|
|
47
47
|
$(el).append('<div class="loading-wrap"><svg xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2"><path stroke-dasharray="60" stroke-dashoffset="60" stroke-opacity=".3" d="M12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3Z"><animate fill="freeze" attributeName="stroke-dashoffset" dur="1.3s" values="60;0"/></path><path stroke-dasharray="15" stroke-dashoffset="15" d="M12 3C16.9706 3 21 7.02944 21 12"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="15;0"/><animateTransform attributeName="transform" dur="1.5s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></path></g></svg></div>');
|
|
48
48
|
friendsjs.requestAPI(cfg.api, function(data) {
|
|
49
49
|
$(el).find('.loading-wrap').remove();
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
$(el).find('.
|
|
60
|
-
}
|
|
50
|
+
for (let item of (data.content || data)) {
|
|
51
|
+
var cell = `<div class="grid-cell user-card">`;
|
|
52
|
+
cell += `<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="${item.html_url || item.url}">`;;
|
|
53
|
+
cell += `<img src="${item.avatar_url || item.avatar || item.icon || cfg.avatar}" onerror="javascript:this.removeAttribute(\'data-src\');this.src=\'${cfg.avatar}\';"/>`;
|
|
54
|
+
cell += `<div class="name image-meta">`;
|
|
55
|
+
cell += `<span class="image-caption">${item.title || item.login}</span>`;
|
|
56
|
+
cell += `</div>`;
|
|
57
|
+
cell += `</a>`;
|
|
58
|
+
cell += `</div>`;
|
|
59
|
+
$(el).find('.grid-box').append(cell);
|
|
60
|
+
}
|
|
61
61
|
}, function() {
|
|
62
62
|
$(el).find('.loading-wrap svg').remove();
|
|
63
63
|
$(el).find('.loading-wrap').append('<svg xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path stroke-dasharray="60" stroke-dashoffset="60" d="M12 3L21 20H3L12 3Z"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.5s" values="60;0"/></path><path stroke-dasharray="6" stroke-dashoffset="6" d="M12 10V14"><animate fill="freeze" attributeName="stroke-dashoffset" begin="0.6s" dur="0.2s" values="6;0"/></path></g><circle cx="12" cy="17" r="1" fill="currentColor" fill-opacity="0"><animate fill="freeze" attributeName="fill-opacity" begin="0.8s" dur="0.4s" values="0;1"/></circle></svg>');
|
|
@@ -47,20 +47,19 @@ const sitesjs = {
|
|
|
47
47
|
$(el).append('<div class="loading-wrap"><svg xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2"><path stroke-dasharray="60" stroke-dashoffset="60" stroke-opacity=".3" d="M12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3Z"><animate fill="freeze" attributeName="stroke-dashoffset" dur="1.3s" values="60;0"/></path><path stroke-dasharray="15" stroke-dashoffset="15" d="M12 3C16.9706 3 21 7.02944 21 12"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="15;0"/><animateTransform attributeName="transform" dur="1.5s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></path></g></svg></div>');
|
|
48
48
|
sitesjs.requestAPI(cfg.api, function(data) {
|
|
49
49
|
$(el).find('.loading-wrap').remove();
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
cell +=
|
|
54
|
-
cell +=
|
|
55
|
-
cell +=
|
|
56
|
-
cell +=
|
|
57
|
-
cell +=
|
|
58
|
-
cell +=
|
|
59
|
-
cell +=
|
|
60
|
-
cell +=
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
});
|
|
50
|
+
for (let item of data.content) {
|
|
51
|
+
var cell = `<div class="grid-cell site-card">`;
|
|
52
|
+
cell += `<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="${item.url}">`;
|
|
53
|
+
cell += `<img src="${item.cover || item.screenshot}" onerror="javascript:this.removeAttribute(\'data-src\');this.src=\'${cfg.screenshot}\';"/>`;
|
|
54
|
+
cell += `<div class="info">`;
|
|
55
|
+
cell += `<img src="${item.icon || item.avatar || cfg.avatar}" onerror="javascript:this.removeAttribute(\'data-src\');this.src=\'${cfg.avatar}\';"/>`;
|
|
56
|
+
cell += `<span class="title">${item.title}</span>`;
|
|
57
|
+
cell += `<span class="desc">${item.description || item.url}</span>`;
|
|
58
|
+
cell += `</div>`;
|
|
59
|
+
cell += `</a>`;
|
|
60
|
+
cell += `</div>`;
|
|
61
|
+
$(el).find('.grid-box').append(cell);
|
|
62
|
+
}
|
|
64
63
|
}, function() {
|
|
65
64
|
$(el).find('.loading-wrap svg').remove();
|
|
66
65
|
$(el).find('.loading-wrap').append('<svg xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path stroke-dasharray="60" stroke-dashoffset="60" d="M12 3L21 20H3L12 3Z"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.5s" values="60;0"/></path><path stroke-dasharray="6" stroke-dashoffset="6" d="M12 10V14"><animate fill="freeze" attributeName="stroke-dashoffset" begin="0.6s" dur="0.2s" values="6;0"/></path></g><circle cx="12" cy="17" r="1" fill="currentColor" fill-opacity="0"><animate fill="freeze" attributeName="fill-opacity" begin="0.8s" dur="0.4s" values="0;1"/></circle></svg>');
|
package/_data/links.yml
DELETED
package/layout/mathjax.ejs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<% if (theme.plugins.mathjax.enable){ %>
|
|
2
|
-
<script type="text/x-mathjax-config">
|
|
3
|
-
MathJax.Hub.Config({
|
|
4
|
-
tex2jax: {
|
|
5
|
-
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
|
|
6
|
-
processEscapes: true
|
|
7
|
-
}
|
|
8
|
-
});
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<script type="text/x-mathjax-config">
|
|
12
|
-
MathJax.Hub.Config({
|
|
13
|
-
tex2jax: {
|
|
14
|
-
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<script type="text/x-mathjax-config">
|
|
20
|
-
MathJax.Hub.Queue(function() {
|
|
21
|
-
var all = MathJax.Hub.getAllJax(), i;
|
|
22
|
-
for(i=0; i < all.length; i += 1) {
|
|
23
|
-
all[i].SourceElement().parentNode.className += ' has-jax';
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
</script>
|
|
27
|
-
|
|
28
|
-
<script type="text/javascript" src="<%- theme.plugins.mathjax.cdn %>"></script>
|
|
29
|
-
<% } %>
|
package/layout/mermaid.ejs
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<% if (theme.plugins.mermaid.enable) { %>
|
|
2
|
-
<script type="text/javascript" src="<%- theme.plugins.mermaid.js %>"></script>
|
|
3
|
-
|
|
4
|
-
<script>
|
|
5
|
-
var mermaid_config = {
|
|
6
|
-
startOnLoad: true,
|
|
7
|
-
theme:
|
|
8
|
-
"<%- theme.style.darkmode %>" == "auto" &&
|
|
9
|
-
window.matchMedia("(prefers-color-scheme: dark)").matches
|
|
10
|
-
? "dark"
|
|
11
|
-
: "<%- theme.plugins.mermaid.theme %>",
|
|
12
|
-
logLevel: 3,
|
|
13
|
-
themeVariables: {
|
|
14
|
-
darkMode: true
|
|
15
|
-
},
|
|
16
|
-
flowchart: {
|
|
17
|
-
useMaxWidth: false,
|
|
18
|
-
htmlLabels: true,
|
|
19
|
-
curve: "linear"
|
|
20
|
-
},
|
|
21
|
-
gantt: {
|
|
22
|
-
axisFormat: "%Y/%m/%d"
|
|
23
|
-
},
|
|
24
|
-
sequence: {
|
|
25
|
-
actorMargin: 50
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
if (window.mermaid) {
|
|
29
|
-
mermaid.initialize(mermaid_config);
|
|
30
|
-
}
|
|
31
|
-
</script>
|
|
32
|
-
<% } %>
|