jekyll-theme-chirpy 4.3.4 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/_config.yml +9 -5
- data/_data/locales/en.yml +2 -1
- data/_data/locales/id-ID.yml +2 -1
- data/_data/locales/ko-KR.yml +91 -0
- data/_data/locales/zh-CN.yml +2 -1
- data/_includes/{disqus.html → comments/disqus.html} +4 -4
- data/_includes/comments/utterances.html +51 -0
- data/_includes/comments.html +5 -0
- data/_includes/footer.html +1 -1
- data/_includes/js-selector.html +1 -1
- data/_includes/mermaid.html +28 -0
- data/_includes/mode-toggle.html +48 -65
- data/_includes/read-time.html +3 -3
- data/_includes/refactor-content.html +109 -35
- data/_includes/related-posts.html +1 -1
- data/_includes/search-results.html +0 -8
- data/_includes/sidebar.html +10 -11
- data/_includes/timeago.html +11 -12
- data/_includes/toc.html +16 -0
- data/_includes/topbar.html +1 -1
- data/_includes/trending-tags.html +14 -0
- data/_includes/update-list.html +16 -0
- data/_layouts/default.html +6 -2
- data/_layouts/home.html +12 -9
- data/_layouts/page.html +45 -22
- data/_layouts/post.html +128 -127
- data/_sass/addon/commons.scss +154 -175
- data/_sass/addon/module.scss +48 -28
- data/_sass/addon/syntax.scss +55 -44
- data/_sass/addon/variables.scss +1 -1
- data/_sass/colors/dark-syntax.scss +3 -4
- data/_sass/colors/dark-typography.scss +11 -8
- data/_sass/colors/light-syntax.scss +3 -3
- data/_sass/colors/light-typography.scss +4 -5
- data/_sass/jekyll-theme-chirpy.scss +1 -1
- data/_sass/layout/home.scss +6 -2
- data/_sass/layout/post.scss +52 -46
- data/assets/js/dist/categories.min.js +2 -2
- data/assets/js/dist/commons.min.js +2 -2
- data/assets/js/dist/home.min.js +2 -2
- data/assets/js/dist/page.min.js +2 -2
- data/assets/js/dist/post.min.js +2 -2
- data/assets/js/dist/pvreport.min.js +2 -2
- metadata +7 -4
- data/_includes/panel.html +0 -59
data/_sass/addon/syntax.scss
CHANGED
@@ -38,13 +38,8 @@ $code-radius: 6px;
|
|
38
38
|
}
|
39
39
|
|
40
40
|
%code-snippet-padding {
|
41
|
-
padding:
|
42
|
-
|
43
|
-
|
44
|
-
div > pre {
|
45
|
-
@extend %code-snippet-bg;
|
46
|
-
@extend %code-snippet-radius;
|
47
|
-
@extend %code-snippet-padding;
|
41
|
+
padding-left: 1rem;
|
42
|
+
padding-right: 1.5rem;
|
48
43
|
}
|
49
44
|
|
50
45
|
.highlighter-rouge {
|
@@ -65,6 +60,8 @@ div > pre {
|
|
65
60
|
}
|
66
61
|
|
67
62
|
overflow: auto;
|
63
|
+
padding-top: 0.5rem;
|
64
|
+
padding-bottom: 1rem;
|
68
65
|
|
69
66
|
pre {
|
70
67
|
margin-bottom: 0;
|
@@ -74,20 +71,12 @@ div > pre {
|
|
74
71
|
}
|
75
72
|
|
76
73
|
table {
|
77
|
-
padding: 0;
|
78
|
-
border: 0;
|
79
|
-
|
80
74
|
td pre {
|
81
75
|
overflow: visible; /* Fixed iOS safari overflow-x */
|
82
76
|
word-break: normal; /* Fixed iOS safari linenos code break */
|
83
77
|
}
|
84
78
|
}
|
85
79
|
|
86
|
-
td {
|
87
|
-
padding: 0;
|
88
|
-
border: 0;
|
89
|
-
}
|
90
|
-
|
91
80
|
.lineno {
|
92
81
|
padding-right: 0.5rem;
|
93
82
|
min-width: 2.2rem;
|
@@ -121,22 +110,26 @@ code {
|
|
121
110
|
background-color: var(--inline-code-bg);
|
122
111
|
}
|
123
112
|
|
124
|
-
|
113
|
+
a > &.highlighter-rouge {
|
125
114
|
padding-bottom: 0; // show link's underlinke
|
126
115
|
color: inherit;
|
127
116
|
}
|
128
117
|
|
129
|
-
|
118
|
+
a:hover > &.highlighter-rouge {
|
130
119
|
border-bottom: none;
|
131
120
|
}
|
132
121
|
|
133
122
|
blockquote &.highlighter-rouge {
|
134
123
|
color: inherit;
|
135
124
|
}
|
125
|
+
|
126
|
+
.highlight > & {
|
127
|
+
color: transparent;
|
128
|
+
}
|
136
129
|
}
|
137
130
|
|
138
131
|
td.rouge-code {
|
139
|
-
padding
|
132
|
+
@extend %code-snippet-padding;
|
140
133
|
|
141
134
|
// Prevent some browser extends from
|
142
135
|
// changing the URL string of code block.
|
@@ -160,62 +153,80 @@ div {
|
|
160
153
|
}
|
161
154
|
|
162
155
|
td.rouge-code {
|
163
|
-
|
156
|
+
padding-left: 1.5rem;
|
164
157
|
}
|
165
158
|
}
|
166
159
|
}
|
167
160
|
|
168
161
|
.code-header {
|
169
|
-
|
162
|
+
@extend %no-cursor;
|
163
|
+
|
164
|
+
$code-header-height: 2.25rem;
|
165
|
+
|
170
166
|
border-top-left-radius: $code-radius;
|
171
167
|
border-top-right-radius: $code-radius;
|
172
168
|
display: flex;
|
173
169
|
justify-content: space-between;
|
174
170
|
align-items: center;
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
171
|
+
height: $code-header-height;
|
172
|
+
|
173
|
+
&::before {
|
174
|
+
$dot-size: 0.75rem;
|
175
|
+
$dot-margin: 0.5rem;
|
176
|
+
|
177
|
+
content: "";
|
178
|
+
display: inline-block;
|
179
|
+
margin-left: 1rem;
|
180
|
+
width: $dot-size;
|
181
|
+
height: $dot-size;
|
182
|
+
border-radius: 50%;
|
183
|
+
background-color: var(--code-header-muted-color);
|
184
|
+
box-shadow:
|
185
|
+
($dot-size + $dot-margin) 0 0 var(--code-header-muted-color),
|
186
|
+
($dot-size + $dot-margin) * 2 0 0 var(--code-header-muted-color);
|
185
187
|
}
|
186
188
|
|
187
189
|
// the label block
|
188
190
|
span {
|
189
|
-
|
190
|
-
|
191
|
-
&::after {
|
192
|
-
content: attr(text-data);
|
193
|
-
font-size: 0.85rem;
|
194
|
-
font-weight: 600;
|
195
|
-
color: var(--lang-badge-color);
|
196
|
-
}
|
197
|
-
|
191
|
+
// label icon
|
198
192
|
i {
|
199
|
-
|
193
|
+
font-size: 1rem;
|
194
|
+
margin-right: 0.4rem;
|
195
|
+
color: var(--code-header-icon-color);
|
196
|
+
|
197
|
+
&.small {
|
198
|
+
font-size: 70%;
|
199
|
+
}
|
200
200
|
}
|
201
201
|
|
202
202
|
@at-root [file] #{&} > i {
|
203
203
|
position: relative;
|
204
204
|
top: 1px; // center the file icon
|
205
|
-
margin-left: 0.25rem;
|
206
205
|
}
|
207
206
|
|
207
|
+
// label text
|
208
|
+
&::after {
|
209
|
+
content: attr(label-text);
|
210
|
+
font-size: 0.85rem;
|
211
|
+
font-weight: 600;
|
212
|
+
color: var(--code-header-text-color);
|
213
|
+
}
|
208
214
|
}
|
209
215
|
|
210
216
|
// clipboard
|
211
217
|
button {
|
212
|
-
|
218
|
+
@extend %cursor-pointer;
|
219
|
+
|
220
|
+
border: 1px solid transparent;
|
213
221
|
border-radius: $code-radius;
|
222
|
+
height: $code-header-height;
|
223
|
+
width: $code-header-height;
|
214
224
|
padding: 0;
|
215
|
-
width: 1.95rem;
|
216
225
|
background-color: inherit;
|
217
226
|
|
218
|
-
|
227
|
+
i {
|
228
|
+
color: var(--code-header-icon-color);
|
229
|
+
}
|
219
230
|
|
220
231
|
&[timeout] {
|
221
232
|
&:hover {
|
data/_sass/addon/variables.scss
CHANGED
@@ -74,9 +74,9 @@
|
|
74
74
|
--highlighter-rouge-color: #de6b18;
|
75
75
|
--highlight-lineno-color: #6c6c6d;
|
76
76
|
--inline-code-bg: #272822;
|
77
|
-
--code-header-
|
78
|
-
--
|
79
|
-
--
|
77
|
+
--code-header-text-color: #6a6a6a;
|
78
|
+
--code-header-muted-color: rgb(60 60 60);
|
79
|
+
--code-header-icon-color: rgb(86 86 86);
|
80
80
|
--clipboard-checked-color: #2bcc2b;
|
81
81
|
|
82
82
|
.highlight {
|
@@ -84,5 +84,4 @@
|
|
84
84
|
}
|
85
85
|
|
86
86
|
pre { color: #bfbfbf; } /* override Bootstrap */
|
87
|
-
kbd { background-color: black; }
|
88
87
|
}
|
@@ -8,8 +8,6 @@
|
|
8
8
|
--mask-bg: rgb(68, 69, 70);
|
9
9
|
--main-wrapper-bg: rgb(27, 27, 30);
|
10
10
|
--main-border-color: rgb(44, 45, 45);
|
11
|
-
--scrollbar-track-bg: rgba(0, 0, 0, 0.3);
|
12
|
-
--scrollbar-thumb-bg: rgb(173 171 171 / 50%);
|
13
11
|
|
14
12
|
/* Common color */
|
15
13
|
--text-color: rgb(175, 176, 177);
|
@@ -67,6 +65,10 @@
|
|
67
65
|
--card-bg: rgb(39, 40, 43);
|
68
66
|
--card-border-color: rgb(53, 53, 60);
|
69
67
|
--card-box-shadow: var(--main-wrapper-bg);
|
68
|
+
--preview-img-bg: radial-gradient(circle, rgb(22 22 24) 0%, rgb(32 32 32) 100%);
|
69
|
+
--kbd-wrap-color: #6a6a6a;
|
70
|
+
--kbd-text-color: #d3d3d3;
|
71
|
+
--kbd-bg-color: #242424;
|
70
72
|
|
71
73
|
/* tags */
|
72
74
|
--tag-border: rgb(59, 79, 88);
|
@@ -84,12 +86,8 @@
|
|
84
86
|
--timeline-color: rgb(63, 65, 68);
|
85
87
|
--timeline-year-dot-color: var(--timeline-color);
|
86
88
|
|
87
|
-
|
88
|
-
|
89
|
-
--footer-link: rgb(171, 171, 171);
|
90
|
-
|
91
|
-
.post-content img {
|
92
|
-
filter: brightness(90%);
|
89
|
+
.post img[data-src] {
|
90
|
+
filter: brightness(95%);
|
93
91
|
}
|
94
92
|
|
95
93
|
hr {
|
@@ -139,7 +137,12 @@
|
|
139
137
|
rgb(39, 39, 45),
|
140
138
|
rgb(26, 26, 30)
|
141
139
|
);
|
140
|
+
}
|
141
|
+
|
142
|
+
color-scheme: dark;
|
142
143
|
|
144
|
+
#disqus_thread {
|
145
|
+
color-scheme: none;
|
143
146
|
}
|
144
147
|
|
145
148
|
} // dark-scheme
|
@@ -71,9 +71,9 @@
|
|
71
71
|
--highlighter-rouge-color: #2f2f2f;
|
72
72
|
--highlight-lineno-color: #c2c6cc;
|
73
73
|
--inline-code-bg: #f3f3f3;
|
74
|
-
--code-header-
|
75
|
-
--
|
76
|
-
--
|
74
|
+
--code-header-text-color: #a3a3b1;
|
75
|
+
--code-header-muted-color: #ebebeb;
|
76
|
+
--code-header-icon-color: #d1d1d1;
|
77
77
|
--clipboard-checked-color: #43c743;
|
78
78
|
|
79
79
|
} // light-syntax
|
@@ -8,8 +8,6 @@
|
|
8
8
|
--mask-bg: #c1c3c5;
|
9
9
|
--main-wrapper-bg: white;
|
10
10
|
--main-border-color: #f3f3f3;
|
11
|
-
--scrollbar-track-bg: rgba(0, 0, 0, 0.3);
|
12
|
-
--scrollbar-thumb-bg: rgba(0, 0, 0, 0.3);
|
13
11
|
|
14
12
|
/* Common color */
|
15
13
|
--text-color: #34343c;
|
@@ -66,6 +64,10 @@
|
|
66
64
|
--tb-odd-bg: #fbfcfd;
|
67
65
|
--tb-border-color: #eaeaea;
|
68
66
|
--dash-color: silver;
|
67
|
+
--preview-img-bg: radial-gradient(circle, rgb(255 255 255) 0%, rgb(249 249 249) 100%);
|
68
|
+
--kbd-wrap-color: #bdbdbd;
|
69
|
+
--kbd-text-color: var(--text-color);
|
70
|
+
--kbd-bg-color: white;
|
69
71
|
|
70
72
|
/* Categories */
|
71
73
|
--categories-hover-bg: var(--btn-border-color);
|
@@ -76,7 +78,4 @@
|
|
76
78
|
--timeline-node-bg: #c2c6cc;
|
77
79
|
--timeline-year-dot-color: #ffffff;
|
78
80
|
|
79
|
-
/* Footer */
|
80
|
-
--footer-bg-color: #ffffff;
|
81
|
-
--footer-link: #424242;
|
82
81
|
} // light-scheme
|
data/_sass/layout/home.scss
CHANGED
data/_sass/layout/post.scss
CHANGED
@@ -16,27 +16,37 @@
|
|
16
16
|
border-color: var(--btn-border-color);
|
17
17
|
}
|
18
18
|
|
19
|
-
@mixin dot($pl: 0.
|
19
|
+
@mixin dot($pl: 0.25rem, $pr: 0.25rem) {
|
20
20
|
content: "\2022";
|
21
|
-
color: rgba(158, 158, 158, 0.8);
|
22
21
|
padding-left: $pl;
|
23
22
|
padding-right: $pr;
|
24
23
|
}
|
25
24
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
25
|
+
%text-color {
|
26
|
+
color: var(--text-color);
|
27
|
+
}
|
28
|
+
|
29
|
+
h1 + .post-meta {
|
30
|
+
span + span::before {
|
31
|
+
@include dot;
|
32
|
+
}
|
33
|
+
|
34
|
+
em {
|
35
|
+
@extend %text-color;
|
36
|
+
|
37
|
+
a {
|
38
|
+
@extend %text-color;
|
30
39
|
}
|
31
40
|
}
|
32
41
|
}
|
33
42
|
|
34
|
-
.
|
35
|
-
|
36
|
-
|
43
|
+
img.preview-img {
|
44
|
+
margin-top: 3.75rem;
|
45
|
+
margin-bottom: 0;
|
46
|
+
border-radius: 6px;
|
37
47
|
|
38
|
-
|
39
|
-
|
48
|
+
&.bg[data-loaded=true] {
|
49
|
+
background: var(--preview-img-bg);
|
40
50
|
}
|
41
51
|
}
|
42
52
|
|
@@ -44,6 +54,10 @@
|
|
44
54
|
margin-top: 6rem;
|
45
55
|
border-bottom: 1px double var(--main-border-color);
|
46
56
|
font-size: 0.85rem;
|
57
|
+
|
58
|
+
.post-meta a {
|
59
|
+
@extend %link-underline;
|
60
|
+
}
|
47
61
|
}
|
48
62
|
|
49
63
|
.post-tags {
|
@@ -109,7 +123,7 @@
|
|
109
123
|
white-space: normal;
|
110
124
|
}
|
111
125
|
|
112
|
-
}
|
126
|
+
} /* .post-navigation */
|
113
127
|
|
114
128
|
@keyframes fade-up {
|
115
129
|
from {
|
@@ -131,14 +145,6 @@
|
|
131
145
|
top: 4rem;
|
132
146
|
transition: top 0.2s ease-in-out;
|
133
147
|
animation: fade-up 0.8s;
|
134
|
-
|
135
|
-
&.topbar-down {
|
136
|
-
top: 6rem;
|
137
|
-
}
|
138
|
-
|
139
|
-
> span {
|
140
|
-
@include panel-label;
|
141
|
-
}
|
142
148
|
}
|
143
149
|
|
144
150
|
#toc li a {
|
@@ -165,6 +171,10 @@ nav[data-toggle=toc] {
|
|
165
171
|
@include label(1.1rem, 600);
|
166
172
|
}
|
167
173
|
|
174
|
+
em {
|
175
|
+
@extend %normal-font-style;
|
176
|
+
}
|
177
|
+
|
168
178
|
.card {
|
169
179
|
border-color: var(--card-border-color);
|
170
180
|
background-color: var(--card-bg);
|
@@ -174,7 +184,7 @@ nav[data-toggle=toc] {
|
|
174
184
|
transition: all 0.3s ease-in-out;
|
175
185
|
|
176
186
|
h3 {
|
177
|
-
|
187
|
+
@extend %text-color;
|
178
188
|
}
|
179
189
|
|
180
190
|
&:hover {
|
@@ -220,14 +230,17 @@ nav[data-toggle=toc] {
|
|
220
230
|
}
|
221
231
|
}
|
222
232
|
|
223
|
-
#
|
233
|
+
#tail-wrapper {
|
224
234
|
min-height: 2rem;
|
225
235
|
|
226
|
-
|
227
|
-
min-height: 7.5rem;
|
236
|
+
> div:last-of-type {
|
228
237
|
margin-bottom: 2rem;
|
229
238
|
}
|
230
239
|
|
240
|
+
#disqus_thread {
|
241
|
+
min-height: 8.5rem;
|
242
|
+
}
|
243
|
+
|
231
244
|
}
|
232
245
|
|
233
246
|
.post-tail-bottom a {
|
@@ -288,13 +301,13 @@ nav[data-toggle=toc] {
|
|
288
301
|
}
|
289
302
|
}
|
290
303
|
|
291
|
-
}
|
304
|
+
} /* .share-icons */
|
292
305
|
|
293
306
|
.fas.fa-link {
|
294
307
|
@include btn-sharing-color(rgb(171, 171, 171));
|
295
308
|
}
|
296
309
|
|
297
|
-
}
|
310
|
+
} /* .share-wrapper */
|
298
311
|
|
299
312
|
.share-label {
|
300
313
|
@include label(inherit, 400, inherit);
|
@@ -308,7 +321,7 @@ nav[data-toggle=toc] {
|
|
308
321
|
line-height: 1.2rem;
|
309
322
|
|
310
323
|
> a {
|
311
|
-
|
324
|
+
color: var(--text-color);
|
312
325
|
|
313
326
|
&:hover {
|
314
327
|
@extend %link-hover;
|
@@ -318,9 +331,14 @@ nav[data-toggle=toc] {
|
|
318
331
|
span:last-child {
|
319
332
|
font-size: 0.85rem;
|
320
333
|
}
|
321
|
-
|
334
|
+
|
335
|
+
} /* .license-wrapper */
|
322
336
|
|
323
337
|
@media all and (max-width: 576px) {
|
338
|
+
.preview-img[data-src] {
|
339
|
+
margin-top: 2.2rem;
|
340
|
+
}
|
341
|
+
|
324
342
|
.post-tail-bottom {
|
325
343
|
-ms-flex-wrap: wrap-reverse !important;
|
326
344
|
flex-wrap: wrap-reverse !important;
|
@@ -338,29 +356,17 @@ nav[data-toggle=toc] {
|
|
338
356
|
}
|
339
357
|
}
|
340
358
|
|
341
|
-
@media all and (min-width: 768px) {
|
342
|
-
#post-wrapper {
|
343
|
-
.post-meta {
|
344
|
-
> div:not(:first-child)::before {
|
345
|
-
@include dot(0.5rem, 0.2rem);
|
346
|
-
}
|
347
|
-
|
348
|
-
&.flex-column {
|
349
|
-
-webkit-box-orient: horizontal !important;
|
350
|
-
-webkit-box-direction: normal !important;
|
351
|
-
-ms-flex-direction: row !important;
|
352
|
-
flex-direction: row !important;
|
353
|
-
}
|
354
|
-
}
|
355
|
-
} // .post
|
356
|
-
}
|
357
|
-
|
358
359
|
/* Hide SideBar and TOC */
|
359
|
-
@media all and (max-width:
|
360
|
+
@media all and (max-width: 849px) {
|
360
361
|
.post-navigation {
|
361
362
|
padding-left: 0;
|
362
363
|
padding-right: 0;
|
363
364
|
margin-left: -0.5rem;
|
364
365
|
margin-right: -0.5rem;
|
365
366
|
}
|
367
|
+
|
368
|
+
.preview-img[data-src] {
|
369
|
+
max-width: 100vw;
|
370
|
+
border-radius: 0;
|
371
|
+
}
|
366
372
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* Chirpy
|
2
|
+
* Chirpy v5.0.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
3
3
|
* © 2019 Cotes Chung
|
4
4
|
* MIT Licensed
|
5
5
|
*/
|
6
|
-
$(function(){$(window).scroll(()=>{
|
6
|
+
$(function(){$(window).scroll(()=>{50<$(this).scrollTop()&&"none"===$("#sidebar-trigger").css("display")?$("#back-to-top").fadeIn():$("#back-to-top").fadeOut()}),$("#back-to-top").click(()=>($("body,html").animate({scrollTop:0},800),!1))}),$(function(){$(".mode-toggle").click(e=>{const o=$(e.target);let t=o.prop("tagName")==="button".toUpperCase()?o:o.parent();t.blur(),flipMode()})}),$(function(){const e=$("#sidebar-trigger"),o=$("#search-trigger"),t=$("#search-cancel"),s=$("#search-cleaner"),a=$("#main"),l=$("#topbar-title"),r=$("#search-wrapper"),n=$("#search-result-wrapper"),d=$("#search-results"),i=$("#search-input"),c=$("#search-hints"),u=function(){let e=0;return{block(){e=window.scrollY,$("html,body").scrollTop(0)},release(){$("html,body").scrollTop(e)},getOffset(){return e}}}(),f={on(){e.addClass("unloaded"),l.addClass("unloaded"),o.addClass("unloaded"),r.addClass("d-flex"),t.addClass("loaded")},off(){t.removeClass("loaded"),r.removeClass("d-flex"),e.removeClass("unloaded"),l.removeClass("unloaded"),o.removeClass("unloaded")}},p=function(){let e=!1;return{on(){e||(u.block(),n.removeClass("unloaded"),a.addClass("unloaded"),e=!0)},off(){e&&(d.empty(),c.hasClass("unloaded")&&c.removeClass("unloaded"),n.addClass("unloaded"),s.removeClass("visible"),a.removeClass("unloaded"),u.release(),i.val(""),e=!1)},isVisible(){return e}}}();function h(){return t.hasClass("loaded")}o.click(function(){f.on(),p.on(),i.focus()}),t.click(function(){f.off(),p.off()}),i.focus(function(){r.addClass("input-focus")}),i.focusout(function(){r.removeClass("input-focus")}),i.on("keyup",function(e){8===e.keyCode&&""===i.val()?h()?c.removeClass("unloaded"):p.off():""!==i.val()&&(p.on(),s.hasClass("visible")||s.addClass("visible"),h()&&c.addClass("unloaded"))}),s.on("click",function(){i.val(""),h()?(c.removeClass("unloaded"),d.empty()):p.off(),i.focus(),s.removeClass("visible")})}),$(function(){var e=function(){const e="sidebar-display";let o=!1;const t=$("body");return{toggle(){!1===o?t.attr(e,""):t.removeAttr(e),o=!o}}}();$("#sidebar-trigger").click(e.toggle),$("#mask").click(e.toggle)}),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){const t=$("#topbar-wrapper"),s=$("#panel-wrapper"),a=$("#search-input"),l="topbar-up",r="topbar-down",n="toc-scrolling-up";let o,d=0;const i=t.outerHeight(),c=t.outerHeight();$(window).scroll(function(e){$("#topbar-title").is(":hidden")&&(o=!0)}),setInterval(function(){o&&(function(){var e,o=$(this).scrollTop();Math.abs(d-o)<=i||(o>d?o>c&&(t.removeClass(r).addClass(l),s.removeClass(r),a.is(":focus")&&a.blur()):o+$(window).height()<$(document).height()&&(void 0!==(e=t.attr(n))?"false"===e&&t.removeAttr(n):(t.removeClass(l).addClass(r),s.addClass(r))),d=o)}(),o=!1)},250)}),$(function(){const e=$("#topbar-title"),o=$("div.post>h1"),t=e.text().trim();let s=(0<o.length?o:$("h1")).text().trim();($("#page-category").length||$("#page-tag").length)&&/\s/.test(s)&&(s=s.replace(/[0-9]/g,"").trim()),$(window).scroll(function(){return!($("#post-list").length||o.is(":hidden")||e.is(":hidden")||$("#sidebar.sidebar-expand").length)&&void(95<=$(this).scrollTop()?e.text()!==s&&e.text(s):e.text()!==t&&e.text(t))}),e.click(function(){$("body,html").animate({scrollTop:0},800)})}),$(function(){const e=$(".collapse");e.on("hide.bs.collapse",function(){var e="h_"+$(this).attr("id").substring("l_".length);e&&($(`#${e} .far.fa-folder-open`).attr("class","far fa-folder fa-fw"),$(`#${e} i.fas`).addClass("rotate"),$("#"+e).removeClass("hide-border-bottom"))}),e.on("show.bs.collapse",function(){var e="h_"+$(this).attr("id").substring("l_".length);e&&($(`#${e} .far.fa-folder`).attr("class","far fa-folder-open fa-fw"),$(`#${e} i.fas`).removeClass("rotate"),$("#"+e).addClass("hide-border-bottom"))})});
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* Chirpy
|
2
|
+
* Chirpy v5.0.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
3
3
|
* © 2019 Cotes Chung
|
4
4
|
* MIT Licensed
|
5
5
|
*/
|
6
|
-
$(function(){$(window).scroll(()=>{
|
6
|
+
$(function(){$(window).scroll(()=>{50<$(this).scrollTop()&&"none"===$("#sidebar-trigger").css("display")?$("#back-to-top").fadeIn():$("#back-to-top").fadeOut()}),$("#back-to-top").click(()=>($("body,html").animate({scrollTop:0},800),!1))}),$(function(){$(".mode-toggle").click(e=>{const o=$(e.target);let t=o.prop("tagName")==="button".toUpperCase()?o:o.parent();t.blur(),flipMode()})}),$(function(){const e=$("#sidebar-trigger"),o=$("#search-trigger"),t=$("#search-cancel"),s=$("#search-cleaner"),l=$("#main"),a=$("#topbar-title"),n=$("#search-wrapper"),r=$("#search-result-wrapper"),d=$("#search-results"),i=$("#search-input"),c=$("#search-hints"),u=function(){let e=0;return{block(){e=window.scrollY,$("html,body").scrollTop(0)},release(){$("html,body").scrollTop(e)},getOffset(){return e}}}(),p={on(){e.addClass("unloaded"),a.addClass("unloaded"),o.addClass("unloaded"),n.addClass("d-flex"),t.addClass("loaded")},off(){t.removeClass("loaded"),n.removeClass("d-flex"),e.removeClass("unloaded"),a.removeClass("unloaded"),o.removeClass("unloaded")}},f=function(){let e=!1;return{on(){e||(u.block(),r.removeClass("unloaded"),l.addClass("unloaded"),e=!0)},off(){e&&(d.empty(),c.hasClass("unloaded")&&c.removeClass("unloaded"),r.addClass("unloaded"),s.removeClass("visible"),l.removeClass("unloaded"),u.release(),i.val(""),e=!1)},isVisible(){return e}}}();function h(){return t.hasClass("loaded")}o.click(function(){p.on(),f.on(),i.focus()}),t.click(function(){p.off(),f.off()}),i.focus(function(){n.addClass("input-focus")}),i.focusout(function(){n.removeClass("input-focus")}),i.on("keyup",function(e){8===e.keyCode&&""===i.val()?h()?c.removeClass("unloaded"):f.off():""!==i.val()&&(f.on(),s.hasClass("visible")||s.addClass("visible"),h()&&c.addClass("unloaded"))}),s.on("click",function(){i.val(""),h()?(c.removeClass("unloaded"),d.empty()):f.off(),i.focus(),s.removeClass("visible")})}),$(function(){var e=function(){const e="sidebar-display";let o=!1;const t=$("body");return{toggle(){!1===o?t.attr(e,""):t.removeAttr(e),o=!o}}}();$("#sidebar-trigger").click(e.toggle),$("#mask").click(e.toggle)}),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){const t=$("#topbar-wrapper"),s=$("#panel-wrapper"),l=$("#search-input"),a="topbar-up",n="topbar-down",r="toc-scrolling-up";let o,d=0;const i=t.outerHeight(),c=t.outerHeight();$(window).scroll(function(e){$("#topbar-title").is(":hidden")&&(o=!0)}),setInterval(function(){o&&(function(){var e,o=$(this).scrollTop();Math.abs(d-o)<=i||(o>d?o>c&&(t.removeClass(n).addClass(a),s.removeClass(n),l.is(":focus")&&l.blur()):o+$(window).height()<$(document).height()&&(void 0!==(e=t.attr(r))?"false"===e&&t.removeAttr(r):(t.removeClass(a).addClass(n),s.addClass(n))),d=o)}(),o=!1)},250)}),$(function(){const e=$("#topbar-title"),o=$("div.post>h1"),t=e.text().trim();let s=(0<o.length?o:$("h1")).text().trim();($("#page-category").length||$("#page-tag").length)&&/\s/.test(s)&&(s=s.replace(/[0-9]/g,"").trim()),$(window).scroll(function(){return!($("#post-list").length||o.is(":hidden")||e.is(":hidden")||$("#sidebar.sidebar-expand").length)&&void(95<=$(this).scrollTop()?e.text()!==s&&e.text(s):e.text()!==t&&e.text(t))}),e.click(function(){$("body,html").animate({scrollTop:0},800)})});
|
data/assets/js/dist/home.min.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* Chirpy
|
2
|
+
* Chirpy v5.0.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
3
3
|
* © 2019 Cotes Chung
|
4
4
|
* MIT Licensed
|
5
5
|
*/
|
6
|
-
$(function(){$(window).scroll(()=>{
|
6
|
+
$(function(){$(window).scroll(()=>{50<$(this).scrollTop()&&"none"===$("#sidebar-trigger").css("display")?$("#back-to-top").fadeIn():$("#back-to-top").fadeOut()}),$("#back-to-top").click(()=>($("body,html").animate({scrollTop:0},800),!1))}),$(function(){$(".mode-toggle").click(t=>{const e=$(t.target);let o=e.prop("tagName")==="button".toUpperCase()?e:e.parent();o.blur(),flipMode()})}),$(function(){const t=$("#sidebar-trigger"),e=$("#search-trigger"),o=$("#search-cancel"),a=$("#search-cleaner"),s=$("#main"),l=$("#topbar-title"),n=$("#search-wrapper"),r=$("#search-result-wrapper"),i=$("#search-results"),d=$("#search-input"),c=$("#search-hints"),u=function(){let t=0;return{block(){t=window.scrollY,$("html,body").scrollTop(0)},release(){$("html,body").scrollTop(t)},getOffset(){return t}}}(),p={on(){t.addClass("unloaded"),l.addClass("unloaded"),e.addClass("unloaded"),n.addClass("d-flex"),o.addClass("loaded")},off(){o.removeClass("loaded"),n.removeClass("d-flex"),t.removeClass("unloaded"),l.removeClass("unloaded"),e.removeClass("unloaded")}},f=function(){let t=!1;return{on(){t||(u.block(),r.removeClass("unloaded"),s.addClass("unloaded"),t=!0)},off(){t&&(i.empty(),c.hasClass("unloaded")&&c.removeClass("unloaded"),r.addClass("unloaded"),a.removeClass("visible"),s.removeClass("unloaded"),u.release(),d.val(""),t=!1)},isVisible(){return t}}}();function h(){return o.hasClass("loaded")}e.click(function(){p.on(),f.on(),d.focus()}),o.click(function(){p.off(),f.off()}),d.focus(function(){n.addClass("input-focus")}),d.focusout(function(){n.removeClass("input-focus")}),d.on("keyup",function(t){8===t.keyCode&&""===d.val()?h()?c.removeClass("unloaded"):f.off():""!==d.val()&&(f.on(),a.hasClass("visible")||a.addClass("visible"),h()&&c.addClass("unloaded"))}),a.on("click",function(){d.val(""),h()?(c.removeClass("unloaded"),i.empty()):f.off(),d.focus(),a.removeClass("visible")})}),$(function(){var t=function(){const t="sidebar-display";let e=!1;const o=$("body");return{toggle(){!1===e?o.attr(t,""):o.removeAttr(t),e=!e}}}();$("#sidebar-trigger").click(t.toggle),$("#mask").click(t.toggle)}),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){const o=$("#topbar-wrapper"),a=$("#panel-wrapper"),s=$("#search-input"),l="topbar-up",n="topbar-down",r="toc-scrolling-up";let e,i=0;const d=o.outerHeight(),c=o.outerHeight();$(window).scroll(function(t){$("#topbar-title").is(":hidden")&&(e=!0)}),setInterval(function(){e&&(function(){var t,e=$(this).scrollTop();Math.abs(i-e)<=d||(e>i?e>c&&(o.removeClass(n).addClass(l),a.removeClass(n),s.is(":focus")&&s.blur()):e+$(window).height()<$(document).height()&&(void 0!==(t=o.attr(r))?"false"===t&&o.removeAttr(r):(o.removeClass(l).addClass(n),a.addClass(n))),i=e)}(),e=!1)},250)}),$(function(){const t=$("#topbar-title"),e=$("div.post>h1"),o=t.text().trim();let a=(0<e.length?e:$("h1")).text().trim();($("#page-category").length||$("#page-tag").length)&&/\s/.test(a)&&(a=a.replace(/[0-9]/g,"").trim()),$(window).scroll(function(){return!($("#post-list").length||e.is(":hidden")||t.is(":hidden")||$("#sidebar.sidebar-expand").length)&&void(95<=$(this).scrollTop()?t.text()!==a&&t.text(a):t.text()!==o&&t.text(o))}),t.click(function(){$("body,html").animate({scrollTop:0},800)})}),$(function(){let o=$(".timeago").length,t=void 0;const s=$("meta[name=day-prompt]").attr("content"),l=$("meta[name=hour-prompt]").attr("content"),n=$("meta[name=minute-prompt]").attr("content"),r=$("meta[name=justnow-prompt]").attr("content");function e(){return $(".timeago").each(function(){var t,e;!1!==$(this)[0].hasAttribute("date")?(e=function(t,e){let o=new Date,a=new Date(t);return a.getFullYear()!==o.getFullYear()||a.getMonth()!==o.getMonth()?e:(t=Math.floor((o-a)/1e3),1<=(e=Math.floor(t/86400))?` ${e} `+s:1<=(e=Math.floor(t/3600))?` ${e} `+l:1<=(t=Math.floor(t/60))?` ${t} `+n:r)}($(this).attr("date"),t=$(this).text()))===t?$(this).removeAttr("date"):$(this).text(e):--o}),0===o&&void 0!==t&&clearInterval(t),o}0!==o&&0<e()&&(t=setInterval(e,6e4))});
|