jekyll-theme-chirpy 3.1.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +19 -26
- data/_config.yml +5 -4
- data/_includes/disqus.html +1 -1
- data/_includes/js-selector.html +19 -2
- data/_includes/search-loader.html +21 -3
- data/_includes/search-results.html +1 -1
- data/_includes/timeago.html +5 -1
- data/_layouts/post.html +5 -6
- data/_sass/addon/commons.scss +11 -15
- data/_sass/addon/module.scss +1 -0
- data/_sass/addon/syntax.scss +7 -1
- data/_sass/colors/dark-typography.scss +1 -0
- data/_sass/colors/light-syntax.scss +1 -1
- data/_sass/colors/light-typography.scss +2 -1
- data/_sass/jekyll-theme-chirpy.scss +1 -1
- data/_sass/layout/post.scss +17 -19
- data/assets/js/data/cache-list.js +11 -15
- data/assets/js/dist/categories.min.js +2 -2
- data/assets/js/dist/home.min.js +2 -2
- data/assets/js/dist/page.min.js +2 -2
- data/assets/js/dist/post.min.js +2 -2
- data/assets/js/dist/pvreport.min.js +2 -2
- data/feed.xml +3 -3
- data/sw.js +6 -7
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d833e4ed6f7e8ec68aa2d3089a0c78378c80a67ff45f9a6bcbcf84e7f2c41d85
|
|
4
|
+
data.tar.gz: 51944aab8a026e3003b2eeb7e2fe7b1f2ea228f5773f4c03f287e4ef193ec1f2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
[](https://rubygems.org/gems/jekyll-theme-chirpy)
|
|
6
6
|
[](https://github.com/cotes2020/jekyll-theme-chirpy/actions?query=branch%3Amaster+event%3Apush)
|
|
7
7
|
[](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
|
-
[](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
|
|
9
9
|
[](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
|
[](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
|
|
54
|
-
- **Fork
|
|
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
|
-
###
|
|
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
|
|
74
|
+
### Fork on GitHub
|
|
87
75
|
|
|
88
|
-
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork)
|
|
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
|
-
-
|
|
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
|
-
|
|
198
|
+
## Sponsoring
|
|
211
199
|
|
|
212
|
-
|
|
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
|
-
|
|
202
|
+
[](https://www.buymeacoffee.com/coteschung)
|
|
203
|
+
[][cn-donation]
|
|
204
|
+
[][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
|
-
|
|
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
|
-
-
|
|
157
|
+
- '*.gem'
|
|
158
|
+
- '*.gemspec'
|
|
158
159
|
- tools
|
|
159
160
|
- docs
|
|
160
161
|
- README.md
|
data/_includes/disqus.html
CHANGED
data/_includes/js-selector.html
CHANGED
|
@@ -23,8 +23,25 @@
|
|
|
23
23
|
|
|
24
24
|
{% if page.math %}
|
|
25
25
|
<!-- MathJax -->
|
|
26
|
-
<script
|
|
27
|
-
|
|
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
|
-
|
|
10
|
-
|
|
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-
|
|
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
|
|
data/_includes/timeago.html
CHANGED
|
@@ -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
|
-
|
|
18
|
-
|
|
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
|
-
|
|
29
|
-
|
|
27
|
+
{% include timeago.html date=page.last_modified_at
|
|
28
|
+
class="lastmod" prefix="Updated" tooltip=true %}
|
|
30
29
|
</span>
|
|
31
30
|
{% endif %}
|
|
32
31
|
|
data/_sass/addon/commons.scss
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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} -
|
|
1650
|
+
padding-right: calc(100% - #{$sidebar-width-large} - 1180px);
|
|
1655
1651
|
}
|
|
1656
1652
|
|
|
1657
1653
|
#panel-wrapper {
|
data/_sass/addon/module.scss
CHANGED
data/_sass/addon/syntax.scss
CHANGED
|
@@ -157,7 +157,7 @@ div {
|
|
|
157
157
|
div[class^='language-']::before {
|
|
158
158
|
content: attr(lang);
|
|
159
159
|
position: absolute;
|
|
160
|
-
right:
|
|
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
|
+
}
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
|
|
69
69
|
/* --- custom light colors --- */
|
|
70
70
|
--highlight-bg-color: #f7f7f7;
|
|
71
|
-
--highlighter-rouge-color: #
|
|
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: #
|
|
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;
|
data/_sass/layout/post.scss
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
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.
|
|
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(()=>{
|
|
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"))})});
|
data/assets/js/dist/home.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Chirpy v3.
|
|
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
|
|
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))});
|
data/assets/js/dist/page.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Chirpy v3.
|
|
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(()=>{
|
|
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()})}}})});
|
data/assets/js/dist/post.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Chirpy v3.
|
|
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(()=>{
|
|
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.
|
|
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
|
|
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.
|
|
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.
|
|
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.
|
|
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(
|
|
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
|
-
|
|
41
|
-
|
|
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.
|
|
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-
|
|
11
|
+
date: 2021-04-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|