hexo-theme-stellar 1.9.0 → 1.11.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 +60 -52
- package/_data/widgets.yml +46 -0
- package/languages/en.yml +0 -6
- package/languages/zh-CN.yml +0 -6
- package/languages/zh-TW.yml +0 -6
- package/layout/404.ejs +1 -1
- package/layout/_partial/main/footer.ejs +6 -17
- package/layout/_partial/main/header/index.ejs +1 -1
- package/layout/_partial/main/navbar/list_post.ejs +2 -2
- package/layout/_partial/plugins/comments/valine/script.ejs +1 -1
- package/layout/_partial/scripts/index.ejs +5 -3
- package/layout/_partial/sidebar/index.ejs +9 -7
- package/layout/_partial/sidebar/logo.ejs +1 -1
- package/layout/_partial/sidebar/widgets/ghrepo.ejs +53 -0
- package/layout/_partial/sidebar/widgets/ghuser.ejs +53 -0
- package/layout/_partial/sidebar/widgets/toc.ejs +1 -1
- package/layout/post.ejs +1 -1
- package/layout/wiki.ejs +1 -1
- package/package.json +1 -1
- package/scripts/events/lib/config.js +26 -10
- package/scripts/tags/about.js +12 -13
- package/scripts/tags/folders.js +55 -0
- package/scripts/tags/friends.js +2 -3
- package/scripts/tags/ghcard.js +2 -2
- package/scripts/tags/lib/users.js +1 -2
- package/scripts/tags/sites.js +2 -3
- package/scripts/tags/timeline.js +32 -25
- package/source/css/_common/base.styl +5 -9
- package/source/css/_common/button.styl +1 -1
- package/source/css/_common/device.styl +2 -2
- package/source/css/_common/highlight.styl +4 -3
- package/source/css/_common/html.styl +2 -0
- package/source/css/_common/loading.styl +5 -0
- package/source/css/_common/pre.styl +6 -0
- package/source/css/_custom.styl +36 -23
- package/source/css/_defines/const.styl +1 -0
- package/source/css/_defines/theme.styl +13 -13
- package/source/css/_layout/layout.styl +2 -2
- package/source/css/_layout/main.styl +2 -2
- package/source/css/_layout/md.styl +36 -2
- package/source/css/_layout/partial/footer.styl +3 -7
- package/source/css/_layout/partial/navbar.styl +1 -1
- package/source/css/_layout/partial/paginator.styl +4 -0
- package/source/css/_layout/partial/related.styl +2 -0
- package/source/css/_layout/sidebar/ghrepo.styl +30 -0
- package/source/css/_layout/sidebar/ghuser.styl +80 -0
- package/source/css/_layout/sidebar/sidebar.styl +2 -3
- package/source/css/_layout/tag-plugins/about.styl +14 -16
- package/source/css/_layout/tag-plugins/common.styl +1 -1
- package/source/css/_layout/tag-plugins/folders.styl +62 -0
- package/source/css/_layout/tag-plugins/friends.styl +3 -6
- package/source/css/_layout/tag-plugins/inline-labels.styl +1 -0
- package/source/css/_layout/tag-plugins/link.styl +2 -1
- package/source/css/_layout/tag-plugins/note.styl +8 -0
- package/source/css/_layout/tag-plugins/poetry.styl +1 -1
- package/source/css/_layout/tag-plugins/quot.styl +7 -6
- package/source/css/_layout/tag-plugins/sites.styl +2 -6
- package/source/css/_layout/tag-plugins/tabs.styl +5 -0
- package/source/css/_layout/tag-plugins/timeline.styl +108 -6
- package/source/css/_layout/tag-plugins/toc.styl +1 -1
- package/source/css/_plugins/comments/twikoo.styl +2 -2
- package/source/css/_plugins/comments/waline.styl +1 -1
- package/source/js/main.js +13 -15
- package/source/js/plugins/friends.js +1 -2
- package/source/js/plugins/ghinfo.js +73 -0
- package/source/js/plugins/sites.js +1 -1
- package/source/js/plugins/timeline.js +144 -0
- package/layout/_partial/sidebar/widgets/repo_info.ejs +0 -72
- package/source/css/_layout/sidebar/repo_info.styl +0 -28
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
.widget-wrap#github-user
|
|
2
|
+
.widget-header+.widget-body
|
|
3
|
+
margin: 0.75rem 0
|
|
4
|
+
.widget-wrap#github-user .widget-body
|
|
5
|
+
text-align: center
|
|
6
|
+
background: var(--card)
|
|
7
|
+
border-radius: $border-card
|
|
8
|
+
padding: 1rem
|
|
9
|
+
|
|
10
|
+
.widget-wrap#github-user .widget-body .avatar
|
|
11
|
+
display: block
|
|
12
|
+
border-radius: 100%
|
|
13
|
+
margin: 1rem auto 1.25rem auto
|
|
14
|
+
max-width: 75%
|
|
15
|
+
overflow: hidden
|
|
16
|
+
img
|
|
17
|
+
display: block
|
|
18
|
+
@media screen and (max-width: $device-tablet)
|
|
19
|
+
max-width: 50%
|
|
20
|
+
|
|
21
|
+
.widget-wrap#github-user .widget-body .username
|
|
22
|
+
font-weight: 900
|
|
23
|
+
font-size: $fs-h2
|
|
24
|
+
color: var(--text-p0)
|
|
25
|
+
margin: 0.5rem 0
|
|
26
|
+
|
|
27
|
+
.widget-wrap#github-user .widget-body .bio
|
|
28
|
+
font-size: $fs-13
|
|
29
|
+
margin: 0.5rem 0
|
|
30
|
+
|
|
31
|
+
.widget-wrap#github-user .widget-body .follow
|
|
32
|
+
font-weight: 500
|
|
33
|
+
border-radius: 64px
|
|
34
|
+
padding: 0.5rem 1rem
|
|
35
|
+
background: $color-theme
|
|
36
|
+
color: var(--card)
|
|
37
|
+
font-size: 1rem
|
|
38
|
+
align-self: stretch
|
|
39
|
+
text-align: center
|
|
40
|
+
line-height: 1.5
|
|
41
|
+
display: flex
|
|
42
|
+
align-items: center
|
|
43
|
+
justify-content: center
|
|
44
|
+
trans1: background
|
|
45
|
+
svg
|
|
46
|
+
margin-right: 6px
|
|
47
|
+
&:hover
|
|
48
|
+
background: $color-hover
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
.widget-wrap#github-user .widget-body .buttons
|
|
53
|
+
margin: 1rem 0
|
|
54
|
+
align-self: stretch
|
|
55
|
+
display: grid
|
|
56
|
+
grid-gap: 2px
|
|
57
|
+
grid-template-columns: repeat(auto-fill, "calc((100% - 2 * %s) / 3)" % 2px)
|
|
58
|
+
|
|
59
|
+
.widget-wrap#github-user .widget-body .btn
|
|
60
|
+
display: flex
|
|
61
|
+
flex-direction: column
|
|
62
|
+
align-items: center
|
|
63
|
+
color: inherit
|
|
64
|
+
border: 1px solid transparent
|
|
65
|
+
border-radius: 4px
|
|
66
|
+
padding: 0.25rem 0
|
|
67
|
+
trans1: background
|
|
68
|
+
&:hover
|
|
69
|
+
background: var(--block)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
.widget-wrap#github-user .widget-body .buttons .btn .title
|
|
73
|
+
font-size: 1rem
|
|
74
|
+
font-weight: 700
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
.widget-wrap#github-user .widget-body .buttons .btn .desc
|
|
78
|
+
font-size: $fs-12
|
|
79
|
+
color: var(--text-p3)
|
|
80
|
+
font-weight: 500
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
padding: var(--gap-l)
|
|
7
7
|
padding-top: "calc(2 * %s)" % var(--gap-l)
|
|
8
8
|
height: "calc(100vh - 3 * %s)" % var(--gap-l)
|
|
9
|
-
@media screen and (max-width: $device-
|
|
9
|
+
@media screen and (max-width: $device-mobile-max)
|
|
10
10
|
padding-top: "calc(1 * %s)" % var(--gap-l)
|
|
11
11
|
height: "calc(100% - 2 * %s)" % var(--gap-l)
|
|
12
12
|
|
|
13
13
|
.l_left[layout=wiki]
|
|
14
14
|
padding-bottom: 0
|
|
15
15
|
height: "calc(100vh - 2 * %s)" % var(--gap-l)
|
|
16
|
-
@media screen and (max-width: $device-
|
|
16
|
+
@media screen and (max-width: $device-mobile-max)
|
|
17
17
|
height: "calc(100% - 1 * %s)" % var(--gap-l)
|
|
18
18
|
.widgets >:last-child
|
|
19
19
|
margin-bottom: 6rem
|
|
@@ -75,7 +75,6 @@
|
|
|
75
75
|
font-weight: 900
|
|
76
76
|
color: inherit
|
|
77
77
|
line-height: 1.2
|
|
78
|
-
font-family: $ff-logo
|
|
79
78
|
display: block
|
|
80
79
|
position: relative
|
|
81
80
|
.main
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
.tag-plugin.about
|
|
2
2
|
background: var(--block)
|
|
3
|
-
border-radius: $border-
|
|
3
|
+
border-radius: $border-card
|
|
4
4
|
padding: 2rem
|
|
5
5
|
.about-header
|
|
6
6
|
display flex
|
|
7
|
-
|
|
8
|
-
justify-content: space-between
|
|
7
|
+
justify-content: center
|
|
9
8
|
flex-wrap: wrap
|
|
9
|
+
margin: 1.5rem 0 3rem
|
|
10
10
|
img
|
|
11
11
|
object-fit: contain
|
|
12
12
|
>img
|
|
@@ -28,28 +28,26 @@
|
|
|
28
28
|
>p
|
|
29
29
|
line-height: 1.5
|
|
30
30
|
.tag-plugin.navbar:last-child
|
|
31
|
+
text-align: center
|
|
31
32
|
nav.cap
|
|
32
33
|
margin-top: 1rem
|
|
34
|
+
background: var(--card)
|
|
35
|
+
box-shadow: $boxshadow-button
|
|
33
36
|
a
|
|
34
|
-
|
|
35
|
-
color: $color-link
|
|
36
|
-
background: var(--block-hover)
|
|
37
|
-
&.active
|
|
38
|
-
background: none
|
|
37
|
+
color: var(--text-p2)
|
|
39
38
|
&:hover
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
background: var(--block)
|
|
40
|
+
&.active
|
|
41
|
+
background: var(--block)
|
|
42
|
+
box-shadow: none
|
|
43
|
+
color: var(--text-p1)
|
|
44
44
|
.about-header+.about-body
|
|
45
45
|
margin-top: 1.5rem
|
|
46
46
|
|
|
47
47
|
@media screen and (max-width: $device-mobile)
|
|
48
48
|
.tag-plugin.about
|
|
49
|
-
padding: 1rem
|
|
49
|
+
padding: 1.5rem 1rem
|
|
50
50
|
.about-header
|
|
51
|
-
|
|
52
|
-
.avatar
|
|
53
|
-
margin: 1rem auto
|
|
51
|
+
margin: 2.5rem 0 3rem
|
|
54
52
|
p
|
|
55
53
|
width 100%
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
.tag-plugin.folders
|
|
2
|
+
display: block
|
|
3
|
+
margin: 1rem 0
|
|
4
|
+
border-radius: $border-block
|
|
5
|
+
font-size: $fs-14
|
|
6
|
+
border: 1px solid var(--theme-border)
|
|
7
|
+
overflow: hidden
|
|
8
|
+
.folder
|
|
9
|
+
display: block
|
|
10
|
+
font-size: $fs-14
|
|
11
|
+
background: var(--block)
|
|
12
|
+
&:last-child summary
|
|
13
|
+
border-bottom: none
|
|
14
|
+
summary
|
|
15
|
+
display: block
|
|
16
|
+
cursor: pointer
|
|
17
|
+
color: var(--text-p2)
|
|
18
|
+
font-weight: 500
|
|
19
|
+
position: relative
|
|
20
|
+
line-height: 1.2
|
|
21
|
+
outline: none
|
|
22
|
+
padding: 0.75rem 1rem
|
|
23
|
+
border-bottom: 1px solid var(--theme-border)
|
|
24
|
+
&:last-child
|
|
25
|
+
border-bottom: none
|
|
26
|
+
>
|
|
27
|
+
p,h1,h2,h3,h4,h5,h6
|
|
28
|
+
display: inline
|
|
29
|
+
border-bottom: none !important
|
|
30
|
+
&:hover
|
|
31
|
+
color: var(--text-p0)
|
|
32
|
+
background: var(--block-hover)
|
|
33
|
+
&:after
|
|
34
|
+
position: absolute
|
|
35
|
+
content: '+'
|
|
36
|
+
text-align: center
|
|
37
|
+
top: 50%
|
|
38
|
+
transform: translateY(-50%)
|
|
39
|
+
right: 1rem
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
.tag-plugin.folders details[open]
|
|
43
|
+
background: none
|
|
44
|
+
&:last-child
|
|
45
|
+
summary
|
|
46
|
+
border-bottom: 1px solid var(--theme-border)
|
|
47
|
+
.body
|
|
48
|
+
border-bottom: none
|
|
49
|
+
>summary
|
|
50
|
+
color: var(--text-p1)
|
|
51
|
+
background: var(--block-hover)
|
|
52
|
+
&:hover:after
|
|
53
|
+
content: '-'
|
|
54
|
+
|
|
55
|
+
>div.body
|
|
56
|
+
padding: 1rem
|
|
57
|
+
border-bottom: 1px solid var(--theme-border)
|
|
58
|
+
font-size: $fs-15
|
|
59
|
+
>:first-child
|
|
60
|
+
margin-top: 0
|
|
61
|
+
>:last-child
|
|
62
|
+
margin-bottom: 0
|
|
@@ -15,12 +15,9 @@
|
|
|
15
15
|
align-items: stretch
|
|
16
16
|
&+.group-header
|
|
17
17
|
margin-top: 2rem
|
|
18
|
-
.
|
|
18
|
+
.stellar-friends-api
|
|
19
19
|
display: block
|
|
20
|
-
|
|
21
|
-
min-height: 50px
|
|
22
|
-
margin: 2rem 0
|
|
23
|
-
text-align: center
|
|
20
|
+
|
|
24
21
|
|
|
25
22
|
.users-wrap .user-card
|
|
26
23
|
flex-shrink: 1
|
|
@@ -33,7 +30,7 @@
|
|
|
33
30
|
width: 16.66%
|
|
34
31
|
@media screen and (max-width: 820px)
|
|
35
32
|
width: 20%
|
|
36
|
-
@media screen and (max-width: $device-
|
|
33
|
+
@media screen and (max-width: $device-mobile-max)
|
|
37
34
|
width: 16.66%
|
|
38
35
|
@media screen and (max-width: $device-mobile)
|
|
39
36
|
width: 25%
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
margin: 1em auto
|
|
4
4
|
display: flex
|
|
5
5
|
justify-content: center
|
|
6
|
-
@media screen and (max-width: $device-mobile-
|
|
6
|
+
@media screen and (max-width: $device-mobile-425)
|
|
7
7
|
width: 100%
|
|
8
8
|
|
|
9
9
|
.md .link-card
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
flex-direction: column
|
|
33
33
|
align-items: stretch
|
|
34
34
|
width: 400px
|
|
35
|
+
text-align: justify
|
|
35
36
|
|
|
36
37
|
.md .link-card
|
|
37
38
|
line-height: 1.2
|
|
@@ -41,13 +41,13 @@ article.md.content
|
|
|
41
41
|
&:before
|
|
42
42
|
top: 8px
|
|
43
43
|
left: 0
|
|
44
|
-
border-top: 6px solid $color-
|
|
45
|
-
border-left: 6px solid $color-
|
|
44
|
+
border-top: 6px solid $color-accent
|
|
45
|
+
border-left: 6px solid $color-accent
|
|
46
46
|
&:after
|
|
47
47
|
right: 0
|
|
48
48
|
bottom: 0
|
|
49
|
-
border-right: 6px solid $color-
|
|
50
|
-
border-bottom: 6px solid $color-
|
|
49
|
+
border-right: 6px solid $color-accent
|
|
50
|
+
border-bottom: 6px solid $color-accent
|
|
51
51
|
article.md.content h1.quot[type=text]
|
|
52
52
|
&:before,&:after
|
|
53
53
|
width: 12px
|
|
@@ -59,9 +59,10 @@ article.md.content h1.quot[type=text]
|
|
|
59
59
|
.icon
|
|
60
60
|
height: 1.5em
|
|
61
61
|
display: inline-block
|
|
62
|
-
color: $color-
|
|
62
|
+
color: $color-accent
|
|
63
63
|
border-radius: 0
|
|
64
64
|
&.prefix
|
|
65
|
+
margin-left: -0.5rem
|
|
65
66
|
margin-right: .5rem
|
|
66
67
|
&.suffix
|
|
67
68
|
margin-left: .5rem
|
|
@@ -70,7 +71,7 @@ article.md.content h1.quot[type=text]
|
|
|
70
71
|
.md span.tag-plugin.quot
|
|
71
72
|
font-weight: 500
|
|
72
73
|
&:before,&:after
|
|
73
|
-
color: $color-
|
|
74
|
+
color: $color-accent
|
|
74
75
|
font-weight: 900
|
|
75
76
|
&:before
|
|
76
77
|
content: "「"
|
|
@@ -11,12 +11,8 @@
|
|
|
11
11
|
width: 100%
|
|
12
12
|
&+.group-header
|
|
13
13
|
margin-top: 2rem
|
|
14
|
-
.
|
|
14
|
+
.stellar-sites-api
|
|
15
15
|
display: block
|
|
16
|
-
.loading-wrap
|
|
17
|
-
min-height: 50px
|
|
18
|
-
margin: 2rem 0
|
|
19
|
-
text-align: center
|
|
20
16
|
|
|
21
17
|
.sites-wrap .group-body
|
|
22
18
|
display: grid
|
|
@@ -26,7 +22,7 @@
|
|
|
26
22
|
grid-template-columns: repeat(auto-fill, "calc((100% - 2 * %s) / 3)" % 1rem)
|
|
27
23
|
@media screen and (max-width: 900px)
|
|
28
24
|
grid-template-columns: repeat(auto-fill, "calc((100% - 1 * %s) / 2)" % 1rem)
|
|
29
|
-
@media screen and (max-width: $device-
|
|
25
|
+
@media screen and (max-width: $device-mobile-max)
|
|
30
26
|
grid-template-columns: repeat(auto-fill, "calc((100% - 2 * %s) / 3)" % 1rem)
|
|
31
27
|
@media screen and (max-width: $device-mobile)
|
|
32
28
|
grid-template-columns: repeat(auto-fill, "calc((100% - 1 * %s) / 2)" % 1rem)
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
.tag-plugin.timeline
|
|
1
|
+
.md .tag-plugin.folding .body:has(.timeline)
|
|
2
|
+
background: var(--site-bg)
|
|
3
|
+
|
|
4
|
+
.md .tag-plugin.timeline
|
|
2
5
|
position: relative
|
|
3
|
-
margin:
|
|
6
|
+
margin-top: 0
|
|
4
7
|
padding-left: 16px
|
|
5
8
|
&:before
|
|
6
9
|
content: ''
|
|
@@ -12,6 +15,10 @@
|
|
|
12
15
|
border-radius: 8px
|
|
13
16
|
top: .5rem
|
|
14
17
|
bottom: 0
|
|
18
|
+
&:has(.loading-wrap)
|
|
19
|
+
padding-left: 0
|
|
20
|
+
&:before
|
|
21
|
+
display: none
|
|
15
22
|
|
|
16
23
|
.tag-plugin.timeline .timenode
|
|
17
24
|
position: relative
|
|
@@ -28,23 +35,48 @@
|
|
|
28
35
|
&:hover .header
|
|
29
36
|
p
|
|
30
37
|
color: var(--text-p1)
|
|
38
|
+
.user-info
|
|
39
|
+
background: $color-theme
|
|
40
|
+
span
|
|
41
|
+
color: var(--card)
|
|
31
42
|
&:before
|
|
32
43
|
background: $color-theme
|
|
33
44
|
height: 16px
|
|
34
45
|
top: 'calc(50% - 0.5 * %s)' % @height
|
|
35
46
|
transform: scale(1)
|
|
36
47
|
|
|
37
|
-
.tag-plugin.timeline .header
|
|
48
|
+
.tag-plugin.timeline .timenode .header
|
|
38
49
|
display: flex
|
|
39
50
|
align-items: center
|
|
40
51
|
position: relative
|
|
52
|
+
margin: 0.25rem 0
|
|
53
|
+
.user-info
|
|
54
|
+
display: flex
|
|
55
|
+
align-items: center
|
|
56
|
+
font-size: $fs-12
|
|
57
|
+
font-weight: 500
|
|
58
|
+
color: var(--text-p1)
|
|
59
|
+
margin-right: 4px
|
|
60
|
+
line-height: 1
|
|
61
|
+
border-radius: 16px
|
|
62
|
+
padding-right: 6px
|
|
63
|
+
trans2 color background
|
|
64
|
+
img
|
|
65
|
+
background: white
|
|
66
|
+
height: 16px
|
|
67
|
+
border-radius: 16px
|
|
68
|
+
display: inline
|
|
69
|
+
margin: 0 4px 0 0
|
|
70
|
+
object-fit: contain
|
|
71
|
+
&:hover
|
|
72
|
+
background: $color-hover
|
|
41
73
|
p
|
|
42
|
-
margin:
|
|
74
|
+
margin: 0
|
|
43
75
|
font-size: $fs-12
|
|
44
|
-
font-weight:
|
|
76
|
+
font-weight: 500
|
|
45
77
|
color: var(--text-p3)
|
|
46
|
-
font-family: $ff-code
|
|
47
78
|
trans1 color
|
|
79
|
+
line-height: 1
|
|
48
80
|
a
|
|
49
81
|
color: inherit
|
|
50
82
|
font-weight: inherit
|
|
@@ -68,9 +100,79 @@
|
|
|
68
100
|
padding: 0.5rem 1rem
|
|
69
101
|
margin-top: 4px
|
|
70
102
|
box-shadow: $boxshadow-block
|
|
103
|
+
p
|
|
104
|
+
font-size: $fs-14
|
|
71
105
|
&:empty
|
|
72
106
|
display: none
|
|
73
107
|
p,.highlight,ol,ul,.tag-plugin
|
|
74
108
|
margin: .5rem 0
|
|
75
109
|
.tag-plugin.copy
|
|
76
110
|
width: 240px
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
.tag-plugin.timeline.stellar-timeline-api .body
|
|
114
|
+
max-height: convert(hexo-config('tag_plugins.timeline.max-height'))
|
|
115
|
+
overflow: scroll
|
|
116
|
+
p.title
|
|
117
|
+
font-size: 1rem
|
|
118
|
+
font-weight: 700
|
|
119
|
+
margin: 0
|
|
120
|
+
padding: 0.5rem 0 0.75rem
|
|
121
|
+
line-height: 1.25
|
|
122
|
+
border-bottom: 1px dashed var(--block-border)
|
|
123
|
+
a
|
|
124
|
+
color: inherit
|
|
125
|
+
&:hover
|
|
126
|
+
color: $color-hover
|
|
127
|
+
pre code
|
|
128
|
+
font-size: $fs-12
|
|
129
|
+
|
|
130
|
+
.tag-plugin.timeline.stellar-timeline-api .body .footer
|
|
131
|
+
padding: 0.5rem 0 1rem
|
|
132
|
+
margin-bottom: -0.5rem
|
|
133
|
+
user-select: none
|
|
134
|
+
font-weight: 500
|
|
135
|
+
display: flex
|
|
136
|
+
flex-wrap: wrap
|
|
137
|
+
justify-content: space-between
|
|
138
|
+
align-items: stretch
|
|
139
|
+
position: sticky
|
|
140
|
+
position: -webkit-sticky
|
|
141
|
+
bottom: -0.5rem
|
|
142
|
+
background: var(--card)
|
|
143
|
+
span
|
|
144
|
+
line-height: 1.8
|
|
145
|
+
&:empty
|
|
146
|
+
display: none
|
|
147
|
+
.flex
|
|
148
|
+
display: flex
|
|
149
|
+
flex-wrap: wrap
|
|
150
|
+
font-size: $fs-12
|
|
151
|
+
align-items: stretch
|
|
152
|
+
|
|
153
|
+
.tag-plugin.timeline.stellar-timeline-api .body .footer
|
|
154
|
+
.item
|
|
155
|
+
border-width: 1px
|
|
156
|
+
border-style: solid
|
|
157
|
+
margin: 2px
|
|
158
|
+
border-radius: 4px
|
|
159
|
+
padding: 0 0.5rem
|
|
160
|
+
display: flex
|
|
161
|
+
align-items: center
|
|
162
|
+
&:first-child
|
|
163
|
+
margin-left: 0
|
|
164
|
+
&:last-child
|
|
165
|
+
margin-right: 0
|
|
166
|
+
.reaction
|
|
167
|
+
border-color: var(--block)
|
|
168
|
+
|
|
169
|
+
.tag-plugin.timeline .body blockquote
|
|
170
|
+
padding: 0 0.5rem
|
|
171
|
+
box-shadow: none
|
|
172
|
+
border-left: 4px solid var(--block-border)
|
|
173
|
+
border-radius: 0
|
|
174
|
+
display: block
|
|
175
|
+
margin: 0.75rem 0
|
|
176
|
+
p
|
|
177
|
+
font-size: $fs-13
|
|
178
|
+
margin: 0.25rem
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
--twikoo-lighttext: #ef794f;
|
|
3
3
|
--twikoo-secondtext: #909094;
|
|
4
4
|
--twikoo-emoji-background: #f8f8f8;
|
|
5
|
-
--twikoo-theme:
|
|
5
|
+
--twikoo-theme: $color-theme;
|
|
6
6
|
margin-top: 1.5rem
|
|
7
7
|
|
|
8
8
|
.tk-content
|
|
@@ -112,4 +112,4 @@ if hexo-config('style.darkmode') == 'auto'
|
|
|
112
112
|
--twikoo-lighttext: #f2b94b;
|
|
113
113
|
--twikoo-secondtext: #a1a2b8;
|
|
114
114
|
--twikoo-emoji-background: darken($dark-block, 1);
|
|
115
|
-
--twikoo-theme: #409eff;
|
|
115
|
+
--twikoo-theme: #409eff;
|
package/source/js/main.js
CHANGED
|
@@ -213,21 +213,19 @@ if (stellar.plugins.lazyload) {
|
|
|
213
213
|
});
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
-
//
|
|
217
|
-
if (stellar.plugins.
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
stellar.loadScript(stellar.plugins.friendsjs, { defer: true })
|
|
230
|
-
})
|
|
216
|
+
// stellar js
|
|
217
|
+
if (stellar.plugins.stellar) {
|
|
218
|
+
for (let key of Object.keys(stellar.plugins.stellar)) {
|
|
219
|
+
let js = stellar.plugins.stellar[key];
|
|
220
|
+
const els = document.getElementsByClassName('stellar-' + key + '-api');
|
|
221
|
+
if (els != undefined && els.length > 0) {
|
|
222
|
+
stellar.jQuery(() => {
|
|
223
|
+
stellar.loadScript(js, { defer: true });
|
|
224
|
+
if (key == 'timeline') {
|
|
225
|
+
stellar.loadScript(stellar.plugins.marked);
|
|
226
|
+
}
|
|
227
|
+
})
|
|
228
|
+
}
|
|
231
229
|
}
|
|
232
230
|
}
|
|
233
231
|
|
|
@@ -48,7 +48,6 @@ const friendsjs = {
|
|
|
48
48
|
friendsjs.requestAPI(cfg.api, function(data) {
|
|
49
49
|
$(el).find('.loading-wrap').remove();
|
|
50
50
|
const arr = data.content || data;
|
|
51
|
-
console.log(data);
|
|
52
51
|
arr.forEach((item, i) => {
|
|
53
52
|
var user = '<div class="user-card">';
|
|
54
53
|
user += '<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer"';
|
|
@@ -67,7 +66,7 @@ const friendsjs = {
|
|
|
67
66
|
}
|
|
68
67
|
|
|
69
68
|
$(function () {
|
|
70
|
-
const els = document.getElementsByClassName('
|
|
69
|
+
const els = document.getElementsByClassName('stellar-friends-api');
|
|
71
70
|
for (var i = 0; i < els.length; i++) {
|
|
72
71
|
const el = els[i];
|
|
73
72
|
const api = el.getAttribute('api');
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
const GitHubInfo = {
|
|
2
|
+
requestAPI: (url, callback, timeout) => {
|
|
3
|
+
let retryTimes = 5;
|
|
4
|
+
function request() {
|
|
5
|
+
return new Promise((resolve, reject) => {
|
|
6
|
+
let status = 0; // 0 等待 1 完成 2 超时
|
|
7
|
+
let timer = setTimeout(() => {
|
|
8
|
+
if (status === 0) {
|
|
9
|
+
status = 2;
|
|
10
|
+
timer = null;
|
|
11
|
+
reject('请求超时');
|
|
12
|
+
if (retryTimes == 0) {
|
|
13
|
+
timeout();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}, 5000);
|
|
17
|
+
fetch(url).then(function(response) {
|
|
18
|
+
if (status !== 2) {
|
|
19
|
+
clearTimeout(timer);
|
|
20
|
+
resolve(response);
|
|
21
|
+
timer = null;
|
|
22
|
+
status = 1;
|
|
23
|
+
}
|
|
24
|
+
if (response.ok) {
|
|
25
|
+
return response.json();
|
|
26
|
+
}
|
|
27
|
+
throw new Error('Network response was not ok.');
|
|
28
|
+
}).then(function(data) {
|
|
29
|
+
retryTimes = 0;
|
|
30
|
+
callback(data);
|
|
31
|
+
}).catch(function(error) {
|
|
32
|
+
if (retryTimes > 0) {
|
|
33
|
+
retryTimes -= 1;
|
|
34
|
+
setTimeout(() => {
|
|
35
|
+
request();
|
|
36
|
+
}, 5000);
|
|
37
|
+
} else {
|
|
38
|
+
timeout();
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
request();
|
|
44
|
+
},
|
|
45
|
+
layout: (cfg) => {
|
|
46
|
+
const el = $(cfg.el)[0];
|
|
47
|
+
GitHubInfo.requestAPI(cfg.api, function(data) {
|
|
48
|
+
const arr = data.content || data;
|
|
49
|
+
for (let key of Object.keys(data)) {
|
|
50
|
+
$(el).find("[type=text]#" + key).text(data[key]);
|
|
51
|
+
$(el).find("[type=link]#" + key).attr("href", data[key]);
|
|
52
|
+
$(el).find("[type=img]#" + key).attr("src", data[key]);
|
|
53
|
+
}
|
|
54
|
+
}, function() {
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
$(function () {
|
|
60
|
+
const els = document.getElementsByClassName('stellar-ghinfo-api');
|
|
61
|
+
for (var i = 0; i < els.length; i++) {
|
|
62
|
+
const el = els[i];
|
|
63
|
+
const api = el.getAttribute('api');
|
|
64
|
+
if (api == null) {
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
var cfg = new Object();
|
|
68
|
+
cfg.el = el;
|
|
69
|
+
cfg.api = api;
|
|
70
|
+
cfg.class = el.getAttribute('class');
|
|
71
|
+
GitHubInfo.layout(cfg);
|
|
72
|
+
}
|
|
73
|
+
});
|