jekyll-theme-chirpy 3.1.0 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6e95f5a798562bf2d4bb37251a70cb3c2a20d137c57e0bf0160c32c68418738
4
- data.tar.gz: a91318d6031acec809319bbaaa5619a9b62be8618c5a61f7b57de7ac27a80ca4
3
+ metadata.gz: d833e4ed6f7e8ec68aa2d3089a0c78378c80a67ff45f9a6bcbcf84e7f2c41d85
4
+ data.tar.gz: 51944aab8a026e3003b2eeb7e2fe7b1f2ea228f5773f4c03f287e4ef193ec1f2
5
5
  SHA512:
6
- metadata.gz: 37f59d4ebac543e73d0b1a9dbd190f939c910c3b8f44a989f012f2cc59c190c729e84554bdff197a52e4df7c54e07355a8c12273deecf0defd6b6da43c4888dd
7
- data.tar.gz: 4d69ec49ac10c5a40c1f0a232b39f11be692a57814602ecc025c1aa7036e66e750a22bf574f59e32e3f2755e4a3cef6203ac3f2f683649891b482c0023769db2
6
+ metadata.gz: 7579ca6f1d93877c8676d8bea15653f6c6d47f9080cd0eaecb3f4fc99c21dfb992dd4d9e8db4083428e56e82f87fb820fd56be914e672f7e118a7d67993a1193
7
+ data.tar.gz: e9de76b82c78fefde54aa7b8e27b69e0c88f20aaf14bfdabedda0c97d32a553944003a7907e4eddb403875036e9ae72f972f1b154e1b4af3617858a9ba2d982e
data/README.md CHANGED
@@ -5,25 +5,13 @@ Language: English | [简体中文](https://github.com/cotes2020/jekyll-theme-chi
5
5
  [![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?color=brightgreen)](https://rubygems.org/gems/jekyll-theme-chirpy)
6
6
  [![Build Status](https://github.com/cotes2020/jekyll-theme-chirpy/workflows/build/badge.svg?branch=master&event=push)](https://github.com/cotes2020/jekyll-theme-chirpy/actions?query=branch%3Amaster+event%3Apush)
7
7
  [![Codacy Badge](https://api.codacy.com/project/badge/Grade/8220b926db514f13afc3f02b7f884f4b)](https://app.codacy.com/manual/cotes2020/jekyll-theme-chirpy?utm_source=github.com&utm_medium=referral&utm_content=cotes2020/jekyll-theme-chirpy&utm_campaign=Badge_Grade_Dashboard)
8
- [![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg?color=blue)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
8
+ [![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
9
9
  [![996.icu](https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg)](https://996.icu)
10
10
 
11
11
  A minimal, sidebar, responsive web design Jekyll theme that focuses on text presentation. Designed to help you record and share your knowledge easily. [Live Demo »](https://chirpy.cotes.info)
12
12
 
13
13
  [![Devices Mockup](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/commons/devices-mockup.png)](https://chirpy.cotes.info)
14
14
 
15
- ## Table of Contents
16
-
17
- - [Features](#features)
18
- - [Prerequisites](#prerequisites)
19
- - [Installation](#installation)
20
- - [Usage](#usage)
21
- - [Documentation](#documentation)
22
- - [Contributing](#contributing)
23
- - [Credits](#credits)
24
- - [Supporting](#supporting)
25
- - [License](#license)
26
-
27
15
  ## Features
28
16
 
29
17
  - Pinned Posts
@@ -50,10 +38,10 @@ Follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete th
50
38
 
51
39
  There are two ways to get the theme:
52
40
 
53
- - **Install from RubyGems** - Easy to upgrade, isolate irrelevant project files so you can focus on writing.
54
- - **Fork from GitHub** - Convenient for custom development, but difficult to upgrade, only suitable for web developers.
41
+ - **Install from RubyGems** - Easy to update, isolate irrelevant project files so you can focus on writing.
42
+ - **Fork on GitHub** - Convenient for custom development, but difficult to update, only suitable for web developers.
55
43
 
56
- ### Install From RubyGems
44
+ ### Installing the Theme Gem
57
45
 
58
46
  Add this line to your Jekyll site's `Gemfile`:
59
47
 
@@ -77,15 +65,15 @@ Finally, copy the required files from the theme's gem (for detailed files, see [
77
65
 
78
66
  > **Hint**: To locate the installed theme’s gem, execute:
79
67
  >
80
- ```console
81
- $ bundle info --path jekyll-theme-chirpy
82
- ```
68
+ > ```console
69
+ > $ bundle info --path jekyll-theme-chirpy
70
+ > ```
83
71
 
84
72
  Or you can [**use the starter template**][use-starter] to create a Jekyll site to save time copying files from theme's gem. We have prepared everything for you there!
85
73
 
86
- ### Fork From GitHub
74
+ ### Fork on GitHub
87
75
 
88
- [Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) from GitHub and clone your fork to local.
76
+ [Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) on GitHub and then clone your fork to local. (Please note that the default branch code is in development. If you want the blog to be stable, please switch to the [latest tag](https://github.com/cotes2020/jekyll-theme-chirpy/tags) and start writing.)
89
77
 
90
78
  Install gem dependencies by:
91
79
 
@@ -155,7 +143,7 @@ For security reasons, GitHub Pages build runs on `safe` mode, which restricts us
155
143
  Quickly check the files needed for GitHub Actions build:
156
144
 
157
145
  - Ensure your Jekyll site has the file `.github/workflows/pages-deploy.yml`. Otherwise, create a new one and fill in the contents of the [workflow file][workflow], and the value of the `on.push.branches` should be the same as your repo's default branch name.
158
- - Ensuer your Jekyll site has file `tools/test.sh` and `tools/deploy.sh`. Otherwise, copy them from this repo to your Jekyll site.
146
+ - Ensure your Jekyll site has file `tools/test.sh` and `tools/deploy.sh`. Otherwise, copy them from this repo to your Jekyll site.
159
147
 
160
148
  And then rename your repoistory to `<GH-USERNAME>.github.io` on GitHub.
161
149
 
@@ -207,11 +195,13 @@ This theme is mainly built with [Jekyll](https://jekyllrb.com/) ecosystem, [Boot
207
195
 
208
196
  Also, thank [JetBrains][jb] for providing the open source license.
209
197
 
210
- [![JB-logo](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/commons/jetbrains.svg)][jb]
198
+ ## Sponsoring
211
199
 
212
- ## Supporting
200
+ If you like this theme or find it helpful, please consider sponsoring me, because it will encourage and help me better maintain the project, I will be very grateful!
213
201
 
214
- If you enjoy this theme or find it helpful, please consider becoming my sponsor, I'd really appreciate it! Click the button <kbd>:heart: Sponsor</kbd> at the top of the [Home Page](https://github.com/cotes2020/jekyll-theme-chirpy) and choose a link that suits you to donate; this will encourage and help me better maintain the project.
202
+ [![Buy Me a Coffee](https://img.shields.io/badge/-Buy%20Me%20a%20Coffee-ff813f?logo=buy-me-a-coffee&logoColor=white)](https://www.buymeacoffee.com/coteschung)
203
+ [![Wechat Pay](https://img.shields.io/badge/-Tip%20Me%20on%20WeChat-brightgreen?logo=wechat&logoColor=white)][cn-donation]
204
+ [![Alipay](https://img.shields.io/badge/-Tip%20Me%20on%20Alipay-blue?logo=alipay&logoColor=white)][cn-donation]
215
205
 
216
206
  ## License
217
207
 
@@ -220,5 +210,8 @@ This work is published under [MIT](https://github.com/cotes2020/jekyll-theme-chi
220
210
  [starter]: https://github.com/cotes2020/chirpy-starter
221
211
  [use-starter]: https://github.com/cotes2020/chirpy-starter/generate
222
212
  [workflow]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/workflows/pages-deploy.yml.hook
223
- [jb]: https://www.jetbrains.com/?from=jekyll-theme-chirpy
224
213
 
214
+ <!-- ReadMe links -->
215
+
216
+ [jb]: https://www.jetbrains.com/?from=jekyll-theme-chirpy
217
+ [cn-donation]: https://cotes.gitee.io/alipay-wechat-donation/
data/_config.yml CHANGED
@@ -27,8 +27,6 @@ description: >- # used by seo meta and the atom feed
27
27
  # fill in the protocol & hostname for your site, e.g., 'https://username.github.io'
28
28
  url: ''
29
29
 
30
- author: your_full_name # change to your full name
31
-
32
30
  github:
33
31
  username: github_username # change to your github username
34
32
 
@@ -36,7 +34,9 @@ twitter:
36
34
  username: twitter_username # change to your twitter username
37
35
 
38
36
  social:
39
- name: your_full_name # it will shows as the copyright owner in Footer
37
+ # Change to your full name.
38
+ # It will be displayed as the default author of the posts and the copyright owner in the Footer
39
+ name: your_full_name
40
40
  email: example@doamin.com # change to your email address
41
41
  links:
42
42
  # The first element serves as the copyright owner's link
@@ -154,7 +154,8 @@ exclude:
154
154
  - vendor
155
155
  - Gemfile
156
156
  - Gemfile.lock
157
- - jekyll-theme-chirpy.gemspec
157
+ - '*.gem'
158
+ - '*.gemspec'
158
159
  - tools
159
160
  - docs
160
161
  - README.md
@@ -5,7 +5,7 @@
5
5
 
6
6
  <div id="disqus" class="pt-2 pb-2">
7
7
  <p class="text-center text-muted small pb-5">
8
- Loading comments from <a href="https://disqus.com/">Disqus</a> ...
8
+ Comments powered by <a href="https://disqus.com/">Disqus</a>.
9
9
  </p>
10
10
  </div>
11
11
 
@@ -23,8 +23,25 @@
23
23
 
24
24
  {% if page.math %}
25
25
  <!-- MathJax -->
26
- <script defer src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
27
- <script defer src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
26
+ <script>
27
+ // see: <https://docs.mathjax.org/en/latest/options/input/tex.html#tex-options>
28
+ MathJax = {
29
+ tex: {
30
+ inlineMath: [ // start/end delimiter pairs for in-line math
31
+ ['$','$'],
32
+ ['\\(','\\)']
33
+ ],
34
+ displayMath: [ // start/end delimiter pairs for display math
35
+ ['$$', '$$'],
36
+ ['\\[', '\\]']
37
+ ]
38
+ }
39
+ };
40
+ </script>
41
+ <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
42
+ <script type="text/javascript" id="MathJax-script" async
43
+ src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js">
44
+ </script>
28
45
  {% endif %}
29
46
 
30
47
  {% if jekyll.environment == 'production' %}
@@ -1,13 +1,14 @@
1
1
  <!--
2
2
  Jekyll Simple Search loader
3
+ See: <https://github.com/christian-fei/Simple-Jekyll-Search>
3
4
  -->
4
5
 
5
6
  {% capture result_elem %}
6
7
  <div class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-lg-4 pr-lg-4 pl-xl-0 pr-xl-0">
7
8
  <a href="{{ site.url }}{url}">{title}</a>
8
9
  <div class="post-meta d-flex flex-column flex-sm-row text-muted mt-1 mb-1">
9
- <div class="mr-sm-4"><i class="far fa-folder fa-fw"></i>{categories}</div>
10
- <div><i class="fa fa-tag fa-fw"></i>{tags}</div>
10
+ {categories}
11
+ {tags}
11
12
  </div>
12
13
  <p>{snippet}</p>
13
14
  </div>
@@ -23,6 +24,23 @@ SimpleJekyllSearch({
23
24
  resultsContainer: document.getElementById('search-results'),
24
25
  json: '{{ '/assets/js/data/search.json' | relative_url }}',
25
26
  searchResultTemplate: '{{ result_elem | strip_newlines }}',
26
- noResultsText: '{{ not_found }}'
27
+ noResultsText: '{{ not_found }}',
28
+ templateMiddleware: function(prop, value, template) {
29
+ if (prop === 'categories') {
30
+ if (value === '') {
31
+ return `${value}`;
32
+ } else {
33
+ return `<div class="mr-sm-4"><i class="far fa-folder fa-fw"></i>${value}</div>`;
34
+ }
35
+ }
36
+
37
+ if (prop === 'tags') {
38
+ if (value === '') {
39
+ return `${value}`;
40
+ } else {
41
+ return `<div><i class="fa fa-tag fa-fw"></i>${value}</div>`;
42
+ }
43
+ }
44
+ }
27
45
  });
28
46
  </script>
@@ -2,7 +2,7 @@
2
2
  The Search results
3
3
  -->
4
4
  <div id="search-result-wrapper" class="d-flex justify-content-center unloaded">
5
- <div class="col-12 col-xl-11 post-content">
5
+ <div class="col-12 col-sm-11 post-content">
6
6
  <div id="search-hints">
7
7
  <h4 class="text-muted mb-4">{{ site.data.label.panel.trending_tags | default: 'Trending Tags' }}</h4>
8
8
 
@@ -1,5 +1,6 @@
1
1
  <!--
2
2
  Date format snippet
3
+ See: /assets/js/_utils/timeage.js
3
4
  -->
4
5
 
5
6
  {% assign tooltip_df = site.data.date_format.tooltip | default: '%a, %b %e, %Y, %l:%M %p %z' %}
@@ -11,7 +12,10 @@
11
12
  data-toggle="tooltip"
12
13
  data-placement="bottom"
13
14
  title="{{ include.date | date: tooltip_df }}"
14
- {% endif %}>
15
+ {% endif %}
16
+
17
+ {% if include.prefix %}prefix="{{ include.prefix }} "{% endif%}
18
+ {% if include.prep %}prep="{{ include.prep }}"{% endif %} >
15
19
 
16
20
  {% assign this_year = site.time | date: "%Y" %}
17
21
  {% assign post_year = include.date | date: "%Y" %}
data/_layouts/post.html CHANGED
@@ -14,19 +14,18 @@ layout: default
14
14
  <div class="post-meta text-muted d-flex flex-column">
15
15
  <!-- Published date and author -->
16
16
  <div>
17
- {% include timeago.html date=page.date tooltip=true %}
18
- by
19
- <span class="author">
20
- {{ page.author | default: site.author }}
17
+ <span class="semi-bold">
18
+ {{ page.author | default: site.social.name }}
21
19
  </span>
20
+ {% include timeago.html date=page.date prep="on" tooltip=true %}
22
21
  </div>
23
22
 
24
23
  <div>
25
24
  <!-- lastmod -->
26
25
  {% if page.last_modified_at %}
27
26
  <span>
28
- Updated
29
- {% include timeago.html date=page.last_modified_at class="lastmod" tooltip=true %}
27
+ {% include timeago.html date=page.last_modified_at
28
+ class="lastmod" prefix="Updated" tooltip=true %}
30
29
  </span>
31
30
  {% endif %}
32
31
 
@@ -521,6 +521,10 @@ footer {
521
521
 
522
522
  /* --- Effects classes --- */
523
523
 
524
+ .semi-bold {
525
+ font-weight: 600 !important;
526
+ }
527
+
524
528
  .loaded {
525
529
  display: block !important;
526
530
 
@@ -811,9 +815,6 @@ $sidebar-display: "sidebar-display";
811
815
 
812
816
  #search-result-wrapper {
813
817
  display: none;
814
- position: fixed;
815
- top: 0;
816
- padding-top: 3rem;
817
818
  height: 100%;
818
819
  overflow: auto;
819
820
  .post-content {
@@ -944,7 +945,7 @@ $sidebar-display: "sidebar-display";
944
945
  }
945
946
 
946
947
  > div {
947
- max-width: 100%;
948
+ width: 100%;
948
949
 
949
950
  &:not(:last-child) {
950
951
  margin-bottom: 1rem;
@@ -1257,6 +1258,10 @@ $sidebar-display: "sidebar-display";
1257
1258
  min-width: 150px;
1258
1259
  }
1259
1260
 
1261
+ #search-result-wrapper {
1262
+ margin-top: 3rem;
1263
+ }
1264
+
1260
1265
  div.post-content .table-wrapper > table {
1261
1266
  min-width: 70%;
1262
1267
  }
@@ -1311,10 +1316,6 @@ $sidebar-display: "sidebar-display";
1311
1316
  left: 210px;
1312
1317
  }
1313
1318
 
1314
- #search-result-wrapper {
1315
- width: calc(100% - 210px);
1316
- }
1317
-
1318
1319
  #search-results > div {
1319
1320
  max-width: 700px;
1320
1321
  }
@@ -1392,12 +1393,8 @@ $sidebar-display: "sidebar-display";
1392
1393
  transition: all 0.3s ease-in-out;
1393
1394
  }
1394
1395
 
1395
- #search-result-wrapper {
1396
- width: calc(100% - 260px);
1397
- }
1398
-
1399
1396
  #search-results > div {
1400
- max-width: 46%;
1397
+ width: 46%;
1401
1398
  &:nth-child(odd) {
1402
1399
  margin-right: 1.5rem;
1403
1400
  }
@@ -1608,7 +1605,6 @@ $sidebar-display: "sidebar-display";
1608
1605
  }
1609
1606
 
1610
1607
  #search-result-wrapper {
1611
- width: calc(100% - #{$sidebar-width-large});
1612
1608
  > div {
1613
1609
  max-width: #{$main-content-max-width};
1614
1610
  }
@@ -1651,7 +1647,7 @@ $sidebar-display: "sidebar-display";
1651
1647
  }
1652
1648
 
1653
1649
  #search-result-wrapper {
1654
- padding-right: calc(100% - #{$sidebar-width-large} - 1530px);
1650
+ padding-right: calc(100% - #{$sidebar-width-large} - 1180px);
1655
1651
  }
1656
1652
 
1657
1653
  #panel-wrapper {
@@ -34,6 +34,7 @@
34
34
  }
35
35
 
36
36
  %heading {
37
+ color: var(--heading-color);
37
38
  font-weight: 400;
38
39
  font-family: 'Lato', 'Microsoft Yahei', sans-serif;
39
40
  }
@@ -157,7 +157,7 @@ div {
157
157
  div[class^='language-']::before {
158
158
  content: attr(lang);
159
159
  position: absolute;
160
- right: 1.8rem;
160
+ right: 2rem;
161
161
  margin-top: 3px;
162
162
  font-size: 0.7rem;
163
163
  font-weight: 600;
@@ -170,3 +170,9 @@ div[class^='language-']::before {
170
170
  right: 3.1rem;
171
171
  }
172
172
  }
173
+
174
+ @media (min-width: 1650px) {
175
+ div[class^='language-']::before {
176
+ right: 3.5rem;
177
+ }
178
+ }
@@ -15,6 +15,7 @@
15
15
 
16
16
  /* common color */
17
17
  --text-color: rgb(175, 176, 177);
18
+ --heading-color: #cccccc;
18
19
  --text-muted-color: rgb(107, 116, 124);
19
20
  --link-color: rgb(138, 180, 248);
20
21
  --link-underline-color: rgb(82, 108, 150);
@@ -68,7 +68,7 @@
68
68
 
69
69
  /* --- custom light colors --- */
70
70
  --highlight-bg-color: #f7f7f7;
71
- --highlighter-rouge-color: #353a3d;
71
+ --highlighter-rouge-color: #505050;
72
72
  --highlight-lineno-color: #c2c6cc;
73
73
  --highlight-lineno-border-color: #e9ecef;
74
74
  --inline-code-bg: #f3f3f3;
@@ -9,7 +9,8 @@
9
9
  --main-wrapper-bg: white;
10
10
  --main-border-color: #f3f3f3;
11
11
  --btn-border-color: #e9ecef;
12
- --text-color: #333333;
12
+ --text-color: #4a4a4a;
13
+ --heading-color: black;
13
14
  --blockquote-border-color: #eee;
14
15
  --blockquote-text-color: #9a9a9a;
15
16
  --link-color: #2a408e;
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * The styles for Jekyll theme Chirpy
3
3
  *
4
- * Chirpy v3.1.0 (https://github.com/cotes2020/jekyll-theme-chirpy)
4
+ * Chirpy v3.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy)
5
5
  * © 2019 Cotes Chung
6
6
  * MIT Licensed
7
7
  */
@@ -23,6 +23,10 @@
23
23
  padding-right: $pr;
24
24
  }
25
25
 
26
+ .timeago::before {
27
+ content: attr(prefix);
28
+ }
29
+
26
30
  #post-wrapper .post-meta {
27
31
  > div:nth-child(2) {
28
32
  > span:not(:first-child)::before {
@@ -66,11 +70,13 @@
66
70
  @include btn-post-nav;
67
71
 
68
72
  color: var(--link-color);
73
+
69
74
  &:hover {
70
75
  background: #2a408e;
71
76
  color: #fff;
72
77
  border-color: #2a408e;
73
78
  }
79
+
74
80
  &.disabled {
75
81
  @include btn-post-nav;
76
82
 
@@ -78,34 +84,29 @@
78
84
  cursor: not-allowed;
79
85
  background: none;
80
86
  color: gray;
87
+
81
88
  &:hover {
82
89
  border-color: none;
83
90
  }
84
91
  }
92
+
85
93
  &.btn-outline-primary.disabled:focus {
86
94
  box-shadow: none;
87
95
  }
96
+
88
97
  &::before {
89
98
  color: var(--text-muted-color);
90
99
  font-size: 0.65rem;
91
100
  text-transform: uppercase;
92
101
  content: attr(prompt);
93
102
  }
94
- }
95
-
96
- p {
97
- font-size: 1.1rem;
98
- line-height: 1.5rem;
99
- margin-top: 0.3rem;
100
- white-space: normal;
101
- }
102
103
 
103
- a {
104
104
  &:first-child {
105
105
  border-top-right-radius: 0;
106
106
  border-bottom-right-radius: 0;
107
107
  left: 0.5px;
108
108
  }
109
+
109
110
  &:last-child {
110
111
  border-top-left-radius: 0;
111
112
  border-bottom-left-radius: 0;
@@ -113,6 +114,13 @@
113
114
  }
114
115
  }
115
116
 
117
+ p {
118
+ font-size: 1.1rem;
119
+ line-height: 1.5rem;
120
+ margin-top: 0.3rem;
121
+ white-space: normal;
122
+ }
123
+
116
124
  } // .post-navigation
117
125
 
118
126
  @keyframes fade-up {
@@ -226,10 +234,6 @@
226
234
  vertical-align: middle;
227
235
  user-select: none;
228
236
 
229
- i {
230
- font-weight: 400;
231
- }
232
-
233
237
  .share-icons {
234
238
  font-size: 1.2rem;
235
239
  a {
@@ -337,12 +341,6 @@
337
341
  } // .post
338
342
  }
339
343
 
340
- @media all and (min-width: 768px) and (max-width: 830px) {
341
- .post img {
342
- max-width: calc(100% + 2rem);
343
- }
344
- }
345
-
346
344
  /* Hide SideBar and TOC */
347
345
  @media all and (max-width: 830px) {
348
346
  .post-navigation {
@@ -5,24 +5,28 @@ layout: compress
5
5
  ---
6
6
 
7
7
  const include = [
8
+ /* --- CSS --- */
8
9
 
9
- /*--- CSS ---*/
10
10
  '{{ "/assets/css/style.css" | relative_url }}',
11
11
 
12
- /*--- Javascripts ---*/
12
+ /* --- Javascripts --- */
13
13
  '{{ "/assets/js/dist/home.min.js" | relative_url }}',
14
14
  '{{ "/assets/js/dist/page.min.js" | relative_url }}',
15
15
  '{{ "/assets/js/dist/post.min.js" | relative_url }}',
16
16
  '{{ "/assets/js/dist/categories.min.js" | relative_url }}',
17
+ '{{ "/assets/js/data/search.json" | relative_url }}',
18
+ '{{ "/app.js" | relative_url }}',
19
+ '{{ "/sw.js" | relative_url }}',
17
20
 
18
- /*--- HTML ---*/
19
-
20
- /* Tabs */
21
+ /* --- HTML --- */
22
+ '{{ "/index.html" | relative_url }}',
23
+ '{{ "/404.html" | relative_url }}',
21
24
  {% for tab in site.tabs %}
22
25
  '{{ tab.url }}',
23
26
  {% endfor %}
24
27
 
25
- /*--- Icons ---*/
28
+
29
+ /* --- Icons --- */
26
30
 
27
31
  {%- capture icon_url -%}
28
32
  {{ "/assets/img/favicons" | relative_url }}
@@ -45,15 +49,7 @@ const include = [
45
49
  '{{ icon_url }}/favicon-16x16.png',
46
50
  '{{ icon_url }}/ms-icon-144x144.png',
47
51
  '{{ icon_url }}/manifest.json',
48
- '{{ icon_url }}/browserconfig.xml',
49
-
50
- /*--- Others ---*/
51
-
52
- '{{ "/assets/js/data/search.json" | relative_url }}',
53
- '{{ "/404.html" | relative_url }}',
54
-
55
- '{{ "/app.js" | relative_url }}',
56
- '{{ "/sw.js" | relative_url }}'
52
+ '{{ icon_url }}/browserconfig.xml'
57
53
  ];
58
54
 
59
55
  const exclude = [
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Chirpy v3.1.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v3.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
6
- function copyLink(e){e&&0!==e.length||(e=window.location.href);const o=$("<input>");$("body").append(o),o.val(e).select(),document.execCommand("copy"),o.remove(),alert("Link copied successfully!")}$(function(){$(window).scroll(()=>{$(this).scrollTop()>50&&"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(){$("input[type=checkbox]").addClass("unloaded"),$("input[type=checkbox][checked]").before('<i class="fas fa-check-circle checked"></i>'),$("input[type=checkbox]:not([checked])").before('<i class="far fa-circle"></i>')}),$(function(){const e=$("#sidebar-trigger"),o=$("#search-trigger"),s=$("#search-cancel"),t=$("#search-cleaner"),a=$("#main"),l=$("#topbar-title"),n=$("#search-wrapper"),d=$("#search-result-wrapper"),r=$("#search-results"),c=$("#search-input"),i=$("#search-hints"),f=function(){let e=0;return{block(){e=$(window).scrollTop()},release(){$("html,body").scrollTop(e)},getOffset:()=>e}}(),u={on(){e.addClass("unloaded"),l.addClass("unloaded"),o.addClass("unloaded"),n.addClass("d-flex"),s.addClass("loaded")},off(){s.removeClass("loaded"),n.removeClass("d-flex"),e.removeClass("unloaded"),l.removeClass("unloaded"),o.removeClass("unloaded")}},p=function(){let e=!1;return{on(){e||(d.removeClass("unloaded"),a.addClass("hidden"),e=!0,f.block())},off(){e&&(r.empty(),i.hasClass("unloaded")&&i.removeClass("unloaded"),d.addClass("unloaded"),t.removeClass("visible"),a.removeClass("hidden"),c.val(""),e=!1,f.release())},isVisible:()=>e}}();function h(){return s.hasClass("loaded")}o.click(function(){u.on(),p.on(),c.focus()}),s.click(function(){u.off(),p.off()}),c.focus(function(){n.addClass("input-focus")}),c.focusout(function(){n.removeClass("input-focus")}),c.on("keyup",function(e){8===e.keyCode&&""===c.val()?h()?i.removeClass("unloaded"):p.off():""!==c.val()&&(p.on(),t.hasClass("visible")||t.addClass("visible"),h()&&i.addClass("unloaded"))}),t.on("click",function(){c.val(""),h()?(i.removeClass("unloaded"),r.empty()):p.off(),c.focus(),t.removeClass("visible")})}),$(function(){const e=function(){let e=!1;const o=$("body");return{toggle(){!1===e?o.attr("sidebar-display",""):o.removeAttr("sidebar-display"),e=!e}}}();$("#sidebar-trigger").click(e.toggle),$("#mask").click(e.toggle)}),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){const e=$("#topbar-wrapper"),o=$("#toc-wrapper"),s=$(".access"),t=$("#search-input");let a,l=0;const n=5,d=e.outerHeight();$(window).scroll(function(e){$("#topbar-title").is(":hidden")&&(a=!0)}),setInterval(function(){a&&(!function(){var a=$(this).scrollTop();Math.abs(l-a)<=n||(a>l&&a>d?(e.removeClass("topbar-down").addClass("topbar-up"),o.length>0&&o.removeClass("topbar-down"),s.length>0&&s.removeClass("topbar-down"),t.is(":focus")&&t.blur()):a+$(window).height()<$(document).height()&&(e.removeClass("topbar-up").addClass("topbar-down"),o.length>0&&o.addClass("topbar-down"),s.length>0&&s.addClass("topbar-down")),l=a)}(),a=!1)},250)}),$(function(){const e=$("#topbar-title"),o=$("div.post>h1"),s=e.text().trim();let t=o.length>0?o.text().trim():$("h1").text().trim();($("#page-category").length||$("#page-tag").length)&&/\s/.test(t)&&(t=t.replace(/[0-9]/g,"").trim()),$(window).scroll(function(){if($("#post-list").length||o.is(":hidden")||e.is(":hidden")||$("#sidebar.sidebar-expand").length)return!1;$(this).scrollTop()>=95?e.text()!==t&&e.text(t):e.text()!==s&&e.text(s)}),e.click(function(){$("body,html").animate({scrollTop:0},800)})}),$(function(){const e=$(".collapse");e.on("hide.bs.collapse",function(){const 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(){const 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"))})});
6
+ function copyLink(e){e&&0!==e.length||(e=window.location.href);const o=$("<input>");$("body").append(o),o.val(e).select(),document.execCommand("copy"),o.remove(),alert("Link copied successfully!")}$(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(){$("input[type=checkbox]").addClass("unloaded"),$("input[type=checkbox][checked]").before('<i class="fas fa-check-circle checked"></i>'),$("input[type=checkbox]:not([checked])").before('<i class="far fa-circle"></i>')}),$(function(){const e=$("#sidebar-trigger"),o=$("#search-trigger"),t=$("#search-cancel"),s=$("#search-cleaner"),a=$("#main"),l=$("#topbar-title"),n=$("#search-wrapper"),r=$("#search-result-wrapper"),d=$("#search-results"),c=$("#search-input"),i=$("#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"),n.addClass("d-flex"),t.addClass("loaded")},off(){t.removeClass("loaded"),n.removeClass("d-flex"),e.removeClass("unloaded"),l.removeClass("unloaded"),o.removeClass("unloaded")}},p=function(){let e=!1;return{on(){e||(u.block(),r.removeClass("unloaded"),a.addClass("unloaded"),e=!0)},off(){e&&(d.empty(),i.hasClass("unloaded")&&i.removeClass("unloaded"),r.addClass("unloaded"),s.removeClass("visible"),a.removeClass("unloaded"),u.release(),c.val(""),e=!1)},isVisible(){return e}}}();function h(){return t.hasClass("loaded")}o.click(function(){f.on(),p.on(),c.focus()}),t.click(function(){f.off(),p.off()}),c.focus(function(){n.addClass("input-focus")}),c.focusout(function(){n.removeClass("input-focus")}),c.on("keyup",function(e){8===e.keyCode&&""===c.val()?h()?i.removeClass("unloaded"):p.off():""!==c.val()&&(p.on(),s.hasClass("visible")||s.addClass("visible"),h()&&i.addClass("unloaded"))}),s.on("click",function(){c.val(""),h()?(i.removeClass("unloaded"),d.empty()):p.off(),c.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 o=$("#topbar-wrapper"),t=$("#toc-wrapper"),s=$(".access"),a=$("#search-input");let l,n=0;const r=o.outerHeight();$(window).scroll(function(e){$("#topbar-title").is(":hidden")&&(l=!0)}),setInterval(function(){l&&(function(){var e=$(this).scrollTop();Math.abs(n-e)<=5||(e>n&&e>r?(o.removeClass("topbar-down").addClass("topbar-up"),0<t.length&&t.removeClass("topbar-down"),0<s.length&&s.removeClass("topbar-down"),a.is(":focus")&&a.blur()):e+$(window).height()<$(document).height()&&(o.removeClass("topbar-up").addClass("topbar-down"),0<t.length&&t.addClass("topbar-down"),0<s.length&&s.addClass("topbar-down")),n=e)}(),l=!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 v3.1.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v3.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
6
- function copyLink(e){e&&0!==e.length||(e=window.location.href);const t=$("<input>");$("body").append(t),t.val(e).select(),document.execCommand("copy"),t.remove(),alert("Link copied successfully!")}$(function(){$(window).scroll(()=>{$(this).scrollTop()>50&&"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(){$("input[type=checkbox]").addClass("unloaded"),$("input[type=checkbox][checked]").before('<i class="fas fa-check-circle checked"></i>'),$("input[type=checkbox]:not([checked])").before('<i class="far fa-circle"></i>')}),$(function(){const e=$("#sidebar-trigger"),t=$("#search-trigger"),o=$("#search-cancel"),a=$("#search-cleaner"),s=$("#main"),n=$("#topbar-title"),l=$("#search-wrapper"),i=$("#search-result-wrapper"),r=$("#search-results"),c=$("#search-input"),d=$("#search-hints"),u=function(){let e=0;return{block(){e=$(window).scrollTop()},release(){$("html,body").scrollTop(e)},getOffset:()=>e}}(),h={on(){e.addClass("unloaded"),n.addClass("unloaded"),t.addClass("unloaded"),l.addClass("d-flex"),o.addClass("loaded")},off(){o.removeClass("loaded"),l.removeClass("d-flex"),e.removeClass("unloaded"),n.removeClass("unloaded"),t.removeClass("unloaded")}},f=function(){let e=!1;return{on(){e||(i.removeClass("unloaded"),s.addClass("hidden"),e=!0,u.block())},off(){e&&(r.empty(),d.hasClass("unloaded")&&d.removeClass("unloaded"),i.addClass("unloaded"),a.removeClass("visible"),s.removeClass("hidden"),c.val(""),e=!1,u.release())},isVisible:()=>e}}();function p(){return o.hasClass("loaded")}t.click(function(){h.on(),f.on(),c.focus()}),o.click(function(){h.off(),f.off()}),c.focus(function(){l.addClass("input-focus")}),c.focusout(function(){l.removeClass("input-focus")}),c.on("keyup",function(e){8===e.keyCode&&""===c.val()?p()?d.removeClass("unloaded"):f.off():""!==c.val()&&(f.on(),a.hasClass("visible")||a.addClass("visible"),p()&&d.addClass("unloaded"))}),a.on("click",function(){c.val(""),p()?(d.removeClass("unloaded"),r.empty()):f.off(),c.focus(),a.removeClass("visible")})}),$(function(){const e=function(){let e=!1;const t=$("body");return{toggle(){!1===e?t.attr("sidebar-display",""):t.removeAttr("sidebar-display"),e=!e}}}();$("#sidebar-trigger").click(e.toggle),$("#mask").click(e.toggle)}),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){const e=$("#topbar-wrapper"),t=$("#toc-wrapper"),o=$(".access"),a=$("#search-input");let s,n=0;const l=5,i=e.outerHeight();$(window).scroll(function(e){$("#topbar-title").is(":hidden")&&(s=!0)}),setInterval(function(){s&&(!function(){var s=$(this).scrollTop();Math.abs(n-s)<=l||(s>n&&s>i?(e.removeClass("topbar-down").addClass("topbar-up"),t.length>0&&t.removeClass("topbar-down"),o.length>0&&o.removeClass("topbar-down"),a.is(":focus")&&a.blur()):s+$(window).height()<$(document).height()&&(e.removeClass("topbar-up").addClass("topbar-down"),t.length>0&&t.addClass("topbar-down"),o.length>0&&o.addClass("topbar-down")),n=s)}(),s=!1)},250)}),$(function(){const e=$("#topbar-title"),t=$("div.post>h1"),o=e.text().trim();let a=t.length>0?t.text().trim():$("h1").text().trim();($("#page-category").length||$("#page-tag").length)&&/\s/.test(a)&&(a=a.replace(/[0-9]/g,"").trim()),$(window).scroll(function(){if($("#post-list").length||t.is(":hidden")||e.is(":hidden")||$("#sidebar.sidebar-expand").length)return!1;$(this).scrollTop()>=95?e.text()!==a&&e.text(a):e.text()!==o&&e.text(o)}),e.click(function(){$("body,html").animate({scrollTop:0},800)})}),$(function(){let e=$(".timeago").length,t=void 0;function o(){return $(".timeago").each(function(){if($(this).children("i").length>0){$(this).text();let t=$(this).hasClass("lastmod"),o=$(this).children("i"),a=o.text();$(this).text(function(t,o){let a=new Date,s=new Date(t);if(s.getFullYear()!==a.getFullYear())return e-=1,s.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric"});if(s.getMonth()!==a.getMonth())return e-=1,s.toLocaleString("en-US",{month:"short",day:"numeric"});let n=Math.floor((a-s)/1e3),l=Math.floor(n/86400);if(l>=1)return e-=1,l+" day"+(l>1?"s":"")+" ago";let i=Math.floor(n/3600);if(i>=1)return i+" hour"+(i>1?"s":"")+" ago";let r=Math.floor(n/60);return r>=1?r+" minute"+(r>1?"s":"")+" ago":(o?"just":"Just")+" now"}(a,t)),$(this).append(o)}}),0===e&&void 0!==t&&clearInterval(t),e}0!==e&&o()>0&&(t=setInterval(o,6e4))});
6
+ function copyLink(e){e&&0!==e.length||(e=window.location.href);const o=$("<input>");$("body").append(o),o.val(e).select(),document.execCommand("copy"),o.remove(),alert("Link copied successfully!")}$(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(){$("input[type=checkbox]").addClass("unloaded"),$("input[type=checkbox][checked]").before('<i class="fas fa-check-circle checked"></i>'),$("input[type=checkbox]:not([checked])").before('<i class="far fa-circle"></i>')}),$(function(){const e=$("#sidebar-trigger"),o=$("#search-trigger"),t=$("#search-cancel"),a=$("#search-cleaner"),s=$("#main"),n=$("#topbar-title"),l=$("#search-wrapper"),r=$("#search-result-wrapper"),i=$("#search-results"),c=$("#search-input"),d=$("#search-hints"),u=function(){let e=0;return{block(){e=window.scrollY,$("html,body").scrollTop(0)},release(){$("html,body").scrollTop(e)},getOffset(){return e}}}(),h={on(){e.addClass("unloaded"),n.addClass("unloaded"),o.addClass("unloaded"),l.addClass("d-flex"),t.addClass("loaded")},off(){t.removeClass("loaded"),l.removeClass("d-flex"),e.removeClass("unloaded"),n.removeClass("unloaded"),o.removeClass("unloaded")}},f=function(){let e=!1;return{on(){e||(u.block(),r.removeClass("unloaded"),s.addClass("unloaded"),e=!0)},off(){e&&(i.empty(),d.hasClass("unloaded")&&d.removeClass("unloaded"),r.addClass("unloaded"),a.removeClass("visible"),s.removeClass("unloaded"),u.release(),c.val(""),e=!1)},isVisible(){return e}}}();function p(){return t.hasClass("loaded")}o.click(function(){h.on(),f.on(),c.focus()}),t.click(function(){h.off(),f.off()}),c.focus(function(){l.addClass("input-focus")}),c.focusout(function(){l.removeClass("input-focus")}),c.on("keyup",function(e){8===e.keyCode&&""===c.val()?p()?d.removeClass("unloaded"):f.off():""!==c.val()&&(f.on(),a.hasClass("visible")||a.addClass("visible"),p()&&d.addClass("unloaded"))}),a.on("click",function(){c.val(""),p()?(d.removeClass("unloaded"),i.empty()):f.off(),c.focus(),a.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 o=$("#topbar-wrapper"),t=$("#toc-wrapper"),a=$(".access"),s=$("#search-input");let n,l=0;const r=o.outerHeight();$(window).scroll(function(e){$("#topbar-title").is(":hidden")&&(n=!0)}),setInterval(function(){n&&(function(){var e=$(this).scrollTop();Math.abs(l-e)<=5||(e>l&&e>r?(o.removeClass("topbar-down").addClass("topbar-up"),0<t.length&&t.removeClass("topbar-down"),0<a.length&&a.removeClass("topbar-down"),s.is(":focus")&&s.blur()):e+$(window).height()<$(document).height()&&(o.removeClass("topbar-up").addClass("topbar-down"),0<t.length&&t.addClass("topbar-down"),0<a.length&&a.addClass("topbar-down")),l=e)}(),n=!1)},250)}),$(function(){const e=$("#topbar-title"),o=$("div.post>h1"),t=e.text().trim();let a=(0<o.length?o:$("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||o.is(":hidden")||e.is(":hidden")||$("#sidebar.sidebar-expand").length)&&void(95<=$(this).scrollTop()?e.text()!==a&&e.text(a):e.text()!==t&&e.text(t))}),e.click(function(){$("body,html").animate({scrollTop:0},800)})}),$(function(){let s=$(".timeago").length,e=void 0;function o(){return $(".timeago").each(function(){if(0<$(this).children("i").length){let e=$(this).children("i");var o=e.text();$(this).text(function(e,o){let t=new Date,a=new Date(e);return e=void 0!==o?`${o} `:"",a.getFullYear()!==t.getFullYear()?(--s,e+a.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric"})):a.getMonth()!==t.getMonth()?(--s,e+a.toLocaleString("en-US",{month:"short",day:"numeric"})):(o=Math.floor((t-a)/1e3),1<=(e=Math.floor(o/86400))?(--s,e+" day"+(1<e?"s":"")+" ago"):1<=(e=Math.floor(o/3600))?e+" hour"+(1<e?"s":"")+" ago":1<=(o=Math.floor(o/60))?o+" minute"+(1<o?"s":"")+" ago":"just now")}(o,$(this).attr("prep"))),$(this).append(e)}}),0===s&&void 0!==e&&clearInterval(e),s}0!==s&&0<o()&&(e=setInterval(o,6e4))});
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Chirpy v3.1.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v3.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
6
- function copyLink(e){e&&0!==e.length||(e=window.location.href);const t=$("<input>");$("body").append(t),t.val(e).select(),document.execCommand("copy"),t.remove(),alert("Link copied successfully!")}$(function(){$(window).scroll(()=>{$(this).scrollTop()>50&&"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(){$("input[type=checkbox]").addClass("unloaded"),$("input[type=checkbox][checked]").before('<i class="fas fa-check-circle checked"></i>'),$("input[type=checkbox]:not([checked])").before('<i class="far fa-circle"></i>')}),$(function(){const e=$("#sidebar-trigger"),t=$("#search-trigger"),o=$("#search-cancel"),s=$("#search-cleaner"),a=$("#main"),l=$("#topbar-title"),n=$("#search-wrapper"),c=$("#search-result-wrapper"),r=$("#search-results"),i=$("#search-input"),d=$("#search-hints"),u=function(){let e=0;return{block(){e=$(window).scrollTop()},release(){$("html,body").scrollTop(e)},getOffset:()=>e}}(),f={on(){e.addClass("unloaded"),l.addClass("unloaded"),t.addClass("unloaded"),n.addClass("d-flex"),o.addClass("loaded")},off(){o.removeClass("loaded"),n.removeClass("d-flex"),e.removeClass("unloaded"),l.removeClass("unloaded"),t.removeClass("unloaded")}},p=function(){let e=!1;return{on(){e||(c.removeClass("unloaded"),a.addClass("hidden"),e=!0,u.block())},off(){e&&(r.empty(),d.hasClass("unloaded")&&d.removeClass("unloaded"),c.addClass("unloaded"),s.removeClass("visible"),a.removeClass("hidden"),i.val(""),e=!1,u.release())},isVisible:()=>e}}();function h(){return o.hasClass("loaded")}t.click(function(){f.on(),p.on(),i.focus()}),o.click(function(){f.off(),p.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()?d.removeClass("unloaded"):p.off():""!==i.val()&&(p.on(),s.hasClass("visible")||s.addClass("visible"),h()&&d.addClass("unloaded"))}),s.on("click",function(){i.val(""),h()?(d.removeClass("unloaded"),r.empty()):p.off(),i.focus(),s.removeClass("visible")})}),$(function(){const e=function(){let e=!1;const t=$("body");return{toggle(){!1===e?t.attr("sidebar-display",""):t.removeAttr("sidebar-display"),e=!e}}}();$("#sidebar-trigger").click(e.toggle),$("#mask").click(e.toggle)}),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){const e=$("#topbar-wrapper"),t=$("#toc-wrapper"),o=$(".access"),s=$("#search-input");let a,l=0;const n=5,c=e.outerHeight();$(window).scroll(function(e){$("#topbar-title").is(":hidden")&&(a=!0)}),setInterval(function(){a&&(!function(){var a=$(this).scrollTop();Math.abs(l-a)<=n||(a>l&&a>c?(e.removeClass("topbar-down").addClass("topbar-up"),t.length>0&&t.removeClass("topbar-down"),o.length>0&&o.removeClass("topbar-down"),s.is(":focus")&&s.blur()):a+$(window).height()<$(document).height()&&(e.removeClass("topbar-up").addClass("topbar-down"),t.length>0&&t.addClass("topbar-down"),o.length>0&&o.addClass("topbar-down")),l=a)}(),a=!1)},250)}),$(function(){const e=$("#topbar-title"),t=$("div.post>h1"),o=e.text().trim();let s=t.length>0?t.text().trim():$("h1").text().trim();($("#page-category").length||$("#page-tag").length)&&/\s/.test(s)&&(s=s.replace(/[0-9]/g,"").trim()),$(window).scroll(function(){if($("#post-list").length||t.is(":hidden")||e.is(":hidden")||$("#sidebar.sidebar-expand").length)return!1;$(this).scrollTop()>=95?e.text()!==s&&e.text(s):e.text()!==o&&e.text(o)}),e.click(function(){$("body,html").animate({scrollTop:0},800)})}),$(function(){$("a[href*='#']").not("[href='#']").not("[href='#0']").click(function(e){if(this.pathname.replace(/^\//,"")===location.pathname.replace(/^\//,"")&&location.hostname===this.hostname){const t=16,o=decodeURI(this.hash);let s=RegExp(/^#fnref:/).test(o),a=RegExp(/^#fn:/).test(o),l=o.includes(":")?o.replace(/\:/,"\\:"):o,n=$(l);if(n.length){e.preventDefault(),history.pushState&&history.pushState(null,null,o);let l=$(this).offset().top,c=n.offset().top;const r=c<l,i=$("#topbar-wrapper").outerHeight();r&&s&&(c-=i+t/2),$("html,body").animate({scrollTop:c},800,()=>{const e=$(n);e.focus();if($("[scroll-focus=true]").length&&$("[scroll-focus=true]").attr("scroll-focus",!1),$(":target").length&&$(":target").attr("scroll-focus",!1),(a||s)&&e.attr("scroll-focus",!0),e.is(":focus"))return!1;e.attr("tabindex","-1"),e.focus()})}}})});
6
+ function copyLink(e){e&&0!==e.length||(e=window.location.href);const t=$("<input>");$("body").append(t),t.val(e).select(),document.execCommand("copy"),t.remove(),alert("Link copied successfully!")}$(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(){$("input[type=checkbox]").addClass("unloaded"),$("input[type=checkbox][checked]").before('<i class="fas fa-check-circle checked"></i>'),$("input[type=checkbox]:not([checked])").before('<i class="far fa-circle"></i>')}),$(function(){const e=$("#sidebar-trigger"),t=$("#search-trigger"),o=$("#search-cancel"),s=$("#search-cleaner"),a=$("#main"),l=$("#topbar-title"),n=$("#search-wrapper"),r=$("#search-result-wrapper"),c=$("#search-results"),i=$("#search-input"),d=$("#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"),l.addClass("unloaded"),t.addClass("unloaded"),n.addClass("d-flex"),o.addClass("loaded")},off(){o.removeClass("loaded"),n.removeClass("d-flex"),e.removeClass("unloaded"),l.removeClass("unloaded"),t.removeClass("unloaded")}},f=function(){let e=!1;return{on(){e||(u.block(),r.removeClass("unloaded"),a.addClass("unloaded"),e=!0)},off(){e&&(c.empty(),d.hasClass("unloaded")&&d.removeClass("unloaded"),r.addClass("unloaded"),s.removeClass("visible"),a.removeClass("unloaded"),u.release(),i.val(""),e=!1)},isVisible(){return e}}}();function h(){return o.hasClass("loaded")}t.click(function(){p.on(),f.on(),i.focus()}),o.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()?d.removeClass("unloaded"):f.off():""!==i.val()&&(f.on(),s.hasClass("visible")||s.addClass("visible"),h()&&d.addClass("unloaded"))}),s.on("click",function(){i.val(""),h()?(d.removeClass("unloaded"),c.empty()):f.off(),i.focus(),s.removeClass("visible")})}),$(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=$("#topbar-wrapper"),o=$("#toc-wrapper"),s=$(".access"),a=$("#search-input");let l,n=0;const r=t.outerHeight();$(window).scroll(function(e){$("#topbar-title").is(":hidden")&&(l=!0)}),setInterval(function(){l&&(function(){var e=$(this).scrollTop();Math.abs(n-e)<=5||(e>n&&e>r?(t.removeClass("topbar-down").addClass("topbar-up"),0<o.length&&o.removeClass("topbar-down"),0<s.length&&s.removeClass("topbar-down"),a.is(":focus")&&a.blur()):e+$(window).height()<$(document).height()&&(t.removeClass("topbar-up").addClass("topbar-down"),0<o.length&&o.addClass("topbar-down"),0<s.length&&s.addClass("topbar-down")),n=e)}(),l=!1)},250)}),$(function(){const e=$("#topbar-title"),t=$("div.post>h1"),o=e.text().trim();let s=(0<t.length?t:$("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||t.is(":hidden")||e.is(":hidden")||$("#sidebar.sidebar-expand").length)&&void(95<=$(this).scrollTop()?e.text()!==s&&e.text(s):e.text()!==o&&e.text(o))}),e.click(function(){$("body,html").animate({scrollTop:0},800)})}),$(function(){$("a[href*='#']").not("[href='#']").not("[href='#0']").click(function(t){if(this.pathname.replace(/^\//,"")===location.pathname.replace(/^\//,"")&&location.hostname===this.hostname){const n=decodeURI(this.hash);let o=RegExp(/^#fnref:/).test(n),s=RegExp(/^#fn:/).test(n);var l=n.includes(":")?n.replace(/\:/,"\\:"):n;let a=$(l);if(a.length){t.preventDefault(),history.pushState&&history.pushState(null,null,n);l=$(this).offset().top;let e=a.offset().top;t=e<l,l=$("#topbar-wrapper").outerHeight();t&&o&&(e-=l+8),$("html,body").animate({scrollTop:e},800,()=>{const e=$(a);e.focus();var t="scroll-focus";if($(`[${t}=true]`).length&&$(`[${t}=true]`).attr(t,!1),$(":target").length&&$(":target").attr(t,!1),(s||o)&&e.attr(t,!0),e.is(":focus"))return!1;e.attr("tabindex","-1"),e.focus()})}}})});
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Chirpy v3.1.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v3.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
6
- function copyLink(e){e&&0!==e.length||(e=window.location.href);const t=$("<input>");$("body").append(t),t.val(e).select(),document.execCommand("copy"),t.remove(),alert("Link copied successfully!")}$(function(){$(window).scroll(()=>{$(this).scrollTop()>50&&"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(){$("input[type=checkbox]").addClass("unloaded"),$("input[type=checkbox][checked]").before('<i class="fas fa-check-circle checked"></i>'),$("input[type=checkbox]:not([checked])").before('<i class="far fa-circle"></i>')}),$(function(){const e=$("#sidebar-trigger"),t=$("#search-trigger"),o=$("#search-cancel"),s=$("#search-cleaner"),a=$("#main"),n=$("#topbar-title"),l=$("#search-wrapper"),r=$("#search-result-wrapper"),i=$("#search-results"),c=$("#search-input"),d=$("#search-hints"),u=function(){let e=0;return{block(){e=$(window).scrollTop()},release(){$("html,body").scrollTop(e)},getOffset:()=>e}}(),h={on(){e.addClass("unloaded"),n.addClass("unloaded"),t.addClass("unloaded"),l.addClass("d-flex"),o.addClass("loaded")},off(){o.removeClass("loaded"),l.removeClass("d-flex"),e.removeClass("unloaded"),n.removeClass("unloaded"),t.removeClass("unloaded")}},f=function(){let e=!1;return{on(){e||(r.removeClass("unloaded"),a.addClass("hidden"),e=!0,u.block())},off(){e&&(i.empty(),d.hasClass("unloaded")&&d.removeClass("unloaded"),r.addClass("unloaded"),s.removeClass("visible"),a.removeClass("hidden"),c.val(""),e=!1,u.release())},isVisible:()=>e}}();function p(){return o.hasClass("loaded")}t.click(function(){h.on(),f.on(),c.focus()}),o.click(function(){h.off(),f.off()}),c.focus(function(){l.addClass("input-focus")}),c.focusout(function(){l.removeClass("input-focus")}),c.on("keyup",function(e){8===e.keyCode&&""===c.val()?p()?d.removeClass("unloaded"):f.off():""!==c.val()&&(f.on(),s.hasClass("visible")||s.addClass("visible"),p()&&d.addClass("unloaded"))}),s.on("click",function(){c.val(""),p()?(d.removeClass("unloaded"),i.empty()):f.off(),c.focus(),s.removeClass("visible")})}),$(function(){const e=function(){let e=!1;const t=$("body");return{toggle(){!1===e?t.attr("sidebar-display",""):t.removeAttr("sidebar-display"),e=!e}}}();$("#sidebar-trigger").click(e.toggle),$("#mask").click(e.toggle)}),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){const e=$("#topbar-wrapper"),t=$("#toc-wrapper"),o=$(".access"),s=$("#search-input");let a,n=0;const l=5,r=e.outerHeight();$(window).scroll(function(e){$("#topbar-title").is(":hidden")&&(a=!0)}),setInterval(function(){a&&(!function(){var a=$(this).scrollTop();Math.abs(n-a)<=l||(a>n&&a>r?(e.removeClass("topbar-down").addClass("topbar-up"),t.length>0&&t.removeClass("topbar-down"),o.length>0&&o.removeClass("topbar-down"),s.is(":focus")&&s.blur()):a+$(window).height()<$(document).height()&&(e.removeClass("topbar-up").addClass("topbar-down"),t.length>0&&t.addClass("topbar-down"),o.length>0&&o.addClass("topbar-down")),n=a)}(),a=!1)},250)}),$(function(){const e=$("#topbar-title"),t=$("div.post>h1"),o=e.text().trim();let s=t.length>0?t.text().trim():$("h1").text().trim();($("#page-category").length||$("#page-tag").length)&&/\s/.test(s)&&(s=s.replace(/[0-9]/g,"").trim()),$(window).scroll(function(){if($("#post-list").length||t.is(":hidden")||e.is(":hidden")||$("#sidebar.sidebar-expand").length)return!1;$(this).scrollTop()>=95?e.text()!==s&&e.text(s):e.text()!==o&&e.text(o)}),e.click(function(){$("body,html").animate({scrollTop:0},800)})}),$(function(){let e=$(".timeago").length,t=void 0;function o(){return $(".timeago").each(function(){if($(this).children("i").length>0){$(this).text();let t=$(this).hasClass("lastmod"),o=$(this).children("i"),s=o.text();$(this).text(function(t,o){let s=new Date,a=new Date(t);if(a.getFullYear()!==s.getFullYear())return e-=1,a.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric"});if(a.getMonth()!==s.getMonth())return e-=1,a.toLocaleString("en-US",{month:"short",day:"numeric"});let n=Math.floor((s-a)/1e3),l=Math.floor(n/86400);if(l>=1)return e-=1,l+" day"+(l>1?"s":"")+" ago";let r=Math.floor(n/3600);if(r>=1)return r+" hour"+(r>1?"s":"")+" ago";let i=Math.floor(n/60);return i>=1?i+" minute"+(i>1?"s":"")+" ago":(o?"just":"Just")+" now"}(s,t)),$(this).append(o)}}),0===e&&void 0!==t&&clearInterval(t),e}0!==e&&o()>0&&(t=setInterval(o,6e4))}),$(function(){$("a:has(img)").addClass("img-hyperlink")}),$(function(){const e=new RegExp("^language-([a-z])+$");$("div[class^=language-").each(function(){$(this).attr("class").split(" ").forEach(t=>{if(e.test(t)){let e=t.substring("language-".length);$(this).attr("lang",`${e}`)}})})}),$(function(){$("a[href*='#']").not("[href='#']").not("[href='#0']").click(function(e){if(this.pathname.replace(/^\//,"")===location.pathname.replace(/^\//,"")&&location.hostname===this.hostname){const t=16,o=decodeURI(this.hash);let s=RegExp(/^#fnref:/).test(o),a=RegExp(/^#fn:/).test(o),n=o.includes(":")?o.replace(/\:/,"\\:"):o,l=$(n);if(l.length){e.preventDefault(),history.pushState&&history.pushState(null,null,o);let n=$(this).offset().top,r=l.offset().top;const i=r<n,c=$("#topbar-wrapper").outerHeight();i&&s&&(r-=c+t/2),$("html,body").animate({scrollTop:r},800,()=>{const e=$(l);e.focus();if($("[scroll-focus=true]").length&&$("[scroll-focus=true]").attr("scroll-focus",!1),$(":target").length&&$(":target").attr("scroll-focus",!1),(a||s)&&e.attr("scroll-focus",!0),e.is(":focus"))return!1;e.attr("tabindex","-1"),e.focus()})}}})});
6
+ function copyLink(e){e&&0!==e.length||(e=window.location.href);const t=$("<input>");$("body").append(t),t.val(e).select(),document.execCommand("copy"),t.remove(),alert("Link copied successfully!")}$(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(){$("input[type=checkbox]").addClass("unloaded"),$("input[type=checkbox][checked]").before('<i class="fas fa-check-circle checked"></i>'),$("input[type=checkbox]:not([checked])").before('<i class="far fa-circle"></i>')}),$(function(){const e=$("#sidebar-trigger"),t=$("#search-trigger"),o=$("#search-cancel"),a=$("#search-cleaner"),s=$("#main"),n=$("#topbar-title"),l=$("#search-wrapper"),r=$("#search-result-wrapper"),i=$("#search-results"),c=$("#search-input"),d=$("#search-hints"),u=function(){let e=0;return{block(){e=window.scrollY,$("html,body").scrollTop(0)},release(){$("html,body").scrollTop(e)},getOffset(){return e}}}(),h={on(){e.addClass("unloaded"),n.addClass("unloaded"),t.addClass("unloaded"),l.addClass("d-flex"),o.addClass("loaded")},off(){o.removeClass("loaded"),l.removeClass("d-flex"),e.removeClass("unloaded"),n.removeClass("unloaded"),t.removeClass("unloaded")}},f=function(){let e=!1;return{on(){e||(u.block(),r.removeClass("unloaded"),s.addClass("unloaded"),e=!0)},off(){e&&(i.empty(),d.hasClass("unloaded")&&d.removeClass("unloaded"),r.addClass("unloaded"),a.removeClass("visible"),s.removeClass("unloaded"),u.release(),c.val(""),e=!1)},isVisible(){return e}}}();function p(){return o.hasClass("loaded")}t.click(function(){h.on(),f.on(),c.focus()}),o.click(function(){h.off(),f.off()}),c.focus(function(){l.addClass("input-focus")}),c.focusout(function(){l.removeClass("input-focus")}),c.on("keyup",function(e){8===e.keyCode&&""===c.val()?p()?d.removeClass("unloaded"):f.off():""!==c.val()&&(f.on(),a.hasClass("visible")||a.addClass("visible"),p()&&d.addClass("unloaded"))}),a.on("click",function(){c.val(""),p()?(d.removeClass("unloaded"),i.empty()):f.off(),c.focus(),a.removeClass("visible")})}),$(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=$("#topbar-wrapper"),o=$("#toc-wrapper"),a=$(".access"),s=$("#search-input");let n,l=0;const r=t.outerHeight();$(window).scroll(function(e){$("#topbar-title").is(":hidden")&&(n=!0)}),setInterval(function(){n&&(function(){var e=$(this).scrollTop();Math.abs(l-e)<=5||(e>l&&e>r?(t.removeClass("topbar-down").addClass("topbar-up"),0<o.length&&o.removeClass("topbar-down"),0<a.length&&a.removeClass("topbar-down"),s.is(":focus")&&s.blur()):e+$(window).height()<$(document).height()&&(t.removeClass("topbar-up").addClass("topbar-down"),0<o.length&&o.addClass("topbar-down"),0<a.length&&a.addClass("topbar-down")),l=e)}(),n=!1)},250)}),$(function(){const e=$("#topbar-title"),t=$("div.post>h1"),o=e.text().trim();let a=(0<t.length?t:$("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||t.is(":hidden")||e.is(":hidden")||$("#sidebar.sidebar-expand").length)&&void(95<=$(this).scrollTop()?e.text()!==a&&e.text(a):e.text()!==o&&e.text(o))}),e.click(function(){$("body,html").animate({scrollTop:0},800)})}),$(function(){let s=$(".timeago").length,e=void 0;function t(){return $(".timeago").each(function(){if(0<$(this).children("i").length){let e=$(this).children("i");var t=e.text();$(this).text(function(e,t){let o=new Date,a=new Date(e);return e=void 0!==t?`${t} `:"",a.getFullYear()!==o.getFullYear()?(--s,e+a.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric"})):a.getMonth()!==o.getMonth()?(--s,e+a.toLocaleString("en-US",{month:"short",day:"numeric"})):(t=Math.floor((o-a)/1e3),1<=(e=Math.floor(t/86400))?(--s,e+" day"+(1<e?"s":"")+" ago"):1<=(e=Math.floor(t/3600))?e+" hour"+(1<e?"s":"")+" ago":1<=(t=Math.floor(t/60))?t+" minute"+(1<t?"s":"")+" ago":"just now")}(t,$(this).attr("prep"))),$(this).append(e)}}),0===s&&void 0!==e&&clearInterval(e),s}0!==s&&0<t()&&(e=setInterval(t,6e4))}),$(function(){$("a:has(img)").addClass("img-hyperlink")}),$(function(){const t="language-",o=new RegExp(`^${t}([a-z])+$`);$(`div[class^=${t}`).each(function(){let e=$(this).attr("class").split(" ");e.forEach(e=>{o.test(e)&&(e=e.substring(t.length),$(this).attr("lang",`${e}`))})})}),$(function(){$("a[href*='#']").not("[href='#']").not("[href='#0']").click(function(t){if(this.pathname.replace(/^\//,"")===location.pathname.replace(/^\//,"")&&location.hostname===this.hostname){const l=decodeURI(this.hash);let o=RegExp(/^#fnref:/).test(l),a=RegExp(/^#fn:/).test(l);var n=l.includes(":")?l.replace(/\:/,"\\:"):l;let s=$(n);if(s.length){t.preventDefault(),history.pushState&&history.pushState(null,null,l);n=$(this).offset().top;let e=s.offset().top;t=e<n,n=$("#topbar-wrapper").outerHeight();t&&o&&(e-=n+8),$("html,body").animate({scrollTop:e},800,()=>{const e=$(s);e.focus();var t="scroll-focus";if($(`[${t}=true]`).length&&$(`[${t}=true]`).attr(t,!1),$(":target").length&&$(":target").attr(t,!1),(a||o)&&e.attr(t,!0),e.is(":focus"))return!1;e.attr("tabindex","-1"),e.focus()})}}})});
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Chirpy v3.1.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v3.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
6
- const getInitStatus=function(){let e=!1;return()=>{let t=e;return e||(e=!0),t}}(),PvOpts={isEnabled:()=>"true"===$("meta[name=pv-cache-enabled]").attr("content"),getProxyEndpoint:()=>$("meta[name=pv-proxy-endpoint]").attr("content"),getLocalData:()=>$("meta[name=pv-cache-data]").attr("content")},PvCache=function(){const e="origin",t="proxy";function a(e){return localStorage.getItem(e)}function n(e,t){localStorage.setItem(e,t)}return{getData:()=>JSON.parse(localStorage.getItem("pv")),saveOriginCache(t){n("pv",t),n("pv_source",e),n("pv_created_date",(new Date).toJSON())},saveProxyCache(e){n("pv",e),n("pv_source",t),n("pv_created_date",(new Date).toJSON())},isFromOrigin:()=>a("pv_source")===e,isFromProxy:()=>a("pv_source")===t,isExpired(){if(PvCache.isFromOrigin()){let e=new Date(a("pv_created_date"));return e.setDate(e.getDate()+1),Date.now()>=e.getTime()}if(PvCache.isFromProxy()){let e=new Date(a("pv_created_date"));return e.setHours(e.getHours()+1),Date.now()>=e.getTime()}return!1},getAllPageviews:()=>PvCache.getData().totalsForAllResults["ga:pageviews"],newerThan:e=>PvCache.getAllPageviews()>e.totalsForAllResults["ga:pageviews"],inspectKeys(){null!==localStorage.getItem("pv")&&null!==localStorage.getItem("pv_source")&&null!==localStorage.getItem("pv_created_date")||localStorage.clear()}}}();function countUp(e,t,a){if(e<t){let n=new CountUp(a,e,t);n.error?console.error(n.error):n.start()}}function countPV(e,t){let a=0;if(void 0!==t)for(let n=0;n<t.length;++n){if(t[parseInt(n,10)][0]===e){a+=parseInt(t[parseInt(n,10)][1],10);break}}return a}function tacklePV(e,t,a,n){let r=countPV(t,e);if(r=0===r?1:r,n){const e=parseInt(a.text().replace(/,/g,""),10);r>e&&countUp(e,r,a.attr("id"))}else a.text((new Intl.NumberFormat).format(r))}function displayPageviews(e){if(void 0===e)return;let t=getInitStatus();const a=e.rows;if($("#post-list").length>0)$(".post-preview").each(function(){const e=$(this).find("a").attr("href");tacklePV(a,e,$(this).find(".pageviews"),t)});else if($(".post").length>0){const e=window.location.pathname;tacklePV(a,e,$("#pv"),t)}}function fetchProxyPageviews(){$.ajax({type:"GET",url:PvOpts.getProxyEndpoint(),dataType:"jsonp",jsonpCallback:"displayPageviews",success:(e,t,a)=>{PvCache.saveProxyCache(JSON.stringify(e))},error:(e,t,a)=>{console.log("Failed to load pageviews from proxy server: "+a)}})}function fetchPageviews(e=!0,t=!1){PvOpts.isEnabled()&&e?fetch(PvOpts.getLocalData()).then(e=>e.json()).then(e=>{t&&PvCache.newerThan(e)||(displayPageviews(e),PvCache.saveOriginCache(JSON.stringify(e)))}).then(()=>fetchProxyPageviews()):fetchProxyPageviews()}$(function(){if($(".pageviews").length>0){PvCache.inspectKeys();let e=PvCache.getData();e?(displayPageviews(e),PvCache.isExpired()?fetchPageviews(!0,PvCache.isFromProxy()):PvCache.isFromOrigin()&&fetchPageviews(!1)):fetchPageviews()}});
6
+ const getInitStatus=function(){let t=!1;return()=>{var e=t;return t=t||!0,e}}(),PvOpts={isEnabled(){return"true"===$("meta[name=pv-cache-enabled]").attr("content")},getProxyEndpoint(){return $("meta[name=pv-proxy-endpoint]").attr("content")},getLocalData(){return $("meta[name=pv-cache-data]").attr("content")}},PvCache=function(){const t="pv",a="pv_created_date",r="pv_source",n={ORIGIN:"origin",PROXY:"proxy"};function o(e){return localStorage.getItem(e)}function i(e,t){localStorage.setItem(e,t)}return{getData(){return JSON.parse(localStorage.getItem(t))},saveOriginCache(e){i(t,e),i(r,n.ORIGIN),i(a,(new Date).toJSON())},saveProxyCache(e){i(t,e),i(r,n.PROXY),i(a,(new Date).toJSON())},isFromOrigin(){return o(r)===n.ORIGIN},isFromProxy(){return o(r)===n.PROXY},isExpired(){if(PvCache.isFromOrigin()){let e=new Date(o(a));return e.setDate(e.getDate()+1),Date.now()>=e.getTime()}if(PvCache.isFromProxy()){let e=new Date(o(a));return e.setHours(e.getHours()+1),Date.now()>=e.getTime()}return!1},getAllPageviews(){return PvCache.getData().totalsForAllResults["ga:pageviews"]},newerThan(e){return PvCache.getAllPageviews()>e.totalsForAllResults["ga:pageviews"]},inspectKeys(){null!==localStorage.getItem(t)&&null!==localStorage.getItem(r)&&null!==localStorage.getItem(a)||localStorage.clear()}}}();function countUp(t,a,r){if(t<a){let e=new CountUp(r,t,a);e.error?console.error(e.error):e.start()}}function countPV(t,a){let r=0;if(void 0!==a)for(let e=0;e<a.length;++e)if(a[parseInt(e,10)][0]===t){r+=parseInt(a[parseInt(e,10)][1],10);break}return r}function tacklePV(e,t,a,r){let n=countPV(t,e);n=0===n?1:n,r?(r=parseInt(a.text().replace(/,/g,""),10),n>r&&countUp(r,n,a.attr("id"))):a.text((new Intl.NumberFormat).format(n))}function displayPageviews(e){if(void 0!==e){let t=getInitStatus();const a=e.rows;0<$("#post-list").length?$(".post-preview").each(function(){var e=$(this).find("a").attr("href");tacklePV(a,e,$(this).find(".pageviews"),t)}):0<$(".post").length&&(e=window.location.pathname,tacklePV(a,e,$("#pv"),t))}}function fetchProxyPageviews(){$.ajax({type:"GET",url:PvOpts.getProxyEndpoint(),dataType:"jsonp",jsonpCallback:"displayPageviews",success:(e,t,a)=>{PvCache.saveProxyCache(JSON.stringify(e))},error:(e,t,a)=>{console.log("Failed to load pageviews from proxy server: "+a)}})}function fetchPageviews(e=!0,t=!1){PvOpts.isEnabled()&&e?fetch(PvOpts.getLocalData()).then(e=>e.json()).then(e=>{t&&PvCache.newerThan(e)||(displayPageviews(e),PvCache.saveOriginCache(JSON.stringify(e)))}).then(()=>fetchProxyPageviews()):fetchProxyPageviews()}$(function(){var e;0<$(".pageviews").length&&(PvCache.inspectKeys(),(e=PvCache.getData())?(displayPageviews(e),PvCache.isExpired()?fetchPageviews(!0,PvCache.isFromProxy()):PvCache.isFromOrigin()&&fetchPageviews(!1)):fetchPageviews())});
data/feed.xml CHANGED
@@ -10,14 +10,14 @@ layout: compress
10
10
  <subtitle>{{ site.description }}</subtitle>
11
11
  <updated>{{ site.time | date_to_xmlschema }}</updated>
12
12
  <author>
13
- <name>{{ site.author }}</name>
13
+ <name>{{ site.social.name }}</name>
14
14
  <uri>{{ "/" | absolute_url }}</uri>
15
15
  </author>
16
16
  <link rel="self" type="application/atom+xml" href="{{ page.url | absolute_url }}"/>
17
17
  <link rel="alternate" type="text/html" hreflang="{{ site.lang | default: 'en' }}"
18
18
  href="{{ '/' | absolute_url }}"/>
19
19
  <generator uri="https://jekyllrb.com/" version="{{ jekyll.version }}">Jekyll</generator>
20
- <rights> © {{ 'now' | date: '%Y' }} {{ site.author }} </rights>
20
+ <rights> © {{ 'now' | date: '%Y' }} {{ site.social.name }} </rights>
21
21
  <icon>{{ site.baseurl }}/assets/img/favicons/favicon.ico</icon>
22
22
  <logo>{{ site.baseurl }}/assets/img/favicons/favicon-96x96.png</logo>
23
23
 
@@ -35,7 +35,7 @@ layout: compress
35
35
  <id>{{ post_absolute_url }}</id>
36
36
  <content src="{{ post_absolute_url }}" />
37
37
  <author>
38
- <name>{{ site.author }}</name>
38
+ <name>{{ site.social.name }}</name>
39
39
  </author>
40
40
 
41
41
  {% if post.categories %}
data/sw.js CHANGED
@@ -7,7 +7,6 @@ self.importScripts('{{ "/assets/js/data/cache-list.js" | relative_url }}');
7
7
 
8
8
  var cacheName = 'chirpy-{{ "now" | date: "%Y%m%d.%H%M" }}';
9
9
 
10
-
11
10
  function isExcluded(url) {
12
11
  const regex = /(^http(s)?|^\/)/; /* the regex for CORS url or relative url */
13
12
  for (const rule of exclude) {
@@ -19,7 +18,6 @@ function isExcluded(url) {
19
18
  return false;
20
19
  }
21
20
 
22
-
23
21
  self.addEventListener('install', (e) => {
24
22
  self.skipWaiting();
25
23
  e.waitUntil(
@@ -29,25 +27,26 @@ self.addEventListener('install', (e) => {
29
27
  );
30
28
  });
31
29
 
32
-
33
30
  self.addEventListener('fetch', (e) => {
34
31
  e.respondWith(
35
32
  caches.match(e.request).then((r) => {
36
- /* console.log('[Service Worker] Fetching resource: ' + e.request.url); */
33
+ /* console.log(`[sw] method: ${e.request.method}, fetching: ${e.request.url}`); */
37
34
  return r || fetch(e.request).then((response) => {
38
35
  return caches.open(cacheName).then((cache) => {
39
36
  if (!isExcluded(e.request.url)) {
40
- /* console.log('[Service Worker] Caching new resource: ' + e.request.url); */
41
- cache.put(e.request, response.clone());
37
+ if (e.request.method === "GET") {
38
+ /* console.log('[sw] Caching new resource: ' + e.request.url); */
39
+ cache.put(e.request, response.clone());
40
+ }
42
41
  }
43
42
  return response;
44
43
  });
44
+
45
45
  });
46
46
  })
47
47
  );
48
48
  });
49
49
 
50
-
51
50
  self.addEventListener('activate', (e) => {
52
51
  e.waitUntil(
53
52
  caches.keys().then((keyList) => {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-chirpy
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cotes Chung
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-02 00:00:00.000000000 Z
11
+ date: 2021-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll