jekyll-theme-chirpy 5.5.2 → 5.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -76,7 +76,7 @@
76
76
  --code-header-icon-color: #d1d1d1;
77
77
  --clipboard-checked-color: #43c743;
78
78
 
79
- [class^="prompt-"] {
79
+ [class^='prompt-'] {
80
80
  --inline-code-bg: #fbfafa;
81
81
  --highlighter-rouge-color: rgb(82, 82, 82);
82
82
  }
@@ -4,9 +4,8 @@
4
4
 
5
5
  @mixin light-scheme {
6
6
  /* Framework color */
7
- --body-bg: #fafafa;
8
- --mask-bg: #c1c3c5;
9
7
  --main-bg: white;
8
+ --mask-bg: #c1c3c5;
10
9
  --main-border-color: #f3f3f3;
11
10
 
12
11
  /* Common color */
@@ -24,14 +23,17 @@
24
23
  --btn-box-shadow: #eaeaea;
25
24
  --checkbox-color: #c5c5c5;
26
25
  --checkbox-checked-color: #07a8f7;
27
- --img-bg: radial-gradient(circle, rgb(255, 255, 255) 0%, rgb(249, 249, 249) 100%);
28
- --shimmer-bg:
29
- linear-gradient(
30
- 90deg,
31
- rgba(250, 250, 250, 0) 0%,
32
- rgba(232, 230, 230, 1) 50%,
33
- rgba(250, 250, 250, 0) 100%
34
- );
26
+ --img-bg: radial-gradient(
27
+ circle,
28
+ rgb(255, 255, 255) 0%,
29
+ rgb(249, 249, 249) 100%
30
+ );
31
+ --shimmer-bg: linear-gradient(
32
+ 90deg,
33
+ rgba(250, 250, 250, 0) 0%,
34
+ rgba(232, 230, 230, 1) 50%,
35
+ rgba(250, 250, 250, 0) 100%
36
+ );
35
37
 
36
38
  /* Sidebar */
37
39
  --sidebar-bg: #eeeeee;
@@ -59,8 +61,10 @@
59
61
  --pin-color: #999fa4;
60
62
 
61
63
  /* Posts */
64
+ --toc-highlight: #563d7c;
62
65
  --btn-share-hover-color: var(--link-color);
63
- --card-border-color: #f1f1f1;
66
+ --card-hovor-bg: #eeeeee;
67
+ --card-border-color: #ececec;
64
68
  --card-box-shadow: rgba(234, 234, 234, 0.76);
65
69
  --label-color: #616161;
66
70
  --relate-post-date: rgba(30, 55, 70, 0.4);
@@ -85,7 +89,7 @@
85
89
  --prompt-danger-bg: rgb(248, 215, 218, 0.56);
86
90
  --prompt-danger-icon-color: #df3c30;
87
91
 
88
- [class^="prompt-"] {
92
+ [class^='prompt-'] {
89
93
  --link-underline-color: rgb(219, 216, 216);
90
94
  }
91
95
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * The styles for Jekyll theme Chirpy
3
3
  *
4
- * Chirpy v5.5.2 (https://github.com/cotes2020/jekyll-theme-chirpy)
4
+ * Chirpy v5.6.0 (https://github.com/cotes2020/jekyll-theme-chirpy)
5
5
  * © 2019 Cotes Chung
6
6
  * MIT Licensed
7
7
  */
@@ -8,7 +8,7 @@
8
8
  $timeline-width: 4px;
9
9
 
10
10
  %timeline {
11
- content: "";
11
+ content: '';
12
12
  width: $timeline-width;
13
13
  position: relative;
14
14
  float: left;
@@ -37,8 +37,9 @@
37
37
  top: 24px;
38
38
  }
39
39
 
40
- &::after { /* Year dot */
41
- content: "";
40
+ /* Year dot */
41
+ &::after {
42
+ content: '';
42
43
  display: inline-block;
43
44
  position: relative;
44
45
  border-radius: 50%;
@@ -63,7 +64,14 @@
63
64
 
64
65
  &:nth-child(odd) {
65
66
  background-color: var(--main-bg, #ffffff);
66
- background-image: linear-gradient(to left, #ffffff, #fbfbfb, #fbfbfb, #fbfbfb, #ffffff);
67
+ background-image: linear-gradient(
68
+ to left,
69
+ #ffffff,
70
+ #fbfbfb,
71
+ #fbfbfb,
72
+ #fbfbfb,
73
+ #ffffff
74
+ );
67
75
  }
68
76
 
69
77
  &::before {
@@ -109,7 +117,7 @@
109
117
 
110
118
  &::before {
111
119
  /* the dot before post title */
112
- content: "";
120
+ content: '';
113
121
  display: inline-block;
114
122
  position: relative;
115
123
  border-radius: 50%;
@@ -54,7 +54,8 @@
54
54
  }
55
55
  }
56
56
 
57
- @media (hover: hover) { /* only works on desktop */
57
+ /* only works on desktop */
58
+ @media (hover: hover) {
58
59
  .category-trigger:hover {
59
60
  background-color: var(--categories-hover-bg);
60
61
  }
@@ -13,31 +13,35 @@
13
13
  line-height: 1.5rem;
14
14
  padding: 0.6rem 0;
15
15
 
16
- &::before { /* dot */
16
+ /* dot */
17
+ &::before {
17
18
  background: #999999;
18
19
  width: 5px;
19
20
  height: 5px;
20
21
  border-radius: 50%;
21
22
  display: block;
22
- content: "";
23
+ content: '';
23
24
  position: relative;
24
25
  top: 0.6rem;
25
26
  margin-right: 0.5rem;
26
27
  }
27
28
 
28
- > a { /* post's title */
29
+ /* post's title */
30
+ > a {
29
31
  @extend %no-bottom-border;
30
32
 
31
33
  font-size: 1.1rem;
32
34
  }
33
35
 
36
+ /* post's date */
34
37
  > span:last-child {
35
38
  white-space: nowrap;
36
- } /* post's date */
39
+ }
37
40
  }
38
41
  }
39
42
 
40
- #page-tag h1 > i { /* tag icon */
43
+ /* tag icon */
44
+ #page-tag h1 > i {
41
45
  font-size: 1.2rem;
42
46
  }
43
47
 
@@ -53,16 +53,26 @@
53
53
  } /* .pagination */
54
54
 
55
55
  #post-list {
56
- margin-top: 1rem;
56
+ margin-top: 1.75rem;
57
57
  padding-right: 0.5rem;
58
58
 
59
+ a:hover {
60
+ text-decoration: none;
61
+ }
62
+
59
63
  .post-preview {
60
- padding-top: 1.5rem;
61
- padding-bottom: 1rem;
62
- border-bottom: 1px solid var(--main-border-color);
64
+ padding: 0.25rem;
65
+ border-radius: 0.75rem;
66
+ border: 1px solid var(--card-border-color);
67
+ background: var(--card-bg);
68
+
69
+ &:hover {
70
+ background: var(--card-hovor-bg);
71
+ box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
72
+ }
63
73
 
64
- a:hover {
65
- @extend %link-hover;
74
+ &:not(:last-child) {
75
+ margin-bottom: 1.75rem;
66
76
  }
67
77
 
68
78
  h1 {
@@ -103,7 +113,6 @@
103
113
  color: var(--post-list-text-color);
104
114
 
105
115
  > p {
106
- /* Make preview shorter on the homepage */
107
116
  margin: 0;
108
117
  overflow: hidden;
109
118
  text-overflow: ellipsis;
@@ -115,8 +124,19 @@
115
124
  } /* .post-preview */
116
125
  } /* #post-list */
117
126
 
127
+ @media (hover: hover) {
128
+ .post-preview {
129
+ transition: all 0.35s ease-in-out;
130
+ }
131
+ }
132
+
118
133
  /* Hide SideBar and TOC */
119
134
  @media all and (max-width: 830px) {
135
+ .post-preview {
136
+ margin-left: -0.5rem;
137
+ margin-right: -0.5rem;
138
+ }
139
+
120
140
  .pagination {
121
141
  justify-content: space-evenly;
122
142
 
@@ -131,20 +151,24 @@
131
151
  /* Sidebar is visible */
132
152
  @media all and (min-width: 831px) {
133
153
  #post-list {
134
- margin-top: 1.5rem;
135
-
136
- .post-preview .post-meta {
137
- .pin {
138
- background: var(--pin-bg);
139
- border-radius: 5px;
140
- line-height: 1.4rem;
141
- height: 1.3rem;
142
- margin-top: 3px;
143
- padding-left: 1px;
144
- padding-right: 6px;
145
-
146
- > span {
147
- display: inline;
154
+ margin-top: 3rem;
155
+
156
+ .post-preview {
157
+ padding: 0.5rem;
158
+
159
+ .post-meta {
160
+ .pin {
161
+ background: var(--pin-bg);
162
+ border-radius: 5px;
163
+ line-height: 1.4rem;
164
+ height: 1.3rem;
165
+ margin-top: 3px;
166
+ padding-left: 1px;
167
+ padding-right: 6px;
168
+
169
+ > span {
170
+ display: inline;
171
+ }
148
172
  }
149
173
  }
150
174
  }
@@ -17,7 +17,7 @@
17
17
  }
18
18
 
19
19
  @mixin dot($pl: 0.25rem, $pr: 0.25rem) {
20
- content: "\2022";
20
+ content: '\2022';
21
21
  padding-left: $pl;
22
22
  padding-right: $pr;
23
23
  }
@@ -26,17 +26,9 @@
26
26
  color: var(--text-color);
27
27
  }
28
28
 
29
- %preview-margin {
30
- margin: 0;
31
- }
32
-
33
29
  .preview-img {
34
- @include align-center;
35
- @extend %preview-margin;
36
30
  @extend %rounded;
37
31
 
38
- max-width: 100%;
39
-
40
32
  &:not(.no-bg) {
41
33
  img.lazyloaded {
42
34
  background: var(--img-bg);
@@ -48,7 +40,6 @@
48
40
  -o-object-fit: cover;
49
41
  object-fit: cover;
50
42
 
51
- @extend %preview-margin;
52
43
  @extend %rounded;
53
44
  }
54
45
  }
@@ -100,6 +91,7 @@ h1 + .post-meta {
100
91
  vertical-align: middle;
101
92
  -webkit-user-select: none;
102
93
  -moz-user-select: none;
94
+ -ms-user-select: none;
103
95
  user-select: none;
104
96
 
105
97
  .share-icons {
@@ -124,7 +116,7 @@ h1 + .post-meta {
124
116
  &:hover {
125
117
  text-decoration: none;
126
118
 
127
- >i {
119
+ > i {
128
120
  @extend %btn-share-hovor;
129
121
  }
130
122
  }
@@ -259,24 +251,58 @@ h1 + .post-meta {
259
251
  transition: top 0.2s ease-in-out;
260
252
  -webkit-animation: fade-up 0.8s;
261
253
  animation: fade-up 0.8s;
262
- }
263
254
 
264
- #toc {
265
- ul.nav.navbar-nav {
266
- margin: 0.5rem 0;
267
- padding: 0;
255
+ ul {
256
+ list-style: none;
257
+ font-size: 0.85rem;
258
+ line-height: 1.25;
259
+ padding-left: 0;
268
260
 
269
261
  li {
270
- padding-top: 2px;
271
- padding-bottom: 2px;
262
+ &:not(:last-child) {
263
+ margin: 0.4rem 0;
264
+ }
265
+
266
+ a {
267
+ padding: 0.2rem 0 0.2rem 1.25rem;
268
+ }
272
269
  }
273
- }
274
- }
275
270
 
276
- nav[data-toggle="toc"] {
277
- .nav {
278
- .nav > li > a.active {
279
- font-weight: 600 !important;
271
+ /* Overwrite TOC plugin style */
272
+
273
+ .toc-link {
274
+ display: block;
275
+ white-space: nowrap;
276
+ overflow: hidden;
277
+ text-overflow: ellipsis;
278
+
279
+ &:hover {
280
+ color: var(--toc-highlight);
281
+ text-decoration: none;
282
+ }
283
+
284
+ &::before {
285
+ display: none;
286
+ }
287
+ }
288
+
289
+ .is-active-link {
290
+ color: var(--toc-highlight) !important;
291
+ font-weight: 600;
292
+
293
+ &::before {
294
+ display: inline-block;
295
+ width: 1px;
296
+ left: -1px;
297
+ height: 1.25rem;
298
+ background-color: var(--toc-highlight) !important;
299
+ }
300
+ }
301
+
302
+ ul {
303
+ a {
304
+ padding-left: 2rem;
305
+ }
280
306
  }
281
307
  }
282
308
  }
@@ -333,7 +359,8 @@ nav[data-toggle="toc"] {
333
359
  margin-bottom: 2rem;
334
360
  }
335
361
 
336
- #disqus_thread { /* stylelint-disable-line selector-id-pattern */
362
+ /* stylelint-disable-next-line selector-id-pattern */
363
+ #disqus_thread {
337
364
  min-height: 8.5rem;
338
365
  }
339
366
  }
@@ -346,7 +373,7 @@ nav[data-toggle="toc"] {
346
373
  @include label(inherit, 400, inherit);
347
374
 
348
375
  &::after {
349
- content: ":";
376
+ content: ':';
350
377
  }
351
378
  }
352
379
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Chirpy v5.5.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.6.0 (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=>{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"))})});
6
+ !function(){"use strict";var o=$(".mode-toggle");function t(o,t){if(!(o instanceof t))throw new TypeError("Cannot call a class as a function")}function e(o,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(o,a(n.key),n)}}function n(o,t,n){return t&&e(o.prototype,t),n&&e(o,n),Object.defineProperty(o,"prototype",{writable:!1}),o}function r(o,t,e){return(t=a(t))in o?Object.defineProperty(o,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):o[t]=e,o}function a(o){var t=function(o,t){if("object"!=typeof o||null===o)return o;var e=o[Symbol.toPrimitive];if(void 0!==e){var n=e.call(o,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(o)}(o,"string");return"symbol"==typeof t?t:String(t)}var i=$("body"),l="sidebar-display",s=function(){function o(){t(this,o)}return n(o,null,[{key:"toggle",value:function(){!1===o.isExpanded?i.attr(l,""):i.removeAttr(l),o.isExpanded=!o.isExpanded}}]),o}();r(s,"isExpanded",!1);var c="div.post>h1:first-of-type",u=$(c),f=$("#topbar-title"),d=f.text().trim();var p=$("#sidebar-trigger"),b=$("#search-trigger"),v=$("#search-cancel"),h=$("#main"),g=$("#topbar-title"),k=$("#search-wrapper"),y=$("#search-result-wrapper"),m=$("#search-results"),w=$("#search-input"),C=$("#search-hints"),T=$("html,body"),L="loaded",x="unloaded",I="input-focus",O="d-flex",U=function(){function o(){t(this,o)}return n(o,null,[{key:"on",value:function(){o.offset=window.scrollY,T.scrollTop(0)}},{key:"off",value:function(){T.scrollTop(o.offset)}}]),o}();r(U,"offset",0),r(U,"resultVisible",!1);var S=function(){function o(){t(this,o)}return n(o,null,[{key:"on",value:function(){p.addClass(x),g.addClass(x),b.addClass(x),k.addClass(O),v.addClass(L)}},{key:"off",value:function(){v.removeClass(L),k.removeClass(O),p.removeClass(x),g.removeClass(x),b.removeClass(x)}}]),o}(),E=function(){function o(){t(this,o)}return n(o,null,[{key:"on",value:function(){U.resultVisible||(U.on(),y.removeClass(x),h.addClass(x),U.resultVisible=!0)}},{key:"off",value:function(){U.resultVisible&&(m.empty(),C.hasClass(x)&&C.removeClass(x),y.addClass(x),h.removeClass(x),U.off(),w.val(""),U.resultVisible=!1)}}]),o}();function j(){return v.hasClass(L)}var P="data-topbar-visible",V=$("body"),H=$("#topbar-wrapper"),M=function(){function o(){t(this,o)}return n(o,null,[{key:"hideTopbar",value:function(){V.attr(P,"false")}},{key:"showTopbar",value:function(){V.attr(P,"true")}},{key:"addScrollUpTask",value:function(){o.scrollUpCount+=1,o.topbarIsLocked||(o.topbarIsLocked=!0)}},{key:"popScrollUpTask",value:function(){o.scrollUpCount-=1}},{key:"hasScrollUpTask",value:function(){return o.scrollUpCount>0}},{key:"topbarLocked",value:function(){return!0===o.topbarIsLocked}},{key:"unlockTopbar",value:function(){o.topbarIsLocked=!1}},{key:"getTopbarHeight",value:function(){return H.outerHeight()}},{key:"orientationLocked",value:function(){return!0===o.orientationIsLocked}},{key:"lockOrientation",value:function(){o.orientationIsLocked=!0}},{key:"unLockOrientation",value:function(){o.orientationIsLocked=!1}}]),o}();r(M,"scrollUpCount",0),r(M,"topbarIsLocked",!1),r(M,"orientationIsLocked",!1);var N,R=$("#search-input"),_=M.getTopbarHeight(),q=0;function A(){0!==$(window).scrollTop()&&(M.lockOrientation(),M.hideTopbar())}function Y(){var o=screen.orientation;o?o.onchange=function(){var t=o.type;"landscape-primary"!==t&&"landscape-secondary"!==t||A()}:$(window).on("orientationchange",(function(){$(window).width()<$(window).height()&&A()})),$(window).on("scroll",(function(){N||(N=!0)})),setInterval((function(){N&&(!function(){var o=$(window).scrollTop();if(!(Math.abs(q-o)<=_)){if(o>q)M.hideTopbar(),R.is(":focus")&&R.trigger("blur");else if(o+$(window).height()<$(document).height()){if(M.hasScrollUpTask())return;M.topbarLocked()?M.unlockTopbar():M.orientationLocked()?M.unLockOrientation():M.showTopbar()}q=o}}(),N=!1)}),250)}var z="l_",B="h_",D=$(".collapse");$(".code-header>button").children().attr("class"),$(window).on("scroll",(function(){$(window).scrollTop()>50&&"none"===$("#sidebar-trigger").css("display")?$("#back-to-top").fadeIn():$("#back-to-top").fadeOut()})),$("#back-to-top").on("click",(function(){return $("body,html").animate({scrollTop:0},800),!1})),$('[data-toggle="tooltip"]').tooltip(),0!==o.length&&o.off().on("click",(function(o){var t=$(o.target),e=t.prop("tagName")==="button".toUpperCase()?t:t.parent();modeToggle.flipMode(),e.trigger("blur")})),$("#sidebar-trigger").on("click",s.toggle),$("#mask").on("click",s.toggle),function(){if(0!==u.length&&!u.hasClass("dynamic-title")&&!f.is(":hidden")){var o=u.text().trim(),t=!1,e=0;($("#page-category").length||$("#page-tag").length)&&/\s/.test(o)&&(o=o.replace(/[0-9]/g,"").trim()),u.offset().top<$(window).scrollTop()&&f.text(o),new IntersectionObserver((function(n){if(t){var r=$(window).scrollTop(),a=e<r;e=r;var i=n[0];a?0===i.intersectionRatio&&f.text(o):1===i.intersectionRatio&&f.text(d)}else t=!0}),{rootMargin:"-48px 0px 0px 0px",threshold:[0,1]}).observe(document.querySelector(c)),f.on("click",(function(){$("body,html").animate({scrollTop:0},800)}))}}(),b.on("click",(function(){S.on(),E.on(),w.trigger("focus")})),v.on("click",(function(){S.off(),E.off()})),w.on("focus",(function(){k.addClass(I)})),w.on("focusout",(function(){k.removeClass(I)})),w.on("input",(function(){""===w.val()?j()?C.removeClass(x):E.off():(E.on(),j()&&C.addClass(x))})),Y(),D.on("hide.bs.collapse",(function(){var o=B+$(this).attr("id").substring(z.length);o&&($("#".concat(o," .far.fa-folder-open")).attr("class","far fa-folder fa-fw"),$("#".concat(o," i.fas")).addClass("rotate"),$("#".concat(o)).removeClass("hide-border-bottom"))})),D.on("show.bs.collapse",(function(){var o=B+$(this).attr("id").substring(z.length);o&&($("#".concat(o," .far.fa-folder")).attr("class","far fa-folder-open fa-fw"),$("#".concat(o," i.fas")).removeClass("rotate"),$("#".concat(o)).addClass("hide-border-bottom"))}))}();
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Chirpy v5.5.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.6.0 (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=>{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)})}});
6
+ !function(){"use strict";var o=$(".mode-toggle");function e(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}function t(o,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(o,i(n.key),n)}}function n(o,e,n){return e&&t(o.prototype,e),n&&t(o,n),Object.defineProperty(o,"prototype",{writable:!1}),o}function r(o,e,t){return(e=i(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function i(o){var e=function(o,e){if("object"!=typeof o||null===o)return o;var t=o[Symbol.toPrimitive];if(void 0!==t){var n=t.call(o,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(o)}(o,"string");return"symbol"==typeof e?e:String(e)}var a=$("body"),l="sidebar-display",s=function(){function o(){e(this,o)}return n(o,null,[{key:"toggle",value:function(){!1===o.isExpanded?a.attr(l,""):a.removeAttr(l),o.isExpanded=!o.isExpanded}}]),o}();r(s,"isExpanded",!1);var c="div.post>h1:first-of-type",u=$(c),f=$("#topbar-title"),d=f.text().trim();var p=$("#sidebar-trigger"),v=$("#search-trigger"),b=$("#search-cancel"),g=$("#main"),k=$("#topbar-title"),h=$("#search-wrapper"),y=$("#search-result-wrapper"),m=$("#search-results"),w=$("#search-input"),C=$("#search-hints"),T=$("html,body"),L="loaded",x="unloaded",I="input-focus",O="d-flex",U=function(){function o(){e(this,o)}return n(o,null,[{key:"on",value:function(){o.offset=window.scrollY,T.scrollTop(0)}},{key:"off",value:function(){T.scrollTop(o.offset)}}]),o}();r(U,"offset",0),r(U,"resultVisible",!1);var S=function(){function o(){e(this,o)}return n(o,null,[{key:"on",value:function(){p.addClass(x),k.addClass(x),v.addClass(x),h.addClass(O),b.addClass(L)}},{key:"off",value:function(){b.removeClass(L),h.removeClass(O),p.removeClass(x),k.removeClass(x),v.removeClass(x)}}]),o}(),E=function(){function o(){e(this,o)}return n(o,null,[{key:"on",value:function(){U.resultVisible||(U.on(),y.removeClass(x),g.addClass(x),U.resultVisible=!0)}},{key:"off",value:function(){U.resultVisible&&(m.empty(),C.hasClass(x)&&C.removeClass(x),y.addClass(x),g.removeClass(x),U.off(),w.val(""),U.resultVisible=!1)}}]),o}();function j(){return b.hasClass(L)}var P="data-topbar-visible",V=$("body"),H=$("#topbar-wrapper"),M=function(){function o(){e(this,o)}return n(o,null,[{key:"hideTopbar",value:function(){V.attr(P,"false")}},{key:"showTopbar",value:function(){V.attr(P,"true")}},{key:"addScrollUpTask",value:function(){o.scrollUpCount+=1,o.topbarIsLocked||(o.topbarIsLocked=!0)}},{key:"popScrollUpTask",value:function(){o.scrollUpCount-=1}},{key:"hasScrollUpTask",value:function(){return o.scrollUpCount>0}},{key:"topbarLocked",value:function(){return!0===o.topbarIsLocked}},{key:"unlockTopbar",value:function(){o.topbarIsLocked=!1}},{key:"getTopbarHeight",value:function(){return H.outerHeight()}},{key:"orientationLocked",value:function(){return!0===o.orientationIsLocked}},{key:"lockOrientation",value:function(){o.orientationIsLocked=!0}},{key:"unLockOrientation",value:function(){o.orientationIsLocked=!1}}]),o}();r(M,"scrollUpCount",0),r(M,"topbarIsLocked",!1),r(M,"orientationIsLocked",!1);var N,R=$("#search-input"),q=M.getTopbarHeight(),A=0;function Y(){0!==$(window).scrollTop()&&(M.lockOrientation(),M.hideTopbar())}function z(){var o=screen.orientation;o?o.onchange=function(){var e=o.type;"landscape-primary"!==e&&"landscape-secondary"!==e||Y()}:$(window).on("orientationchange",(function(){$(window).width()<$(window).height()&&Y()})),$(window).on("scroll",(function(){N||(N=!0)})),setInterval((function(){N&&(!function(){var o=$(window).scrollTop();if(!(Math.abs(A-o)<=q)){if(o>A)M.hideTopbar(),R.is(":focus")&&R.trigger("blur");else if(o+$(window).height()<$(document).height()){if(M.hasScrollUpTask())return;M.topbarLocked()?M.unlockTopbar():M.orientationLocked()?M.unLockOrientation():M.showTopbar()}A=o}}(),N=!1)}),250)}$(window).on("scroll",(function(){$(window).scrollTop()>50&&"none"===$("#sidebar-trigger").css("display")?$("#back-to-top").fadeIn():$("#back-to-top").fadeOut()})),$("#back-to-top").on("click",(function(){return $("body,html").animate({scrollTop:0},800),!1})),$('[data-toggle="tooltip"]').tooltip(),0!==o.length&&o.off().on("click",(function(o){var e=$(o.target),t=e.prop("tagName")==="button".toUpperCase()?e:e.parent();modeToggle.flipMode(),t.trigger("blur")})),$("#sidebar-trigger").on("click",s.toggle),$("#mask").on("click",s.toggle),function(){if(0!==u.length&&!u.hasClass("dynamic-title")&&!f.is(":hidden")){var o=u.text().trim(),e=!1,t=0;($("#page-category").length||$("#page-tag").length)&&/\s/.test(o)&&(o=o.replace(/[0-9]/g,"").trim()),u.offset().top<$(window).scrollTop()&&f.text(o),new IntersectionObserver((function(n){if(e){var r=$(window).scrollTop(),i=t<r;t=r;var a=n[0];i?0===a.intersectionRatio&&f.text(o):1===a.intersectionRatio&&f.text(d)}else e=!0}),{rootMargin:"-48px 0px 0px 0px",threshold:[0,1]}).observe(document.querySelector(c)),f.on("click",(function(){$("body,html").animate({scrollTop:0},800)}))}}(),v.on("click",(function(){S.on(),E.on(),w.trigger("focus")})),b.on("click",(function(){S.off(),E.off()})),w.on("focus",(function(){h.addClass(I)})),w.on("focusout",(function(){h.removeClass(I)})),w.on("input",(function(){""===w.val()?j()?C.removeClass(x):E.off():(E.on(),j()&&C.addClass(x))})),z()}();
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Chirpy v5.5.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.6.0 (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=>{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))})});
6
+ !function(){"use strict";var t=$(".mode-toggle");function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function n(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(t,e,o){return(e=a(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function a(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var n=o.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}var i=$("body"),l="sidebar-display",s=function(){function t(){e(this,t)}return n(t,null,[{key:"toggle",value:function(){!1===t.isExpanded?i.attr(l,""):i.removeAttr(l),t.isExpanded=!t.isExpanded}}]),t}();r(s,"isExpanded",!1);var c="div.post>h1:first-of-type",u=$(c),f=$("#topbar-title"),d=f.text().trim();var p=$("#sidebar-trigger"),v=$("#search-trigger"),g=$("#search-cancel"),b=$("#main"),h=$("#topbar-title"),m=$("#search-wrapper"),k=$("#search-result-wrapper"),y=$("#search-results"),w=$("#search-input"),T=$("#search-hints"),C=$("html,body"),x="loaded",L="unloaded",I="input-focus",j="d-flex",O=function(){function t(){e(this,t)}return n(t,null,[{key:"on",value:function(){t.offset=window.scrollY,C.scrollTop(0)}},{key:"off",value:function(){C.scrollTop(t.offset)}}]),t}();r(O,"offset",0),r(O,"resultVisible",!1);var U=function(){function t(){e(this,t)}return n(t,null,[{key:"on",value:function(){p.addClass(L),h.addClass(L),v.addClass(L),m.addClass(j),g.addClass(x)}},{key:"off",value:function(){g.removeClass(x),m.removeClass(j),p.removeClass(L),h.removeClass(L),v.removeClass(L)}}]),t}(),S=function(){function t(){e(this,t)}return n(t,null,[{key:"on",value:function(){O.resultVisible||(O.on(),k.removeClass(L),b.addClass(L),O.resultVisible=!0)}},{key:"off",value:function(){O.resultVisible&&(y.empty(),T.hasClass(L)&&T.removeClass(L),k.addClass(L),b.removeClass(L),O.off(),w.val(""),O.resultVisible=!1)}}]),t}();function E(){return g.hasClass(x)}var F="data-topbar-visible",D=$("body"),P=$("#topbar-wrapper"),V=function(){function t(){e(this,t)}return n(t,null,[{key:"hideTopbar",value:function(){D.attr(F,"false")}},{key:"showTopbar",value:function(){D.attr(F,"true")}},{key:"addScrollUpTask",value:function(){t.scrollUpCount+=1,t.topbarIsLocked||(t.topbarIsLocked=!0)}},{key:"popScrollUpTask",value:function(){t.scrollUpCount-=1}},{key:"hasScrollUpTask",value:function(){return t.scrollUpCount>0}},{key:"topbarLocked",value:function(){return!0===t.topbarIsLocked}},{key:"unlockTopbar",value:function(){t.topbarIsLocked=!1}},{key:"getTopbarHeight",value:function(){return P.outerHeight()}},{key:"orientationLocked",value:function(){return!0===t.orientationIsLocked}},{key:"lockOrientation",value:function(){t.orientationIsLocked=!0}},{key:"unLockOrientation",value:function(){t.orientationIsLocked=!1}}]),t}();r(V,"scrollUpCount",0),r(V,"topbarIsLocked",!1),r(V,"orientationIsLocked",!1);var A,H=$("#search-input"),M=V.getTopbarHeight(),N=0;function R(){0!==$(window).scrollTop()&&(V.lockOrientation(),V.hideTopbar())}function _(){var t=screen.orientation;t?t.onchange=function(){var e=t.type;"landscape-primary"!==e&&"landscape-secondary"!==e||R()}:$(window).on("orientationchange",(function(){$(window).width()<$(window).height()&&R()})),$(window).on("scroll",(function(){A||(A=!0)})),setInterval((function(){A&&(!function(){var t=$(window).scrollTop();if(!(Math.abs(N-t)<=M)){if(t>N)V.hideTopbar(),H.is(":focus")&&H.trigger("blur");else if(t+$(window).height()<$(document).height()){if(V.hasScrollUpTask())return;V.topbarLocked()?V.unlockTopbar():V.orientationLocked()?V.unLockOrientation():V.showTopbar()}N=t}}(),A=!1)}),250)}$(".collapse");$(".code-header>button").children().attr("class");var q=function(){function t(){e(this,t)}return n(t,null,[{key:"attrTimestamp",get:function(){return"data-ts"}},{key:"attrDateFormat",get:function(){return"data-df"}},{key:"locale",get:function(){return $("html").attr("lang").substring(0,2)}},{key:"getTimestamp",value:function(e){return Number(e.attr(t.attrTimestamp))}},{key:"getDateFormat",value:function(e){return e.attr(t.attrDateFormat)}}]),t}();$(window).on("scroll",(function(){$(window).scrollTop()>50&&"none"===$("#sidebar-trigger").css("display")?$("#back-to-top").fadeIn():$("#back-to-top").fadeOut()})),$("#back-to-top").on("click",(function(){return $("body,html").animate({scrollTop:0},800),!1})),$('[data-toggle="tooltip"]').tooltip(),0!==t.length&&t.off().on("click",(function(t){var e=$(t.target),o=e.prop("tagName")==="button".toUpperCase()?e:e.parent();modeToggle.flipMode(),o.trigger("blur")})),$("#sidebar-trigger").on("click",s.toggle),$("#mask").on("click",s.toggle),function(){if(0!==u.length&&!u.hasClass("dynamic-title")&&!f.is(":hidden")){var t=u.text().trim(),e=!1,o=0;($("#page-category").length||$("#page-tag").length)&&/\s/.test(t)&&(t=t.replace(/[0-9]/g,"").trim()),u.offset().top<$(window).scrollTop()&&f.text(t),new IntersectionObserver((function(n){if(e){var r=$(window).scrollTop(),a=o<r;o=r;var i=n[0];a?0===i.intersectionRatio&&f.text(t):1===i.intersectionRatio&&f.text(d)}else e=!0}),{rootMargin:"-48px 0px 0px 0px",threshold:[0,1]}).observe(document.querySelector(c)),f.on("click",(function(){$("body,html").animate({scrollTop:0},800)}))}}(),v.on("click",(function(){U.on(),S.on(),w.trigger("focus")})),g.on("click",(function(){U.off(),S.off()})),w.on("focus",(function(){m.addClass(I)})),w.on("focusout",(function(){m.removeClass(I)})),w.on("input",(function(){""===w.val()?E()?T.removeClass(L):S.off():(S.on(),E()&&T.addClass(L))})),_(),dayjs.locale(q.locale),dayjs.extend(window.dayjs_plugin_localizedFormat),$("[".concat(q.attrTimestamp,"]")).each((function(){var t=dayjs.unix(q.getTimestamp($(this))),e=t.format(q.getDateFormat($(this)));$(this).text(e),$(this).removeAttr(q.attrTimestamp),$(this).removeAttr(q.attrDateFormat);var o=$(this).attr("data-toggle");if(void 0!==o&&"tooltip"===o){var n=t.format("llll");$(this).attr("data-original-title",n)}}))}();
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Chirpy v5.5.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.6.0 (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=>{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 r=0,a=!1,l=!1;return{hideTopbar:()=>e.attr(t,!1),showTopbar:()=>e.attr(t,!0),addScrollUpTask:()=>{r+=1,a=a||!0},popScrollUpTask:()=>--r,hasScrollUpTask:()=>0<r,topbarLocked:()=>!0===a,unlockTopbar:()=>a=!1,getTopbarHeight:()=>o,orientationLocked:()=>!0===l,lockOrientation:()=>l=!0,unLockOrientation:()=>l=!1}}();$(function(){const e=$("#sidebar-trigger"),t=$("#search-trigger"),o=$("#search-cancel"),r=$("#main"),a=$("#topbar-title"),l=$("#search-wrapper"),n=$("#search-result-wrapper"),i=$("#search-results"),s=$("#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"),a.addClass("unloaded"),t.addClass("unloaded"),l.addClass("d-flex"),o.addClass("loaded")},off(){o.removeClass("loaded"),l.removeClass("d-flex"),e.removeClass("unloaded"),a.removeClass("unloaded"),t.removeClass("unloaded")}},u=function(){let e=!1;return{on(){e||(d.block(),n.removeClass("unloaded"),r.addClass("unloaded"),e=!0)},off(){e&&(i.empty(),c.hasClass("unloaded")&&c.removeClass("unloaded"),n.addClass("unloaded"),r.removeClass("unloaded"),d.release(),s.val(""),e=!1)},isVisible(){return e}}}();function h(){return o.hasClass("loaded")}t.click(function(){p.on(),u.on(),s.focus()}),o.click(function(){p.off(),u.off()}),s.focus(function(){l.addClass("input-focus")}),s.focusout(function(){l.removeClass("input-focus")}),s.on("input",()=>{""===s.val()?h()?c.removeClass("unloaded"):u.off():(u.on(),h()&&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,r=0;function a(){0!==$(window).scrollTop()&&(ScrollHelper.lockOrientation(),ScrollHelper.hideTopbar())}screen.orientation?screen.orientation.onchange=()=>{var e=screen.orientation.type;"landscape-primary"!==e&&"landscape-secondary"!==e||a()}:$(window).on("orientationchange",()=>{$(window).width()<$(window).height()&&a()}),$(window).scroll(()=>{e=e||!0}),setInterval(()=>{e&&(!function(){var e=$(this).scrollTop();if(!(Math.abs(r-e)<=o)){if(e>r)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()}r=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 i=n.text().trim();let r=t.text().trim(),a=!1,l=0;($("#page-category").length||$("#page-tag").length)&&/\s/.test(r)&&(r=r.replace(/[0-9]/g,"").trim()),t.offset().top<$(window).scrollTop()&&n.text(r);new IntersectionObserver(e=>{var t,o;a?(o=$(window).scrollTop(),t=l<o,l=o,o=e[0],t?0===o.intersectionRatio&&n.text(r):1===o.intersectionRatio&&n.text(i)):a=!0},{rootMargin:"-48px 0px 0px 0px",threshold:[0,1]}).observe(document.querySelector(e)),n.click(function(){$("body,html").animate({scrollTop:0},800)})}}),$("#core-wrapper img[data-src]")<=0||($(".popup").magnificPopup({type:"image",closeOnContentClick:!0,showCloseBtn:!1,zoom:{enabled:!0,duration:300,easing:"ease-in-out"}}),document.addEventListener("lazyloaded",function(e){$(e.target).parent().removeClass("shimmer")})),$(function(){var e=".code-header>button";const t="timeout",a="data-title-succeed",l="data-original-title";function n(e){if($(e)[0].hasAttribute(t)){e=$(e).attr(t);if(Number(e)>Date.now())return 1}}function i(e){$(e).attr(t,Date.now()+2e3)}function s(e){$(e).removeAttr(t)}var o=new ClipboardJS(e,{target(e){return e.parentNode.nextElementSibling.querySelector("code .rouge-code")}});$(e).tooltip({trigger:"hover",placement:"left"});const r=$(e).children().attr("class");o.on("success",e=>{e.clearSelection();const t=e.trigger;var o;n(t)||(e=t,$(e).children().attr("class","fas fa-check"),e=t,o=$(e).attr(a),$(e).attr(l,o).tooltip("show"),i(t),setTimeout(()=>{var e;e=t,$(e).tooltip("hide").removeAttr(l),e=t,$(e).children().attr("class",r),s(t)},2e3))}),$("#copy-link").click(e=>{let t=$(e.target);if(!n(t)){var e=window.location.href,o=$("<input>");$("body").append(o),o.val(e).select(),document.execCommand("copy"),o.remove();const r=t.attr(l);e=t.attr(a);t.attr(l,e).tooltip("show"),i(t),setTimeout(()=>{t.attr(l,r),s(t)},2e3)}})}),$(function(){const e=$("#topbar-title"),s="scroll-focus";$("a[href*='#']").not("[href='#']").not("[href='#0']").click(function(a){if(this.pathname.replace(/^\//,"")===location.pathname.replace(/^\//,"")&&location.hostname===this.hostname){var l=decodeURI(this.hash);let t=RegExp(/^#fnref:/).test(l),o=!t&&RegExp(/^#fn:/).test(l);var n=l.includes(":")?l.replace(/:/g,"\\:"):l;let r=$(n);var n=e.is(":visible"),i=$(window).width()<$(window).height();if(void 0!==r){a.preventDefault(),history.pushState&&history.pushState(null,null,l);a=$(window).scrollTop();let e=r.offset().top-=8;e<a&&(ScrollHelper.hideTopbar(),ScrollHelper.addScrollUpTask()),n&&i&&(e-=ScrollHelper.getTopbarHeight()),$("html").animate({scrollTop:e},500,()=>{if(r.focus(),$(`[${s}=true]`).length&&$(`[${s}=true]`).attr(s,!1),$(":target").length&&$(":target").attr(s,!1),(o||t)&&r.attr(s,!0),r.is(":focus"))return!1;r.attr("tabindex","-1"),r.focus(),ScrollHelper.hasScrollUpTask()&&ScrollHelper.popScrollUpTask()})}}})});
6
+ !function(){"use strict";var t=$(".mode-toggle");function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function n(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(t,e,o){return(e=a(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function a(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var n=o.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}var i=$("body"),l="sidebar-display",c=function(){function t(){e(this,t)}return n(t,null,[{key:"toggle",value:function(){!1===t.isExpanded?i.attr(l,""):i.removeAttr(l),t.isExpanded=!t.isExpanded}}]),t}();r(c,"isExpanded",!1);var s="div.post>h1:first-of-type",u=$(s),f=$("#topbar-title"),p=f.text().trim();var d=$("#sidebar-trigger"),h=$("#search-trigger"),g=$("#search-cancel"),v=$("#main"),b=$("#topbar-title"),k=$("#search-wrapper"),m=$("#search-result-wrapper"),w=$("#search-results"),y=$("#search-input"),T=$("#search-hints"),C=$("html,body"),x="loaded",S="unloaded",L="input-focus",I="d-flex",U=function(){function t(){e(this,t)}return n(t,null,[{key:"on",value:function(){t.offset=window.scrollY,C.scrollTop(0)}},{key:"off",value:function(){C.scrollTop(t.offset)}}]),t}();r(U,"offset",0),r(U,"resultVisible",!1);var E=function(){function t(){e(this,t)}return n(t,null,[{key:"on",value:function(){d.addClass(S),b.addClass(S),h.addClass(S),k.addClass(I),g.addClass(x)}},{key:"off",value:function(){g.removeClass(x),k.removeClass(I),d.removeClass(S),b.removeClass(S),h.removeClass(S)}}]),t}(),O=function(){function t(){e(this,t)}return n(t,null,[{key:"on",value:function(){U.resultVisible||(U.on(),m.removeClass(S),v.addClass(S),U.resultVisible=!0)}},{key:"off",value:function(){U.resultVisible&&(w.empty(),T.hasClass(S)&&T.removeClass(S),m.addClass(S),v.removeClass(S),U.off(),y.val(""),U.resultVisible=!1)}}]),t}();function P(){return g.hasClass(x)}var j="data-topbar-visible",H=$("body"),R=$("#topbar-wrapper"),V=function(){function t(){e(this,t)}return n(t,null,[{key:"hideTopbar",value:function(){H.attr(j,"false")}},{key:"showTopbar",value:function(){H.attr(j,"true")}},{key:"addScrollUpTask",value:function(){t.scrollUpCount+=1,t.topbarIsLocked||(t.topbarIsLocked=!0)}},{key:"popScrollUpTask",value:function(){t.scrollUpCount-=1}},{key:"hasScrollUpTask",value:function(){return t.scrollUpCount>0}},{key:"topbarLocked",value:function(){return!0===t.topbarIsLocked}},{key:"unlockTopbar",value:function(){t.topbarIsLocked=!1}},{key:"getTopbarHeight",value:function(){return R.outerHeight()}},{key:"orientationLocked",value:function(){return!0===t.orientationIsLocked}},{key:"lockOrientation",value:function(){t.orientationIsLocked=!0}},{key:"unLockOrientation",value:function(){t.orientationIsLocked=!1}}]),t}();r(V,"scrollUpCount",0),r(V,"topbarIsLocked",!1),r(V,"orientationIsLocked",!1);var A,N=$("#search-input"),D=V.getTopbarHeight(),M=0;function q(){0!==$(window).scrollTop()&&(V.lockOrientation(),V.hideTopbar())}function z(){var t=screen.orientation;t?t.onchange=function(){var e=t.type;"landscape-primary"!==e&&"landscape-secondary"!==e||q()}:$(window).on("orientationchange",(function(){$(window).width()<$(window).height()&&q()})),$(window).on("scroll",(function(){A||(A=!0)})),setInterval((function(){A&&(!function(){var t=$(window).scrollTop();if(!(Math.abs(M-t)<=D)){if(t>M)V.hideTopbar(),N.is(":focus")&&N.trigger("blur");else if(t+$(window).height()<$(document).height()){if(V.hasScrollUpTask())return;V.topbarLocked()?V.unlockTopbar():V.orientationLocked()?V.unLockOrientation():V.showTopbar()}M=t}}(),A=!1)}),250)}$(".collapse");var B=".code-header>button",J="fas fa-check",Y="timeout",F="data-title-succeed",G="data-original-title",K=2e3;function Q(t){if($(t)[0].hasAttribute(Y)){var e=$(t).attr(Y);if(Number(e)>Date.now())return!0}return!1}function W(t){$(t).attr(Y,Date.now()+K)}function X(t){$(t).removeAttr(Y)}var Z,_=$(B).children().attr("class");$(window).on("scroll",(function(){$(window).scrollTop()>50&&"none"===$("#sidebar-trigger").css("display")?$("#back-to-top").fadeIn():$("#back-to-top").fadeOut()})),$("#back-to-top").on("click",(function(){return $("body,html").animate({scrollTop:0},800),!1})),$('[data-toggle="tooltip"]').tooltip(),0!==t.length&&t.off().on("click",(function(t){var e=$(t.target),o=e.prop("tagName")==="button".toUpperCase()?e:e.parent();modeToggle.flipMode(),o.trigger("blur")})),$("#sidebar-trigger").on("click",c.toggle),$("#mask").on("click",c.toggle),function(){if(0!==u.length&&!u.hasClass("dynamic-title")&&!f.is(":hidden")){var t=u.text().trim(),e=!1,o=0;($("#page-category").length||$("#page-tag").length)&&/\s/.test(t)&&(t=t.replace(/[0-9]/g,"").trim()),u.offset().top<$(window).scrollTop()&&f.text(t),new IntersectionObserver((function(n){if(e){var r=$(window).scrollTop(),a=o<r;o=r;var i=n[0];a?0===i.intersectionRatio&&f.text(t):1===i.intersectionRatio&&f.text(p)}else e=!0}),{rootMargin:"-48px 0px 0px 0px",threshold:[0,1]}).observe(document.querySelector(s)),f.on("click",(function(){$("body,html").animate({scrollTop:0},800)}))}}(),h.on("click",(function(){E.on(),O.on(),y.trigger("focus")})),g.on("click",(function(){E.off(),O.off()})),y.on("focus",(function(){k.addClass(L)})),y.on("focusout",(function(){k.removeClass(L)})),y.on("input",(function(){""===y.val()?P()?T.removeClass(S):O.off():(O.on(),P()&&T.addClass(S))})),z(),$("#core-wrapper img[data-src]")<=0||($(".popup").magnificPopup({type:"image",closeOnContentClick:!0,showCloseBtn:!1,zoom:{enabled:!0,duration:300,easing:"ease-in-out"}}),document.addEventListener("lazyloaded",(function(t){$(t.target).parent().removeClass("shimmer")}))),Z=new ClipboardJS(B,{target:function(t){return t.parentNode.nextElementSibling.querySelector("code .rouge-code")}}),$(B).tooltip({trigger:"hover",placement:"left"}),Z.on("success",(function(t){t.clearSelection();var e=t.trigger;Q(e)||(function(t){$(t).children().attr("class",J)}(e),function(t){var e=$(t).attr(F);$(t).attr(G,e).tooltip("show")}(e),W(e),setTimeout((function(){!function(t){$(t).tooltip("hide").removeAttr(G)}(e),function(t){$(t).children().attr("class",_)}(e),X(e)}),K))})),$("#copy-link").on("click",(function(t){var e=$(t.target);Q(e)||navigator.clipboard.writeText(window.location.href).then((function(){var t=e.attr(G),o=e.attr(F);e.attr(G,o).tooltip("show"),W(e),setTimeout((function(){e.attr(G,t),X(e)}),K)}))})),function(){var t=$("#topbar-title"),e="scroll-focus";$("a[href*='#']:not([href='#']):not([href='#0'])").on("click",(function(o){if(this.pathname.replace(/^\//,"")===location.pathname.replace(/^\//,"")&&location.hostname===this.hostname){var n=decodeURI(this.hash),r=RegExp(/^#fnref:/).test(n),a=!r&&RegExp(/^#fn:/).test(n),i="#"+$.escapeSelector(n.substring(1)),l=$(i),c=t.is(":visible"),s=$(window).width()<$(window).height();if(void 0!==l){o.preventDefault(),history.pushState&&history.pushState(null,null,n);var u=$(window).scrollTop(),f=l.offset().top-=8;f<u?(V.hideTopbar(),V.addScrollUpTask(),c&&s&&(f-=V.getTopbarHeight())):c&&s&&(f-=V.getTopbarHeight()),$("html").animate({scrollTop:f},500,(function(){l.trigger("focus");var t=$("[".concat(e,"=true]"));t.length&&t.attr(e,"false");var o=$(":target");if(o.length&&o.attr(e,"false"),(a||r)&&l.attr(e,"true"),l.is(":focus"))return!1;l.attr("tabindex","-1"),l.trigger("focus"),V.hasScrollUpTask()&&V.popScrollUpTask()}))}}}))}()}();