jekyll-theme-chirpy 5.3.0 → 5.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/_data/assets/cross_origin.yml +3 -3
- data/_data/assets/self_host.yml +2 -2
- data/_data/locales/en.yml +10 -0
- data/_data/locales/hu-HU.yml +2 -2
- data/_data/locales/ko-KR.yml +7 -0
- data/_data/locales/pt-BR.yml +1 -1
- data/_data/locales/zh-CN.yml +8 -1
- data/_includes/comments/disqus.html +11 -11
- data/_includes/comments/giscus.html +1 -1
- data/_includes/datetime.html +2 -8
- data/_includes/footer.html +26 -26
- data/_includes/head.html +15 -21
- data/_includes/js-selector.html +1 -5
- data/_includes/mermaid.html +12 -10
- data/_includes/post-nav.html +4 -4
- data/_includes/post-sharing.html +3 -3
- data/_includes/read-time.html +3 -3
- data/_includes/refactor-content.html +10 -12
- data/_includes/related-posts.html +1 -1
- data/_includes/search-loader.html +1 -1
- data/_includes/sidebar.html +3 -3
- data/_includes/toc.html +1 -1
- data/_includes/topbar.html +9 -9
- data/_includes/trending-tags.html +1 -1
- data/_includes/update-list.html +1 -1
- data/_layouts/archives.html +2 -9
- data/_layouts/categories.html +12 -14
- data/_layouts/category.html +0 -2
- data/_layouts/default.html +6 -9
- data/_layouts/home.html +1 -3
- data/_layouts/page.html +4 -6
- data/_layouts/post.html +10 -12
- data/_layouts/tag.html +0 -2
- data/_sass/addon/commons.scss +134 -136
- data/_sass/addon/module.scss +5 -2
- data/_sass/addon/syntax.scss +14 -20
- data/_sass/addon/variables.scss +0 -4
- data/_sass/colors/dark-syntax.scss +17 -18
- data/_sass/colors/dark-typography.scss +22 -22
- data/_sass/colors/light-syntax.scss +2 -3
- data/_sass/colors/light-typography.scss +13 -14
- data/_sass/jekyll-theme-chirpy.scss +1 -1
- data/_sass/layout/archives.scss +4 -12
- data/_sass/layout/categories.scss +12 -13
- data/_sass/layout/category-tag.scss +4 -4
- data/_sass/layout/home.scss +19 -25
- data/_sass/layout/post.scss +132 -136
- data/_sass/layout/tags.scss +1 -1
- data/assets/404.html +1 -3
- data/assets/js/data/search.json +3 -1
- data/assets/js/data/swcache.js +35 -36
- 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/misc.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
- data/assets/js/pwa/app.js +33 -33
- data/assets/js/pwa/sw.js +54 -53
- data/assets/js/pwa/unregister.js +5 -5
- metadata +2 -10
- data/_config.yml +0 -201
- data/_includes/lang.html +0 -8
- data/_plugins/posts-lastmod-hook.rb +0 -14
- data/_tabs/about.md +0 -8
- data/_tabs/archives.md +0 -6
- data/_tabs/categories.md +0 -5
- data/_tabs/tags.md +0 -5
- data/index.html +0 -4
data/_sass/layout/post.scss
CHANGED
@@ -26,6 +26,15 @@
|
|
26
26
|
color: var(--text-color);
|
27
27
|
}
|
28
28
|
|
29
|
+
img.preview-img {
|
30
|
+
margin: 0;
|
31
|
+
border-radius: 6px;
|
32
|
+
|
33
|
+
&.bg[data-loaded="true"] {
|
34
|
+
background: var(--preview-img-bg);
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
29
38
|
h1 + .post-meta {
|
30
39
|
span + span::before {
|
31
40
|
@include dot;
|
@@ -40,23 +49,96 @@ h1 + .post-meta {
|
|
40
49
|
}
|
41
50
|
}
|
42
51
|
|
43
|
-
img.preview-img {
|
44
|
-
margin: 0;
|
45
|
-
border-radius: 6px;
|
46
|
-
|
47
|
-
&.bg[data-loaded=true] {
|
48
|
-
background: var(--preview-img-bg);
|
49
|
-
}
|
50
|
-
}
|
51
|
-
|
52
52
|
.post-tail-wrapper {
|
53
53
|
margin-top: 6rem;
|
54
54
|
border-bottom: 1px double var(--main-border-color);
|
55
55
|
font-size: 0.85rem;
|
56
56
|
|
57
|
+
.post-tail-bottom a {
|
58
|
+
color: inherit;
|
59
|
+
}
|
60
|
+
|
61
|
+
.license-wrapper {
|
62
|
+
line-height: 1.2rem;
|
63
|
+
|
64
|
+
> a {
|
65
|
+
color: var(--text-color);
|
66
|
+
|
67
|
+
&:hover {
|
68
|
+
@extend %link-hover;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
|
72
|
+
span:last-child {
|
73
|
+
font-size: 0.85rem;
|
74
|
+
}
|
75
|
+
} /* .license-wrapper */
|
76
|
+
|
57
77
|
.post-meta a:not(:hover) {
|
58
78
|
@extend %link-underline;
|
59
79
|
}
|
80
|
+
|
81
|
+
.share-wrapper {
|
82
|
+
vertical-align: middle;
|
83
|
+
-webkit-user-select: none;
|
84
|
+
-moz-user-select: none;
|
85
|
+
user-select: none;
|
86
|
+
|
87
|
+
.share-icons {
|
88
|
+
font-size: 1.2rem;
|
89
|
+
|
90
|
+
> i {
|
91
|
+
position: relative;
|
92
|
+
bottom: 1px;
|
93
|
+
|
94
|
+
@extend %cursor-pointer;
|
95
|
+
|
96
|
+
&:hover {
|
97
|
+
@extend %btn-share-hovor;
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
101
|
+
a {
|
102
|
+
&:not(:last-child) {
|
103
|
+
margin-right: 0.25rem;
|
104
|
+
}
|
105
|
+
|
106
|
+
&:hover {
|
107
|
+
text-decoration: none;
|
108
|
+
|
109
|
+
>i {
|
110
|
+
@extend %btn-share-hovor;
|
111
|
+
}
|
112
|
+
}
|
113
|
+
}
|
114
|
+
|
115
|
+
.fab {
|
116
|
+
&.fa-twitter {
|
117
|
+
@include btn-sharing-color(rgba(29, 161, 242, 1));
|
118
|
+
}
|
119
|
+
|
120
|
+
&.fa-facebook-square {
|
121
|
+
@include btn-sharing-color(rgb(66, 95, 156));
|
122
|
+
}
|
123
|
+
|
124
|
+
&.fa-telegram {
|
125
|
+
@include btn-sharing-color(rgb(39, 159, 217));
|
126
|
+
}
|
127
|
+
|
128
|
+
&.fa-linkedin {
|
129
|
+
@include btn-sharing-color(rgb(0, 119, 181));
|
130
|
+
}
|
131
|
+
|
132
|
+
&.fa-weibo {
|
133
|
+
@include btn-sharing-color(rgb(229, 20, 43));
|
134
|
+
}
|
135
|
+
}
|
136
|
+
} /* .share-icons */
|
137
|
+
|
138
|
+
.fas.fa-link {
|
139
|
+
@include btn-sharing-color(rgb(171, 171, 171));
|
140
|
+
}
|
141
|
+
} /* .share-wrapper */
|
60
142
|
}
|
61
143
|
|
62
144
|
.post-tags {
|
@@ -74,7 +156,7 @@ img.preview-img {
|
|
74
156
|
|
75
157
|
&:hover {
|
76
158
|
background: #2a408e;
|
77
|
-
color: #
|
159
|
+
color: #ffffff;
|
78
160
|
border-color: #2a408e;
|
79
161
|
}
|
80
162
|
|
@@ -121,15 +203,29 @@ img.preview-img {
|
|
121
203
|
margin-top: 0.3rem;
|
122
204
|
white-space: normal;
|
123
205
|
}
|
124
|
-
|
125
206
|
} /* .post-navigation */
|
126
207
|
|
208
|
+
@-webkit-keyframes fade-up {
|
209
|
+
from {
|
210
|
+
opacity: 0;
|
211
|
+
position: relative;
|
212
|
+
top: 2rem;
|
213
|
+
}
|
214
|
+
|
215
|
+
to {
|
216
|
+
opacity: 1;
|
217
|
+
position: relative;
|
218
|
+
top: 0;
|
219
|
+
}
|
220
|
+
}
|
221
|
+
|
127
222
|
@keyframes fade-up {
|
128
223
|
from {
|
129
224
|
opacity: 0;
|
130
225
|
position: relative;
|
131
226
|
top: 2rem;
|
132
227
|
}
|
228
|
+
|
133
229
|
to {
|
134
230
|
opacity: 1;
|
135
231
|
position: relative;
|
@@ -143,19 +239,23 @@ img.preview-img {
|
|
143
239
|
position: sticky;
|
144
240
|
top: 4rem;
|
145
241
|
transition: top 0.2s ease-in-out;
|
242
|
+
-webkit-animation: fade-up 0.8s;
|
146
243
|
animation: fade-up 0.8s;
|
147
244
|
}
|
148
245
|
|
149
|
-
#toc
|
150
|
-
|
246
|
+
#toc {
|
247
|
+
ul.nav.navbar-nav {
|
248
|
+
margin: 0.5rem 0;
|
249
|
+
padding: 0;
|
151
250
|
|
152
|
-
|
153
|
-
|
251
|
+
li {
|
252
|
+
padding-top: 2px;
|
253
|
+
padding-bottom: 2px;
|
254
|
+
}
|
154
255
|
}
|
155
|
-
|
156
256
|
}
|
157
257
|
|
158
|
-
nav[data-toggle=toc] {
|
258
|
+
nav[data-toggle="toc"] {
|
159
259
|
.nav {
|
160
260
|
.nav > li > a.active {
|
161
261
|
font-weight: 600 !important;
|
@@ -176,25 +276,6 @@ nav[data-toggle=toc] {
|
|
176
276
|
color: var(--relate-post-date);
|
177
277
|
}
|
178
278
|
|
179
|
-
.card {
|
180
|
-
border-color: var(--card-border-color);
|
181
|
-
background-color: var(--card-bg);
|
182
|
-
box-shadow: 0 0 5px 0 var(--card-box-shadow);
|
183
|
-
-webkit-transition: all 0.3s ease-in-out;
|
184
|
-
-moz-transition: all 0.3s ease-in-out;
|
185
|
-
transition: all 0.3s ease-in-out;
|
186
|
-
|
187
|
-
h3 {
|
188
|
-
@extend %text-color;
|
189
|
-
}
|
190
|
-
|
191
|
-
&:hover {
|
192
|
-
-webkit-transform: translate3d(0, -3px, 0);
|
193
|
-
transform: translate3d(0, -3px, 0);
|
194
|
-
box-shadow: 0 10px 15px -4px rgba(0, 0, 0, 0.15);
|
195
|
-
}
|
196
|
-
}
|
197
|
-
|
198
279
|
p {
|
199
280
|
font-size: 0.9rem;
|
200
281
|
margin-bottom: 0.5rem;
|
@@ -209,20 +290,20 @@ nav[data-toggle=toc] {
|
|
209
290
|
text-decoration: none;
|
210
291
|
}
|
211
292
|
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
293
|
+
.card {
|
294
|
+
border-color: var(--card-border-color);
|
295
|
+
background-color: var(--card-bg);
|
296
|
+
box-shadow: 0 0 5px 0 var(--card-box-shadow);
|
297
|
+
transition: all 0.3s ease-in-out;
|
298
|
+
|
299
|
+
h3 {
|
300
|
+
@extend %text-color;
|
301
|
+
}
|
302
|
+
|
303
|
+
&:hover {
|
304
|
+
-webkit-transform: translate3d(0, -3px, 0);
|
305
|
+
transform: translate3d(0, -3px, 0);
|
306
|
+
box-shadow: 0 10px 15px -4px rgba(0, 0, 0, 0.15);
|
226
307
|
}
|
227
308
|
}
|
228
309
|
}
|
@@ -234,82 +315,15 @@ nav[data-toggle=toc] {
|
|
234
315
|
margin-bottom: 2rem;
|
235
316
|
}
|
236
317
|
|
237
|
-
#disqus_thread {
|
318
|
+
#disqus_thread { /* stylelint-disable-line selector-id-pattern */
|
238
319
|
min-height: 8.5rem;
|
239
320
|
}
|
240
|
-
|
241
|
-
}
|
242
|
-
|
243
|
-
.post-tail-bottom a {
|
244
|
-
color: inherit;
|
245
321
|
}
|
246
322
|
|
247
323
|
%btn-share-hovor {
|
248
324
|
color: var(--btn-share-hover-color) !important;
|
249
325
|
}
|
250
326
|
|
251
|
-
.share-wrapper {
|
252
|
-
vertical-align: middle;
|
253
|
-
user-select: none;
|
254
|
-
|
255
|
-
.share-icons {
|
256
|
-
font-size: 1.2rem;
|
257
|
-
|
258
|
-
a {
|
259
|
-
&:not(:last-child) {
|
260
|
-
margin-right: 0.25rem;
|
261
|
-
}
|
262
|
-
|
263
|
-
&:hover {
|
264
|
-
text-decoration: none;
|
265
|
-
|
266
|
-
> i {
|
267
|
-
@extend %btn-share-hovor;
|
268
|
-
}
|
269
|
-
}
|
270
|
-
}
|
271
|
-
|
272
|
-
> i {
|
273
|
-
position: relative;
|
274
|
-
bottom: 1px;
|
275
|
-
|
276
|
-
@extend %cursor-pointer;
|
277
|
-
|
278
|
-
&:hover {
|
279
|
-
@extend %btn-share-hovor;
|
280
|
-
}
|
281
|
-
}
|
282
|
-
|
283
|
-
.fab {
|
284
|
-
&.fa-twitter {
|
285
|
-
@include btn-sharing-color(rgba(29, 161, 242, 1));
|
286
|
-
}
|
287
|
-
|
288
|
-
&.fa-facebook-square {
|
289
|
-
@include btn-sharing-color(rgb(66, 95, 156));
|
290
|
-
}
|
291
|
-
|
292
|
-
&.fa-telegram {
|
293
|
-
@include btn-sharing-color(rgb(39, 159, 217));
|
294
|
-
}
|
295
|
-
|
296
|
-
&.fa-linkedin {
|
297
|
-
@include btn-sharing-color(rgb(0, 119, 181));
|
298
|
-
}
|
299
|
-
|
300
|
-
&.fa-weibo {
|
301
|
-
@include btn-sharing-color(rgb(229, 20, 43));
|
302
|
-
}
|
303
|
-
}
|
304
|
-
|
305
|
-
} /* .share-icons */
|
306
|
-
|
307
|
-
.fas.fa-link {
|
308
|
-
@include btn-sharing-color(rgb(171, 171, 171));
|
309
|
-
}
|
310
|
-
|
311
|
-
} /* .share-wrapper */
|
312
|
-
|
313
327
|
.share-label {
|
314
328
|
@include label(inherit, 400, inherit);
|
315
329
|
|
@@ -318,30 +332,12 @@ nav[data-toggle=toc] {
|
|
318
332
|
}
|
319
333
|
}
|
320
334
|
|
321
|
-
.license-wrapper {
|
322
|
-
line-height: 1.2rem;
|
323
|
-
|
324
|
-
> a {
|
325
|
-
color: var(--text-color);
|
326
|
-
|
327
|
-
&:hover {
|
328
|
-
@extend %link-hover;
|
329
|
-
}
|
330
|
-
}
|
331
|
-
|
332
|
-
span:last-child {
|
333
|
-
font-size: 0.85rem;
|
334
|
-
}
|
335
|
-
|
336
|
-
} /* .license-wrapper */
|
337
|
-
|
338
335
|
@media all and (max-width: 576px) {
|
339
336
|
.preview-img[data-src] {
|
340
337
|
margin-top: 2.2rem;
|
341
338
|
}
|
342
339
|
|
343
340
|
.post-tail-bottom {
|
344
|
-
-ms-flex-wrap: wrap-reverse !important;
|
345
341
|
flex-wrap: wrap-reverse !important;
|
346
342
|
|
347
343
|
> div:first-child {
|
data/_sass/layout/tags.scss
CHANGED
data/assets/404.html
CHANGED
data/assets/js/data/search.json
CHANGED
@@ -12,7 +12,9 @@ swcache: true
|
|
12
12
|
"tags": {{ post.tags | join: ', ' | jsonify }},
|
13
13
|
"date": "{{ post.date }}",
|
14
14
|
{% include no-linenos.html content=post.content %}
|
15
|
-
|
15
|
+
{% assign _content = content | strip_html | strip_newlines %}
|
16
|
+
"snippet": {{ _content | truncate: 200 | jsonify }},
|
17
|
+
"content": {{ _content | jsonify }}
|
16
18
|
}{% unless forloop.last %},{% endunless %}
|
17
19
|
{% endfor %}
|
18
20
|
]
|
data/assets/js/data/swcache.js
CHANGED
@@ -5,51 +5,50 @@ layout: compress
|
|
5
5
|
---
|
6
6
|
|
7
7
|
const resource = [
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
8
|
+
/* --- CSS --- */
|
9
|
+
'{{ "/assets/css/style.css" | relative_url }}',
|
10
|
+
|
11
|
+
/* --- PWA --- */
|
12
|
+
'{{ "/app.js" | relative_url }}',
|
13
|
+
'{{ "/sw.js" | relative_url }}',
|
14
|
+
|
15
|
+
/* --- HTML --- */
|
16
|
+
'{{ "/index.html" | relative_url }}',
|
17
|
+
'{{ "/404.html" | relative_url }}',
|
18
|
+
|
19
|
+
{% for tab in site.tabs %}
|
20
|
+
'{{ tab.url | relative_url }}',
|
21
|
+
{% endfor %}
|
22
|
+
|
23
|
+
/* --- Favicons & compressed JS --- */
|
24
|
+
{% assign cache_list = site.static_files | where: 'swcache', true %}
|
25
|
+
{% for file in cache_list %}
|
26
|
+
'{{ file.path | relative_url }}'{%- unless forloop.last -%},{%- endunless -%}
|
27
|
+
{% endfor %}
|
29
28
|
];
|
30
29
|
|
31
30
|
/* The request url with below domain will be cached */
|
32
31
|
const allowedDomains = [
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
32
|
+
{% if site.google_analytics.id != empty and site.google_analytics.id %}
|
33
|
+
'www.googletagmanager.com',
|
34
|
+
'www.google-analytics.com',
|
35
|
+
{% endif %}
|
37
36
|
|
38
|
-
|
37
|
+
'{{ site.url | split: "//" | last }}',
|
39
38
|
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
{% if site.img_cdn contains '//' and site.img_cdn %}
|
40
|
+
'{{ site.img_cdn | split: '//' | last | split: '/' | first }}',
|
41
|
+
{% endif %}
|
43
42
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
43
|
+
'fonts.gstatic.com',
|
44
|
+
'fonts.googleapis.com',
|
45
|
+
'cdn.jsdelivr.net',
|
46
|
+
'polyfill.io'
|
48
47
|
];
|
49
48
|
|
50
49
|
/* Requests that include the following path will be banned */
|
51
50
|
const denyUrls = [
|
52
|
-
|
53
|
-
|
54
|
-
|
51
|
+
{% if site.google_analytics.pv.cache_path %}
|
52
|
+
'{{ site.google_analytics.pv.cache_path | absolute_url }}'
|
53
|
+
{% endif %}
|
55
54
|
];
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* Chirpy v5.3.
|
2
|
+
* Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
3
3
|
* © 2019 Cotes Chung
|
4
4
|
* MIT Licensed
|
5
5
|
*/
|
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(o=>{
|
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(o=>{o=$(o.target);(o.prop("tagName")==="button".toUpperCase()?o:o.parent()).blur(),flipMode()})});const ScrollHelper=function(){const o=$("body"),e="data-topbar-visible",t=$("#topbar-wrapper").outerHeight();let a=0,r=!1,l=!1;return{hideTopbar:()=>o.attr(e,!1),showTopbar:()=>o.attr(e,!0),addScrollUpTask:()=>{a+=1,r=r||!0},popScrollUpTask:()=>--a,hasScrollUpTask:()=>0<a,topbarLocked:()=>!0===r,unlockTopbar:()=>r=!1,getTopbarHeight:()=>t,orientationLocked:()=>!0===l,lockOrientation:()=>l=!0,unLockOrientation:()=>l=!1}}();$(function(){const o=$("#sidebar-trigger"),e=$("#search-trigger"),t=$("#search-cancel"),a=$("#main"),r=$("#topbar-title"),l=$("#search-wrapper"),n=$("#search-result-wrapper"),s=$("#search-results"),i=$("#search-input"),c=$("#search-hints"),d=function(){let o=0;return{block(){o=window.scrollY,$("html,body").scrollTop(0)},release(){$("html,body").scrollTop(o)},getOffset(){return o}}}(),p={on(){o.addClass("unloaded"),r.addClass("unloaded"),e.addClass("unloaded"),l.addClass("d-flex"),t.addClass("loaded")},off(){t.removeClass("loaded"),l.removeClass("d-flex"),o.removeClass("unloaded"),r.removeClass("unloaded"),e.removeClass("unloaded")}},f=function(){let o=!1;return{on(){o||(d.block(),n.removeClass("unloaded"),a.addClass("unloaded"),o=!0)},off(){o&&(s.empty(),c.hasClass("unloaded")&&c.removeClass("unloaded"),n.addClass("unloaded"),a.removeClass("unloaded"),d.release(),i.val(""),o=!1)},isVisible(){return o}}}();function u(){return t.hasClass("loaded")}e.click(function(){p.on(),f.on(),i.focus()}),t.click(function(){p.off(),f.off()}),i.focus(function(){l.addClass("input-focus")}),i.focusout(function(){l.removeClass("input-focus")}),i.on("input",()=>{""===i.val()?u()?c.removeClass("unloaded"):f.off():(f.on(),u()&&c.addClass("unloaded"))})}),$(function(){var o=function(){const o="sidebar-display";let e=!1;const t=$("body");return{toggle(){!1===e?t.attr(o,""):t.removeAttr(o),e=!e}}}();$("#sidebar-trigger").click(o.toggle),$("#mask").click(o.toggle)}),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){const e=$("#search-input"),t=ScrollHelper.getTopbarHeight();let o,a=0;function r(){0!==$(window).scrollTop()&&(ScrollHelper.lockOrientation(),ScrollHelper.hideTopbar())}screen.orientation?screen.orientation.onchange=()=>{var o=screen.orientation.type;"landscape-primary"!==o&&"landscape-secondary"!==o||r()}:$(window).on("orientationchange",()=>{$(window).width()<$(window).height()&&r()}),$(window).scroll(()=>{o=o||!0}),setInterval(()=>{o&&(!function(){var o=$(this).scrollTop();if(!(Math.abs(a-o)<=t)){if(o>a)ScrollHelper.hideTopbar(),e.is(":focus")&&e.blur();else if(o+$(window).height()<$(document).height()){if(ScrollHelper.hasScrollUpTask())return;ScrollHelper.topbarLocked()?ScrollHelper.unlockTopbar():ScrollHelper.orientationLocked()?ScrollHelper.unLockOrientation():ScrollHelper.showTopbar()}a=o}}(),o=!1)},250)}),$(function(){var o="div.post>h1:first-of-type",e=$(o);const n=$("#topbar-title");if(0!==e.length&&!e.hasClass("dynamic-title")&&!n.is(":hidden")){const s=n.text().trim();let a=e.text().trim(),r=!1,l=0;($("#page-category").length||$("#page-tag").length)&&/\s/.test(a)&&(a=a.replace(/[0-9]/g,"").trim()),e.offset().top<$(window).scrollTop()&&n.text(a);new IntersectionObserver(o=>{var e,t;r?(t=$(window).scrollTop(),e=l<t,l=t,t=o[0],e?0===t.intersectionRatio&&n.text(a):1===t.intersectionRatio&&n.text(s)):r=!0},{rootMargin:"-48px 0px 0px 0px",threshold:[0,1]}).observe(document.querySelector(o)),n.click(function(){$("body,html").animate({scrollTop:0},800)})}}),$(function(){var o=$(".collapse");o.on("hide.bs.collapse",function(){var o="h_"+$(this).attr("id").substring("l_".length);o&&($(`#${o} .far.fa-folder-open`).attr("class","far fa-folder fa-fw"),$(`#${o} i.fas`).addClass("rotate"),$("#"+o).removeClass("hide-border-bottom"))}),o.on("show.bs.collapse",function(){var o="h_"+$(this).attr("id").substring("l_".length);o&&($(`#${o} .far.fa-folder`).attr("class","far fa-folder-open fa-fw"),$(`#${o} i.fas`).removeClass("rotate"),$("#"+o).addClass("hide-border-bottom"))})});
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* Chirpy v5.3.
|
2
|
+
* Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
3
3
|
* © 2019 Cotes Chung
|
4
4
|
* MIT Licensed
|
5
5
|
*/
|
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(o=>{
|
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(o=>{o=$(o.target);(o.prop("tagName")==="button".toUpperCase()?o:o.parent()).blur(),flipMode()})});const ScrollHelper=function(){const o=$("body"),e="data-topbar-visible",t=$("#topbar-wrapper").outerHeight();let l=0,r=!1,a=!1;return{hideTopbar:()=>o.attr(e,!1),showTopbar:()=>o.attr(e,!0),addScrollUpTask:()=>{l+=1,r=r||!0},popScrollUpTask:()=>--l,hasScrollUpTask:()=>0<l,topbarLocked:()=>!0===r,unlockTopbar:()=>r=!1,getTopbarHeight:()=>t,orientationLocked:()=>!0===a,lockOrientation:()=>a=!0,unLockOrientation:()=>a=!1}}();$(function(){const o=$("#sidebar-trigger"),e=$("#search-trigger"),t=$("#search-cancel"),l=$("#main"),r=$("#topbar-title"),a=$("#search-wrapper"),n=$("#search-result-wrapper"),s=$("#search-results"),i=$("#search-input"),c=$("#search-hints"),d=function(){let o=0;return{block(){o=window.scrollY,$("html,body").scrollTop(0)},release(){$("html,body").scrollTop(o)},getOffset(){return o}}}(),p={on(){o.addClass("unloaded"),r.addClass("unloaded"),e.addClass("unloaded"),a.addClass("d-flex"),t.addClass("loaded")},off(){t.removeClass("loaded"),a.removeClass("d-flex"),o.removeClass("unloaded"),r.removeClass("unloaded"),e.removeClass("unloaded")}},u=function(){let o=!1;return{on(){o||(d.block(),n.removeClass("unloaded"),l.addClass("unloaded"),o=!0)},off(){o&&(s.empty(),c.hasClass("unloaded")&&c.removeClass("unloaded"),n.addClass("unloaded"),l.removeClass("unloaded"),d.release(),i.val(""),o=!1)},isVisible(){return o}}}();function f(){return t.hasClass("loaded")}e.click(function(){p.on(),u.on(),i.focus()}),t.click(function(){p.off(),u.off()}),i.focus(function(){a.addClass("input-focus")}),i.focusout(function(){a.removeClass("input-focus")}),i.on("input",()=>{""===i.val()?f()?c.removeClass("unloaded"):u.off():(u.on(),f()&&c.addClass("unloaded"))})}),$(function(){var o=function(){const o="sidebar-display";let e=!1;const t=$("body");return{toggle(){!1===e?t.attr(o,""):t.removeAttr(o),e=!e}}}();$("#sidebar-trigger").click(o.toggle),$("#mask").click(o.toggle)}),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){const e=$("#search-input"),t=ScrollHelper.getTopbarHeight();let o,l=0;function r(){0!==$(window).scrollTop()&&(ScrollHelper.lockOrientation(),ScrollHelper.hideTopbar())}screen.orientation?screen.orientation.onchange=()=>{var o=screen.orientation.type;"landscape-primary"!==o&&"landscape-secondary"!==o||r()}:$(window).on("orientationchange",()=>{$(window).width()<$(window).height()&&r()}),$(window).scroll(()=>{o=o||!0}),setInterval(()=>{o&&(!function(){var o=$(this).scrollTop();if(!(Math.abs(l-o)<=t)){if(o>l)ScrollHelper.hideTopbar(),e.is(":focus")&&e.blur();else if(o+$(window).height()<$(document).height()){if(ScrollHelper.hasScrollUpTask())return;ScrollHelper.topbarLocked()?ScrollHelper.unlockTopbar():ScrollHelper.orientationLocked()?ScrollHelper.unLockOrientation():ScrollHelper.showTopbar()}l=o}}(),o=!1)},250)}),$(function(){var o="div.post>h1:first-of-type",e=$(o);const n=$("#topbar-title");if(0!==e.length&&!e.hasClass("dynamic-title")&&!n.is(":hidden")){const s=n.text().trim();let l=e.text().trim(),r=!1,a=0;($("#page-category").length||$("#page-tag").length)&&/\s/.test(l)&&(l=l.replace(/[0-9]/g,"").trim()),e.offset().top<$(window).scrollTop()&&n.text(l);new IntersectionObserver(o=>{var e,t;r?(t=$(window).scrollTop(),e=a<t,a=t,t=o[0],e?0===t.intersectionRatio&&n.text(l):1===t.intersectionRatio&&n.text(s)):r=!0},{rootMargin:"-48px 0px 0px 0px",threshold:[0,1]}).observe(document.querySelector(o)),n.click(function(){$("body,html").animate({scrollTop:0},800)})}});
|
data/assets/js/dist/home.min.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* Chirpy v5.3.
|
2
|
+
* Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
3
3
|
* © 2019 Cotes Chung
|
4
4
|
* MIT Licensed
|
5
5
|
*/
|
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=>{
|
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=>{e=$(e.target);(e.prop("tagName")==="button".toUpperCase()?e:e.parent()).blur(),flipMode()})});const ScrollHelper=function(){const e=$("body"),t="data-topbar-visible",o=$("#topbar-wrapper").outerHeight();let a=0,l=!1,r=!1;return{hideTopbar:()=>e.attr(t,!1),showTopbar:()=>e.attr(t,!0),addScrollUpTask:()=>{a+=1,l=l||!0},popScrollUpTask:()=>--a,hasScrollUpTask:()=>0<a,topbarLocked:()=>!0===l,unlockTopbar:()=>l=!1,getTopbarHeight:()=>o,orientationLocked:()=>!0===r,lockOrientation:()=>r=!0,unLockOrientation:()=>r=!1}}(),LocaleHelper=($(function(){const e=$("#sidebar-trigger"),t=$("#search-trigger"),o=$("#search-cancel"),a=$("#main"),l=$("#topbar-title"),r=$("#search-wrapper"),n=$("#search-result-wrapper"),s=$("#search-results"),i=$("#search-input"),c=$("#search-hints"),d=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"),l.addClass("unloaded"),t.addClass("unloaded"),r.addClass("d-flex"),o.addClass("loaded")},off(){o.removeClass("loaded"),r.removeClass("d-flex"),e.removeClass("unloaded"),l.removeClass("unloaded"),t.removeClass("unloaded")}},u=function(){let e=!1;return{on(){e||(d.block(),n.removeClass("unloaded"),a.addClass("unloaded"),e=!0)},off(){e&&(s.empty(),c.hasClass("unloaded")&&c.removeClass("unloaded"),n.addClass("unloaded"),a.removeClass("unloaded"),d.release(),i.val(""),e=!1)},isVisible(){return e}}}();function f(){return o.hasClass("loaded")}t.click(function(){p.on(),u.on(),i.focus()}),o.click(function(){p.off(),u.off()}),i.focus(function(){r.addClass("input-focus")}),i.focusout(function(){r.removeClass("input-focus")}),i.on("input",()=>{""===i.val()?f()?c.removeClass("unloaded"):u.off():(u.on(),f()&&c.addClass("unloaded"))})}),$(function(){var e=function(){const e="sidebar-display";let t=!1;const o=$("body");return{toggle(){!1===t?o.attr(e,""):o.removeAttr(e),t=!t}}}();$("#sidebar-trigger").click(e.toggle),$("#mask").click(e.toggle)}),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){const t=$("#search-input"),o=ScrollHelper.getTopbarHeight();let e,a=0;function l(){0!==$(window).scrollTop()&&(ScrollHelper.lockOrientation(),ScrollHelper.hideTopbar())}screen.orientation?screen.orientation.onchange=()=>{var e=screen.orientation.type;"landscape-primary"!==e&&"landscape-secondary"!==e||l()}:$(window).on("orientationchange",()=>{$(window).width()<$(window).height()&&l()}),$(window).scroll(()=>{e=e||!0}),setInterval(()=>{e&&(!function(){var e=$(this).scrollTop();if(!(Math.abs(a-e)<=o)){if(e>a)ScrollHelper.hideTopbar(),t.is(":focus")&&t.blur();else if(e+$(window).height()<$(document).height()){if(ScrollHelper.hasScrollUpTask())return;ScrollHelper.topbarLocked()?ScrollHelper.unlockTopbar():ScrollHelper.orientationLocked()?ScrollHelper.unLockOrientation():ScrollHelper.showTopbar()}a=e}}(),e=!1)},250)}),$(function(){var e="div.post>h1:first-of-type",t=$(e);const n=$("#topbar-title");if(0!==t.length&&!t.hasClass("dynamic-title")&&!n.is(":hidden")){const s=n.text().trim();let a=t.text().trim(),l=!1,r=0;($("#page-category").length||$("#page-tag").length)&&/\s/.test(a)&&(a=a.replace(/[0-9]/g,"").trim()),t.offset().top<$(window).scrollTop()&&n.text(a);new IntersectionObserver(e=>{var t,o;l?(o=$(window).scrollTop(),t=r<o,r=o,o=e[0],t?0===o.intersectionRatio&&n.text(a):1===o.intersectionRatio&&n.text(s)):l=!0},{rootMargin:"-48px 0px 0px 0px",threshold:[0,1]}).observe(document.querySelector(e)),n.click(function(){$("body,html").animate({scrollTop:0},800)})}}),function(){const e=$("html").attr("lang").substr(0,2),t="data-ts",o="data-df";return{locale:()=>e,attrTimestamp:()=>t,attrDateFormat:()=>o,getTimestamp:e=>Number(e.attr(t)),getDateFormat:e=>e.attr(o)}}());$(function(){dayjs.locale(LocaleHelper.locale()),dayjs.extend(window.dayjs_plugin_localizedFormat),$(`[${LocaleHelper.attrTimestamp()}]`).each(function(){var e=dayjs.unix(LocaleHelper.getTimestamp($(this))),t=e.format(LocaleHelper.getDateFormat($(this))),t=($(this).text(t),$(this).removeAttr(LocaleHelper.attrTimestamp()),$(this).removeAttr(LocaleHelper.attrDateFormat()),$(this).attr("data-toggle"));void 0!==t&&"tooltip"===t&&(t=e.format("llll"),$(this).attr("data-original-title",t))})});
|
data/assets/js/dist/misc.min.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* Chirpy v5.3.
|
2
|
+
* Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
3
3
|
* © 2019 Cotes Chung
|
4
4
|
* MIT Licensed
|
5
5
|
*/
|
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=>{
|
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=>{e=$(e.target);(e.prop("tagName")==="button".toUpperCase()?e:e.parent()).blur(),flipMode()})});const ScrollHelper=function(){const e=$("body"),t="data-topbar-visible",o=$("#topbar-wrapper").outerHeight();let a=0,l=!1,r=!1;return{hideTopbar:()=>e.attr(t,!1),showTopbar:()=>e.attr(t,!0),addScrollUpTask:()=>{a+=1,l=l||!0},popScrollUpTask:()=>--a,hasScrollUpTask:()=>0<a,topbarLocked:()=>!0===l,unlockTopbar:()=>l=!1,getTopbarHeight:()=>o,orientationLocked:()=>!0===r,lockOrientation:()=>r=!0,unLockOrientation:()=>r=!1}}(),LocaleHelper=($(function(){const e=$("#sidebar-trigger"),t=$("#search-trigger"),o=$("#search-cancel"),a=$("#main"),l=$("#topbar-title"),r=$("#search-wrapper"),n=$("#search-result-wrapper"),s=$("#search-results"),i=$("#search-input"),c=$("#search-hints"),d=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"),l.addClass("unloaded"),t.addClass("unloaded"),r.addClass("d-flex"),o.addClass("loaded")},off(){o.removeClass("loaded"),r.removeClass("d-flex"),e.removeClass("unloaded"),l.removeClass("unloaded"),t.removeClass("unloaded")}},u=function(){let e=!1;return{on(){e||(d.block(),n.removeClass("unloaded"),a.addClass("unloaded"),e=!0)},off(){e&&(s.empty(),c.hasClass("unloaded")&&c.removeClass("unloaded"),n.addClass("unloaded"),a.removeClass("unloaded"),d.release(),i.val(""),e=!1)},isVisible(){return e}}}();function f(){return o.hasClass("loaded")}t.click(function(){p.on(),u.on(),i.focus()}),o.click(function(){p.off(),u.off()}),i.focus(function(){r.addClass("input-focus")}),i.focusout(function(){r.removeClass("input-focus")}),i.on("input",()=>{""===i.val()?f()?c.removeClass("unloaded"):u.off():(u.on(),f()&&c.addClass("unloaded"))})}),$(function(){var e=function(){const e="sidebar-display";let t=!1;const o=$("body");return{toggle(){!1===t?o.attr(e,""):o.removeAttr(e),t=!t}}}();$("#sidebar-trigger").click(e.toggle),$("#mask").click(e.toggle)}),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){const t=$("#search-input"),o=ScrollHelper.getTopbarHeight();let e,a=0;function l(){0!==$(window).scrollTop()&&(ScrollHelper.lockOrientation(),ScrollHelper.hideTopbar())}screen.orientation?screen.orientation.onchange=()=>{var e=screen.orientation.type;"landscape-primary"!==e&&"landscape-secondary"!==e||l()}:$(window).on("orientationchange",()=>{$(window).width()<$(window).height()&&l()}),$(window).scroll(()=>{e=e||!0}),setInterval(()=>{e&&(!function(){var e=$(this).scrollTop();if(!(Math.abs(a-e)<=o)){if(e>a)ScrollHelper.hideTopbar(),t.is(":focus")&&t.blur();else if(e+$(window).height()<$(document).height()){if(ScrollHelper.hasScrollUpTask())return;ScrollHelper.topbarLocked()?ScrollHelper.unlockTopbar():ScrollHelper.orientationLocked()?ScrollHelper.unLockOrientation():ScrollHelper.showTopbar()}a=e}}(),e=!1)},250)}),$(function(){var e="div.post>h1:first-of-type",t=$(e);const n=$("#topbar-title");if(0!==t.length&&!t.hasClass("dynamic-title")&&!n.is(":hidden")){const s=n.text().trim();let a=t.text().trim(),l=!1,r=0;($("#page-category").length||$("#page-tag").length)&&/\s/.test(a)&&(a=a.replace(/[0-9]/g,"").trim()),t.offset().top<$(window).scrollTop()&&n.text(a);new IntersectionObserver(e=>{var t,o;l?(o=$(window).scrollTop(),t=r<o,r=o,o=e[0],t?0===o.intersectionRatio&&n.text(a):1===o.intersectionRatio&&n.text(s)):l=!0},{rootMargin:"-48px 0px 0px 0px",threshold:[0,1]}).observe(document.querySelector(e)),n.click(function(){$("body,html").animate({scrollTop:0},800)})}}),function(){const e=$("html").attr("lang").substr(0,2),t="data-ts",o="data-df";return{locale:()=>e,attrTimestamp:()=>t,attrDateFormat:()=>o,getTimestamp:e=>Number(e.attr(t)),getDateFormat:e=>e.attr(o)}}());$(function(){dayjs.locale(LocaleHelper.locale()),dayjs.extend(window.dayjs_plugin_localizedFormat),$(`[${LocaleHelper.attrTimestamp()}]`).each(function(){var e=dayjs.unix(LocaleHelper.getTimestamp($(this))),t=e.format(LocaleHelper.getDateFormat($(this))),t=($(this).text(t),$(this).removeAttr(LocaleHelper.attrTimestamp()),$(this).removeAttr(LocaleHelper.attrDateFormat()),$(this).attr("data-toggle"));void 0!==t&&"tooltip"===t&&(t=e.format("llll"),$(this).attr("data-original-title",t))})});
|