hexo-theme-stellar 1.5.2 → 1.7.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 +67 -39
- package/languages/en.yml +0 -1
- package/languages/zh-CN.yml +0 -1
- package/languages/zh-TW.yml +0 -1
- package/layout/404.ejs +1 -1
- package/layout/_partial/cover/index.ejs +12 -0
- package/layout/_partial/cover/post_cover.ejs +19 -0
- package/layout/_partial/{main/article → cover}/wiki_cover.ejs +1 -4
- package/layout/_partial/head.ejs +10 -0
- package/layout/_partial/main/article/read_next.ejs +0 -6
- package/layout/_partial/main/post_list/post_card.ejs +42 -4
- package/layout/_partial/main/post_list/wiki_card.ejs +2 -0
- package/layout/_partial/scripts/index.ejs +6 -0
- package/layout/_partial/sidebar/index.ejs +11 -6
- package/layout/_partial/sidebar/widgets/markdown.ejs +18 -10
- package/layout/_partial/sidebar/widgets/recent.ejs +5 -13
- package/layout/_partial/sidebar/widgets/toc.ejs +2 -1
- package/layout/archive.ejs +3 -3
- package/layout/categories.ejs +1 -1
- package/layout/index.ejs +5 -2
- package/layout/layout.ejs +1 -1
- package/layout/post.ejs +6 -2
- package/layout/tags.ejs +1 -1
- package/package.json +1 -1
- package/scripts/events/index.js +5 -7
- package/scripts/tags/friends.js +3 -0
- package/scripts/tags/image.js +21 -1
- package/scripts/tags/link.js +42 -16
- package/scripts/tags/poetry.js +48 -0
- package/scripts/tags/quot.js +51 -0
- package/source/css/_common/device.styl +1 -1
- package/source/css/_common/highlight.styl +2 -1
- package/source/css/_common/title.styl +3 -1
- package/source/css/_custom.styl +5 -4
- package/source/css/_layout/layout.styl +1 -1
- package/source/css/_layout/list.styl +70 -36
- package/source/css/_layout/main.styl +2 -2
- package/source/css/_layout/md.styl +36 -8
- package/source/css/_layout/pages/archives.styl +48 -16
- package/source/css/_layout/partial/cover.styl +50 -10
- package/source/css/_layout/partial/navbar.styl +3 -4
- package/source/css/_layout/partial/related.styl +1 -3
- package/source/css/_layout/sidebar/sidebar.styl +22 -5
- package/source/css/_layout/tag-plugins/about.styl +4 -5
- package/source/css/_layout/tag-plugins/folding.styl +1 -0
- package/source/css/_layout/tag-plugins/friends.styl +2 -1
- package/source/css/_layout/tag-plugins/image.styl +1 -2
- package/source/css/_layout/tag-plugins/link.styl +47 -9
- package/source/css/_layout/tag-plugins/poetry.styl +50 -0
- package/source/css/_layout/tag-plugins/quot.styl +82 -0
- package/source/css/_layout/tag-plugins/sites.styl +2 -2
- package/source/css/_layout/tag-plugins/tabs.styl +2 -2
- package/source/css/_layout/tag-plugins/timeline.styl +1 -1
- package/source/css/_plugins/fancybox.styl +5 -0
- package/source/css/_plugins/index.styl +2 -0
- package/source/js/main.js +46 -13
|
@@ -5,9 +5,59 @@
|
|
|
5
5
|
flex-direction: column
|
|
6
6
|
justify-content: center
|
|
7
7
|
align-items: center
|
|
8
|
+
position: relative
|
|
9
|
+
&.post
|
|
10
|
+
height: inherit
|
|
11
|
+
|
|
8
12
|
|
|
9
13
|
.l_cover .cover-wrap
|
|
10
14
|
margin-bottom: 0
|
|
15
|
+
display: flex
|
|
16
|
+
flex-direction: column
|
|
17
|
+
justify-content: center
|
|
18
|
+
align-items: center
|
|
19
|
+
.cover-title
|
|
20
|
+
font-weight: 700
|
|
21
|
+
font-size: 1.5rem
|
|
22
|
+
margin: 1rem 0
|
|
23
|
+
line-height: 1.2
|
|
24
|
+
.description
|
|
25
|
+
margin: 1rem 0
|
|
26
|
+
.start-wrap
|
|
27
|
+
margin: 2rem 0
|
|
28
|
+
flex-shrink: 0
|
|
29
|
+
a.start
|
|
30
|
+
display: inline-block
|
|
31
|
+
|
|
32
|
+
.l_cover.post
|
|
33
|
+
.cover
|
|
34
|
+
z-index: -1
|
|
35
|
+
width: 100%
|
|
36
|
+
height: 30vh
|
|
37
|
+
max-width: $device-2k
|
|
38
|
+
min-height: 150px
|
|
39
|
+
max-height: 400px
|
|
40
|
+
@media screen and (max-width: $device-tablet)
|
|
41
|
+
height: 25vh
|
|
42
|
+
@media screen and (max-width: $device-mobile)
|
|
43
|
+
height: 20vh
|
|
44
|
+
@media screen and (min-width: $device-2k)
|
|
45
|
+
margin-top: 4rem
|
|
46
|
+
.img
|
|
47
|
+
border-radius: 2rem
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
.l_cover.post .cover-wrap
|
|
51
|
+
z-index: 1
|
|
52
|
+
.article-title
|
|
53
|
+
text-align: center
|
|
54
|
+
padding: 1rem
|
|
55
|
+
margin: 1em 0 0 0
|
|
56
|
+
@media screen and (min-width: $device-2k)
|
|
57
|
+
font-size: 3rem
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
.l_cover.wiki .cover-wrap
|
|
11
61
|
max-width: $device-mobile
|
|
12
62
|
.preview
|
|
13
63
|
margin-bottom: 2rem
|
|
@@ -18,15 +68,5 @@
|
|
|
18
68
|
@media screen and (max-width: $device-mobile)
|
|
19
69
|
max-width: 60%
|
|
20
70
|
.cover-title
|
|
21
|
-
font-weight: 700
|
|
22
|
-
font-size: 1.5rem
|
|
23
|
-
margin: 1rem 0
|
|
24
71
|
&:first-child
|
|
25
72
|
font-size: 3rem
|
|
26
|
-
.description
|
|
27
|
-
margin: 1rem 0
|
|
28
|
-
.start-wrap
|
|
29
|
-
margin: 2rem 0
|
|
30
|
-
flex-shrink: 0
|
|
31
|
-
a.start
|
|
32
|
-
display: inline-block
|
|
@@ -21,11 +21,10 @@ nav.cap
|
|
|
21
21
|
display: flex
|
|
22
22
|
overflow: scroll visible
|
|
23
23
|
scrollbar(0, 0)
|
|
24
|
-
padding-left: .25rem
|
|
25
24
|
>p
|
|
26
25
|
margin: 0
|
|
27
26
|
a
|
|
28
|
-
padding: .25rem
|
|
27
|
+
padding: .25rem 1rem
|
|
29
28
|
margin: 10px 0 8px 0
|
|
30
29
|
line-height: 2
|
|
31
30
|
color: var(--text-p3)
|
|
@@ -35,11 +34,11 @@ nav.cap
|
|
|
35
34
|
position: relative
|
|
36
35
|
z-index: 1
|
|
37
36
|
&:after
|
|
38
|
-
width: 'calc(100% - 2 * %s)' % .5rem
|
|
39
37
|
height: 2px
|
|
40
38
|
position: absolute
|
|
41
39
|
bottom: -8px
|
|
42
|
-
left:
|
|
40
|
+
left: 1rem
|
|
41
|
+
right: 1rem
|
|
43
42
|
background: $color-theme
|
|
44
43
|
border-radius: 2px
|
|
45
44
|
pointer-events: none
|
|
@@ -113,10 +113,8 @@
|
|
|
113
113
|
flex-shrink: 0
|
|
114
114
|
margin-left: 4px
|
|
115
115
|
font-size: $fs-12
|
|
116
|
-
color: var(--text-
|
|
116
|
+
color: var(--text-p4)
|
|
117
117
|
font-weight: 500
|
|
118
|
-
&#more
|
|
119
|
-
justify-content: center
|
|
120
118
|
&:hover
|
|
121
119
|
color: $color-hover !important
|
|
122
120
|
background: var(--card)
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
flex-direction: column
|
|
104
104
|
align-items: flex-start
|
|
105
105
|
a.wiki-home
|
|
106
|
-
margin-bottom:
|
|
106
|
+
margin-bottom: 1rem
|
|
107
107
|
color: var(--text-p1)
|
|
108
108
|
svg
|
|
109
109
|
margin-right: 2px
|
|
@@ -164,7 +164,9 @@ nav.menu
|
|
|
164
164
|
background: var(--site-bg)
|
|
165
165
|
padding-top: 2px
|
|
166
166
|
z-index 1
|
|
167
|
-
line-height: 2
|
|
167
|
+
line-height: 2
|
|
168
|
+
color: var(--text-p4)
|
|
169
|
+
font-size: $fs-14
|
|
168
170
|
&:empty
|
|
169
171
|
display: none
|
|
170
172
|
.cap-action
|
|
@@ -183,13 +185,28 @@ nav.menu
|
|
|
183
185
|
margin: 0.5rem 0
|
|
184
186
|
color: var(--text-p1)
|
|
185
187
|
p
|
|
186
|
-
margin-top:
|
|
187
|
-
margin-bottom:
|
|
188
|
+
margin-top: .5em
|
|
189
|
+
margin-bottom: .5em
|
|
190
|
+
line-height: 1.5
|
|
188
191
|
>a:hover
|
|
189
192
|
text-decoration: underline
|
|
190
193
|
.widget-header+.widget-body
|
|
191
194
|
margin-top: 0
|
|
192
|
-
|
|
195
|
+
|
|
196
|
+
.widget-wrap .widget-body
|
|
197
|
+
.more-item
|
|
198
|
+
margin: .5rem 0
|
|
199
|
+
.cap
|
|
200
|
+
margin-bottom: .25rem
|
|
201
|
+
.widget-wrap#recent .widget-body
|
|
202
|
+
a
|
|
203
|
+
line-height: 1.2
|
|
204
|
+
font-weight: 500
|
|
205
|
+
color: var(--text-p2)
|
|
206
|
+
font-size: $fs-13
|
|
207
|
+
&:hover
|
|
208
|
+
color: $color-hover
|
|
209
|
+
.widget-wrap#related .widget-body
|
|
193
210
|
>a
|
|
194
211
|
padding 0.5rem
|
|
195
212
|
display: block
|
|
@@ -29,19 +29,18 @@
|
|
|
29
29
|
line-height: 1.5
|
|
30
30
|
.tag-plugin.navbar:last-child
|
|
31
31
|
nav.cap
|
|
32
|
-
|
|
33
|
-
background: none
|
|
32
|
+
margin-top: 1rem
|
|
34
33
|
a
|
|
35
34
|
margin: 0
|
|
36
|
-
padding: 0
|
|
37
35
|
color: $color-link
|
|
36
|
+
background: var(--block-hover)
|
|
38
37
|
&.active
|
|
39
38
|
background: none
|
|
40
39
|
&:hover
|
|
41
40
|
color: $color-hover
|
|
42
|
-
background:
|
|
41
|
+
background: var(--block-border)
|
|
43
42
|
a+a
|
|
44
|
-
margin-left:
|
|
43
|
+
margin-left: .5rem
|
|
45
44
|
.about-header+.about-body
|
|
46
45
|
margin-top: 1.5rem
|
|
47
46
|
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
margin-top: 1rem
|
|
3
3
|
margin-bottom: 1rem
|
|
4
4
|
.image-bg
|
|
5
|
-
line-height: 0
|
|
6
5
|
text-align: center
|
|
7
6
|
border-radius: $border-image
|
|
8
7
|
position: relative
|
|
@@ -11,7 +10,7 @@
|
|
|
11
10
|
.image-download
|
|
12
11
|
opacity: 1 !important
|
|
13
12
|
img
|
|
14
|
-
display:
|
|
13
|
+
display: block
|
|
15
14
|
object-fit: cover
|
|
16
15
|
.image-download
|
|
17
16
|
position: absolute
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.md .tag-plugin.link
|
|
2
|
-
max-width:
|
|
2
|
+
max-width: 400px
|
|
3
3
|
margin: 1em auto
|
|
4
4
|
display: flex
|
|
5
5
|
justify-content: center
|
|
@@ -24,26 +24,64 @@
|
|
|
24
24
|
box-shadow: $boxshadow-card-float
|
|
25
25
|
transform: translateY(-1px)
|
|
26
26
|
|
|
27
|
+
.md .link-card.plain
|
|
28
|
+
flex-direction: row
|
|
29
|
+
align-items: center
|
|
30
|
+
|
|
31
|
+
.md .link-card.rich
|
|
32
|
+
flex-direction: column
|
|
33
|
+
align-items: stretch
|
|
34
|
+
width: 400px
|
|
27
35
|
|
|
28
36
|
.md .link-card
|
|
29
|
-
|
|
37
|
+
line-height: 1.2
|
|
38
|
+
> div
|
|
30
39
|
pointer-events: none
|
|
31
|
-
|
|
40
|
+
>.top
|
|
41
|
+
display: flex
|
|
42
|
+
margin: .75rem 1rem .25rem
|
|
43
|
+
overflow: hidden
|
|
44
|
+
max-width: 'calc(100% - %s * 2)' % 1rem
|
|
45
|
+
align-items: center
|
|
46
|
+
.img
|
|
47
|
+
line-height: 0
|
|
48
|
+
height: 16px
|
|
49
|
+
width: 20px
|
|
50
|
+
margin-right: 4px
|
|
51
|
+
background-repeat: no-repeat
|
|
52
|
+
background-size: contain
|
|
53
|
+
background-position: left center
|
|
54
|
+
.desc
|
|
55
|
+
opacity: .75
|
|
56
|
+
line-height: 1.5
|
|
57
|
+
span
|
|
58
|
+
txt-ellipsis()
|
|
59
|
+
max-width: 100%
|
|
60
|
+
>.bottom
|
|
61
|
+
margin: 0 1rem .75rem 1rem
|
|
62
|
+
.title
|
|
63
|
+
font-size: $fs-15
|
|
64
|
+
margin: 4px 0 8px 0
|
|
65
|
+
>.right
|
|
32
66
|
width: 2.5rem
|
|
33
67
|
height: 2.5rem
|
|
34
|
-
margin:
|
|
68
|
+
margin: .75rem
|
|
35
69
|
overflow: hidden
|
|
36
70
|
flex-shrink: 0
|
|
37
|
-
|
|
71
|
+
>.left
|
|
38
72
|
overflow: hidden
|
|
39
|
-
margin
|
|
73
|
+
margin: .5rem 0 .5rem 1rem
|
|
74
|
+
.title
|
|
75
|
+
font-size: $fs-14
|
|
76
|
+
margin: 1px 0 5px 0
|
|
77
|
+
.desc
|
|
78
|
+
flex-shrink: 0
|
|
79
|
+
txt-ellipsis()
|
|
40
80
|
span
|
|
41
81
|
margin: 0
|
|
42
82
|
display: block
|
|
43
|
-
txt-ellipsis()
|
|
44
83
|
span.title
|
|
45
84
|
font-weight: 500
|
|
46
85
|
color: var(--text-p1)
|
|
47
|
-
span.
|
|
48
|
-
flex-shrink: 0
|
|
86
|
+
span.desc
|
|
49
87
|
color: var(--text-p3)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
.md .tag-plugin.poetry
|
|
2
|
+
align-self: center
|
|
3
|
+
&[align=center]
|
|
4
|
+
align-items: center
|
|
5
|
+
>.title
|
|
6
|
+
font-weight: 500
|
|
7
|
+
font-size: 1rem
|
|
8
|
+
margin-top: var(--gap-p)
|
|
9
|
+
>.meta
|
|
10
|
+
color: var(--text-p2)
|
|
11
|
+
font-size: $fs-12
|
|
12
|
+
font-weight: 500
|
|
13
|
+
span+span
|
|
14
|
+
margin-left: 4px
|
|
15
|
+
>.body
|
|
16
|
+
margin: var(--gap-p) 0
|
|
17
|
+
border-top: 1px dashed var(--block-border)
|
|
18
|
+
border-bottom: 1px dashed var(--block-border)
|
|
19
|
+
p
|
|
20
|
+
font-size: $fs-14
|
|
21
|
+
>.footer
|
|
22
|
+
font-style: italic
|
|
23
|
+
color: var(--text-p4)
|
|
24
|
+
margin: var(--gap-p) 0
|
|
25
|
+
font-size: $fs-12
|
|
26
|
+
|
|
27
|
+
// 描边修饰
|
|
28
|
+
.md .tag-plugin.poetry
|
|
29
|
+
padding-left: 1rem
|
|
30
|
+
position: relative
|
|
31
|
+
&:before
|
|
32
|
+
content: ''
|
|
33
|
+
position: absolute
|
|
34
|
+
width: 4px
|
|
35
|
+
left: -4px
|
|
36
|
+
top: 4px
|
|
37
|
+
bottom: 4px
|
|
38
|
+
border-radius: 4px
|
|
39
|
+
background: var(--block)
|
|
40
|
+
>.title
|
|
41
|
+
position: relative
|
|
42
|
+
&:before
|
|
43
|
+
content: ''
|
|
44
|
+
position: absolute
|
|
45
|
+
width: 4px
|
|
46
|
+
left: calc(-1rem - 4px)
|
|
47
|
+
top: 6px
|
|
48
|
+
bottom: 6px
|
|
49
|
+
border-radius: 4px
|
|
50
|
+
background: $color-highlight
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
.md .tag-plugin.quot
|
|
2
|
+
text-align: center
|
|
3
|
+
position: relative
|
|
4
|
+
align-items: center
|
|
5
|
+
.md .tag-plugin.quot:not(span)
|
|
6
|
+
display: flex
|
|
7
|
+
align-self: center
|
|
8
|
+
border-bottom: none
|
|
9
|
+
font-weight: 700
|
|
10
|
+
&:first-child
|
|
11
|
+
margin-top: 1.5rem
|
|
12
|
+
a.headerlink:before
|
|
13
|
+
content: ''
|
|
14
|
+
padding: 16px 24px 8px 24px
|
|
15
|
+
@media screen and (max-width: $device-mobile)
|
|
16
|
+
padding: 16px 20px 8px
|
|
17
|
+
line-height: 1.2
|
|
18
|
+
|
|
19
|
+
// override
|
|
20
|
+
article.md.content
|
|
21
|
+
.quot:not(span)
|
|
22
|
+
color: var(--text-p0)
|
|
23
|
+
h1.quot
|
|
24
|
+
font-size: $fs-h1
|
|
25
|
+
font-weight: 900
|
|
26
|
+
padding: 20px 32px 12px 32px
|
|
27
|
+
@media screen and (max-width: $device-mobile)
|
|
28
|
+
padding: 20px 24px 12px
|
|
29
|
+
h2.quot,h3.quot,h4.quot,h5.quot,h6.quot
|
|
30
|
+
font-size: $fs-h3
|
|
31
|
+
p.quot
|
|
32
|
+
font-size: $fs-h4
|
|
33
|
+
|
|
34
|
+
// type=text
|
|
35
|
+
.md .tag-plugin.quot[type=text]:not(span)
|
|
36
|
+
&:before,&:after
|
|
37
|
+
content: ""
|
|
38
|
+
position: absolute
|
|
39
|
+
width: 8px
|
|
40
|
+
height: 14px
|
|
41
|
+
&:before
|
|
42
|
+
top: 8px
|
|
43
|
+
left: 0
|
|
44
|
+
border-top: 6px solid $color-highlight
|
|
45
|
+
border-left: 6px solid $color-highlight
|
|
46
|
+
&:after
|
|
47
|
+
right: 0
|
|
48
|
+
bottom: 0
|
|
49
|
+
border-right: 6px solid $color-highlight
|
|
50
|
+
border-bottom: 6px solid $color-highlight
|
|
51
|
+
article.md.content h1.quot[type=text]
|
|
52
|
+
&:before,&:after
|
|
53
|
+
width: 12px
|
|
54
|
+
height: 20px
|
|
55
|
+
border-width: 8px
|
|
56
|
+
|
|
57
|
+
// type=icon
|
|
58
|
+
.md .tag-plugin.quot[type=icon]:not(span)
|
|
59
|
+
.icon
|
|
60
|
+
height: 1.5em
|
|
61
|
+
display: inline-block
|
|
62
|
+
color: $color-highlight
|
|
63
|
+
border-radius: 0
|
|
64
|
+
&.prefix
|
|
65
|
+
margin-right: .5rem
|
|
66
|
+
&.suffix
|
|
67
|
+
margin-left: .5rem
|
|
68
|
+
|
|
69
|
+
// inline quot
|
|
70
|
+
.md span.tag-plugin.quot
|
|
71
|
+
font-weight: 500
|
|
72
|
+
&:before,&:after
|
|
73
|
+
color: $color-highlight
|
|
74
|
+
font-weight: 900
|
|
75
|
+
&:before
|
|
76
|
+
content: "「"
|
|
77
|
+
margin-left: -0.125em
|
|
78
|
+
margin-right: 0.125em
|
|
79
|
+
&:after
|
|
80
|
+
content: "」"
|
|
81
|
+
margin-left: 0.125em
|
|
82
|
+
margin-right: -0.125em
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
font-weight: 500
|
|
10
10
|
.group-body
|
|
11
11
|
width: 100%
|
|
12
|
-
|
|
12
|
+
&+.group-header
|
|
13
|
+
margin-top: 2rem
|
|
13
14
|
.sitesjs-wrap
|
|
14
15
|
display: block
|
|
15
16
|
.loading-wrap
|
|
@@ -29,7 +30,6 @@
|
|
|
29
30
|
grid-template-columns: repeat(auto-fill, "calc((100% - 2 * %s) / 3)" % 1rem)
|
|
30
31
|
@media screen and (max-width: $device-mobile)
|
|
31
32
|
grid-template-columns: repeat(auto-fill, "calc((100% - 1 * %s) / 2)" % 1rem)
|
|
32
|
-
margin-bottom: 2rem
|
|
33
33
|
|
|
34
34
|
.sites-wrap .group-body .site-card .card-link
|
|
35
35
|
width: 100%
|
package/source/js/main.js
CHANGED
|
@@ -59,16 +59,16 @@ const util = {
|
|
|
59
59
|
|
|
60
60
|
const hud = {
|
|
61
61
|
toast: (msg, duration) => {
|
|
62
|
-
duration=isNaN(duration)?2000:duration;
|
|
62
|
+
duration = isNaN(duration) ? 2000 : duration;
|
|
63
63
|
var el = document.createElement('div');
|
|
64
64
|
el.classList.add('toast');
|
|
65
65
|
el.innerHTML = msg;
|
|
66
66
|
document.body.appendChild(el);
|
|
67
|
-
setTimeout(function() {
|
|
67
|
+
setTimeout(function () {
|
|
68
68
|
var d = 0.5;
|
|
69
69
|
el.style.webkitTransition = '-webkit-transform ' + d + 's ease-in, opacity ' + d + 's ease-in';
|
|
70
70
|
el.style.opacity = '0';
|
|
71
|
-
setTimeout(function() { document.body.removeChild(el) }, d * 1000);
|
|
71
|
+
setTimeout(function () { document.body.removeChild(el) }, d * 1000);
|
|
72
72
|
}, duration);
|
|
73
73
|
},
|
|
74
74
|
|
|
@@ -96,7 +96,7 @@ const init = {
|
|
|
96
96
|
segs.push(node)
|
|
97
97
|
});
|
|
98
98
|
// 滚动
|
|
99
|
-
$(document, window).scroll(function(e) {
|
|
99
|
+
$(document, window).scroll(function (e) {
|
|
100
100
|
var scrollTop = $(this).scrollTop();
|
|
101
101
|
var topSeg = null
|
|
102
102
|
for (var idx in segs) {
|
|
@@ -124,7 +124,7 @@ const init = {
|
|
|
124
124
|
},
|
|
125
125
|
sidebar: () => {
|
|
126
126
|
stellar.jQuery(() => {
|
|
127
|
-
$("#toc a.toc-link").click(function(e) {
|
|
127
|
+
$("#toc a.toc-link").click(function (e) {
|
|
128
128
|
l_body.classList.remove("sidebar");
|
|
129
129
|
});
|
|
130
130
|
})
|
|
@@ -142,7 +142,7 @@ const init = {
|
|
|
142
142
|
/**
|
|
143
143
|
* Tabs tag listener (without twitter bootstrap).
|
|
144
144
|
*/
|
|
145
|
-
registerTabsTag: function() {
|
|
145
|
+
registerTabsTag: function () {
|
|
146
146
|
// Binding `nav-tabs` & `tab-content` by real time permalink changing.
|
|
147
147
|
document.querySelectorAll('.tabs ul.nav-tabs .tab').forEach(element => {
|
|
148
148
|
element.addEventListener('click', event => {
|
|
@@ -192,7 +192,7 @@ if (stellar.plugins.scrollreveal) {
|
|
|
192
192
|
|
|
193
193
|
// lazyload
|
|
194
194
|
if (stellar.plugins.lazyload) {
|
|
195
|
-
stellar.loadScript(stellar.plugins.lazyload.js, {defer:true})
|
|
195
|
+
stellar.loadScript(stellar.plugins.lazyload.js, { defer: true })
|
|
196
196
|
// https://www.npmjs.com/package/vanilla-lazyload
|
|
197
197
|
// Set the options globally
|
|
198
198
|
// to make LazyLoad self-initialize
|
|
@@ -217,16 +217,16 @@ if (stellar.plugins.lazyload) {
|
|
|
217
217
|
if (stellar.plugins.sitesjs) {
|
|
218
218
|
const issues_api = document.getElementById('sites-api');
|
|
219
219
|
if (issues_api != undefined) {
|
|
220
|
-
stellar.jQuery(
|
|
221
|
-
stellar.loadScript(stellar.plugins.sitesjs, {defer:true})
|
|
220
|
+
stellar.jQuery(() => {
|
|
221
|
+
stellar.loadScript(stellar.plugins.sitesjs, { defer: true })
|
|
222
222
|
})
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
if (stellar.plugins.friendsjs) {
|
|
226
226
|
const issues_api = document.getElementById('friends-api');
|
|
227
227
|
if (issues_api != undefined) {
|
|
228
|
-
stellar.jQuery(
|
|
229
|
-
stellar.loadScript(stellar.plugins.friendsjs, {defer:true})
|
|
228
|
+
stellar.jQuery(() => {
|
|
229
|
+
stellar.loadScript(stellar.plugins.friendsjs, { defer: true })
|
|
230
230
|
})
|
|
231
231
|
}
|
|
232
232
|
}
|
|
@@ -236,7 +236,7 @@ if (stellar.plugins.swiper) {
|
|
|
236
236
|
const swiper_api = document.getElementById('swiper-api');
|
|
237
237
|
if (swiper_api != undefined) {
|
|
238
238
|
stellar.loadCSS(stellar.plugins.swiper.css);
|
|
239
|
-
stellar.loadScript(stellar.plugins.swiper.js, {defer:true}).then(function () {
|
|
239
|
+
stellar.loadScript(stellar.plugins.swiper.js, { defer: true }).then(function () {
|
|
240
240
|
var swiper = new Swiper('.swiper-container', {
|
|
241
241
|
slidesPerView: 'auto',
|
|
242
242
|
spaceBetween: 8,
|
|
@@ -270,6 +270,39 @@ if (stellar.plugins.preload) {
|
|
|
270
270
|
maxRPS: 5,
|
|
271
271
|
hoverDelay: 25
|
|
272
272
|
};
|
|
273
|
-
stellar.loadScript(stellar.plugins.preload.flying_pages, {defer:true})
|
|
273
|
+
stellar.loadScript(stellar.plugins.preload.flying_pages, { defer: true })
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
+
|
|
277
|
+
// fancybox
|
|
278
|
+
if (stellar.plugins.fancybox) {
|
|
279
|
+
let selector = 'img[fancybox]:not(.error)';
|
|
280
|
+
if (stellar.plugins.fancybox.selector) {
|
|
281
|
+
selector += `, ${stellar.plugins.fancybox.selector}`
|
|
282
|
+
}
|
|
283
|
+
if (document.querySelectorAll(selector).length !== 0) {
|
|
284
|
+
stellar.loadCSS(stellar.plugins.fancybox.css);
|
|
285
|
+
stellar.loadScript(stellar.plugins.fancybox.js, { defer: true }).then(function () {
|
|
286
|
+
Fancybox.bind(selector, {
|
|
287
|
+
groupAll: true,
|
|
288
|
+
hideScrollbar: false,
|
|
289
|
+
Thumbs: {
|
|
290
|
+
autoStart: false,
|
|
291
|
+
},
|
|
292
|
+
caption: function (fancybox, carousel, slide) {
|
|
293
|
+
return slide.$trigger.alt || null
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
})
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// heti
|
|
301
|
+
if (stellar.plugins.heti) {
|
|
302
|
+
stellar.loadCSS(stellar.plugins.heti.css);
|
|
303
|
+
stellar.loadScript(stellar.plugins.heti.js, { defer: true }).then(function () {
|
|
304
|
+
const heti = new Heti('.heti p');
|
|
305
|
+
heti.autoSpacing();
|
|
306
|
+
stellar.plugins.heti.enable = false;
|
|
307
|
+
});
|
|
308
|
+
}
|