jekyll-theme-chirpy 5.0.2 → 6.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +64 -74
- data/_data/locales/ar.yml +91 -0
- data/_data/locales/bg-BG.yml +81 -0
- data/_data/locales/cs-CZ.yml +89 -0
- data/_data/locales/de-DE.yml +80 -0
- data/_data/locales/el-GR.yml +91 -0
- data/_data/locales/en.yml +23 -23
- data/_data/locales/es-ES.yml +77 -0
- data/_data/locales/fi-FI.yml +90 -0
- data/_data/locales/fr-FR.yml +77 -0
- data/_data/locales/hu-HU.yml +79 -0
- data/_data/locales/id-ID.yml +5 -19
- data/_data/locales/it-IT.yml +90 -0
- data/_data/locales/ko-KR.yml +12 -19
- data/_data/locales/my-MM.yml +77 -0
- data/_data/locales/pt-BR.yml +77 -0
- data/_data/locales/ru-RU.yml +77 -0
- data/_data/locales/sl-SI.yml +91 -0
- data/_data/locales/sv-SE.yml +91 -0
- data/_data/locales/th.yml +91 -0
- data/_data/locales/tr-TR.yml +77 -0
- data/_data/locales/uk-UA.yml +77 -0
- data/_data/locales/vi-VN.yml +76 -0
- data/_data/locales/zh-CN.yml +13 -20
- data/_data/locales/zh-TW.yml +83 -0
- data/_data/origin/basic.yml +48 -0
- data/_data/origin/cors.yml +59 -0
- data/_includes/comments/disqus.html +27 -31
- data/_includes/comments/giscus.html +64 -0
- data/_includes/comments/utterances.html +2 -2
- data/_includes/datetime.html +20 -0
- data/_includes/embed/twitch.html +4 -0
- data/_includes/embed/youtube.html +6 -0
- data/_includes/footer.html +31 -32
- data/_includes/head.html +66 -46
- data/_includes/js-selector.html +83 -45
- data/_includes/jsdelivr-combine.html +26 -0
- data/_includes/lang.html +1 -1
- data/_includes/mermaid.html +30 -29
- data/_includes/metadata-hook.html +1 -0
- data/_includes/mode-toggle.html +66 -51
- data/_includes/notification.html +24 -0
- data/_includes/origin-type.html +13 -0
- data/_includes/post-nav.html +26 -22
- data/_includes/post-paginator.html +79 -76
- data/_includes/post-sharing.html +27 -16
- data/_includes/read-time.html +17 -10
- data/_includes/refactor-content.html +129 -73
- data/_includes/related-posts.html +48 -58
- data/_includes/search-loader.html +32 -31
- data/_includes/search-results.html +4 -5
- data/_includes/sidebar.html +79 -67
- data/_includes/toc.html +4 -7
- data/_includes/topbar.html +62 -56
- data/_includes/trending-tags.html +15 -19
- data/_includes/update-list.html +14 -15
- data/_layouts/archives.html +25 -29
- data/_layouts/categories.html +97 -58
- data/_layouts/category.html +8 -10
- data/_layouts/default.html +67 -31
- data/_layouts/home.html +67 -56
- data/_layouts/page.html +20 -58
- data/_layouts/post.html +85 -94
- data/_layouts/tag.html +8 -10
- data/_layouts/tags.html +6 -5
- data/_sass/addon/commons.scss +679 -878
- data/_sass/addon/module.scss +70 -23
- data/_sass/addon/syntax.scss +127 -110
- data/_sass/addon/variables.scss +16 -18
- data/_sass/colors/syntax-dark.scss +138 -0
- data/_sass/colors/syntax-light.scss +179 -0
- data/_sass/colors/{dark-typography.scss → typography-dark.scss} +58 -56
- data/_sass/colors/typography-light.scss +110 -0
- data/_sass/layout/archives.scss +86 -89
- data/_sass/layout/categories.scss +29 -13
- data/_sass/layout/category-tag.scss +9 -10
- data/_sass/layout/home.scss +132 -114
- data/_sass/layout/post.scss +213 -173
- data/_sass/layout/tags.scss +1 -1
- data/_sass/main.scss +13 -0
- data/assets/404.html +1 -20
- data/assets/css/jekyll-theme-chirpy.scss +6 -0
- data/assets/feed.xml +2 -2
- data/assets/js/data/search.json +8 -5
- data/assets/js/data/swcache.js +14 -29
- data/assets/js/dist/categories.min.js +2 -4
- data/assets/js/dist/commons.min.js +2 -4
- data/assets/js/dist/home.min.js +2 -4
- data/assets/js/dist/misc.min.js +4 -0
- data/assets/js/dist/page.min.js +2 -4
- data/assets/js/dist/post.min.js +2 -4
- data/assets/js/pwa/app.js +42 -4
- data/assets/js/pwa/sw.js +46 -44
- data/assets/js/pwa/unregister.js +12 -0
- metadata +64 -32
- data/_config.yml +0 -175
- data/_data/contact.yml +0 -30
- data/_data/share.yml +0 -27
- data/_includes/css-selector.html +0 -15
- data/_includes/no-zero-date.html +0 -13
- data/_includes/timeago.html +0 -26
- data/_plugins/posts-lastmod-hook.rb +0 -14
- data/_sass/colors/dark-syntax.scss +0 -87
- data/_sass/colors/light-syntax.scss +0 -79
- data/_sass/colors/light-typography.scss +0 -81
- data/_sass/jekyll-theme-chirpy.scss +0 -24
- data/_tabs/about.md +0 -8
- data/_tabs/archives.md +0 -7
- data/_tabs/categories.md +0 -6
- data/_tabs/tags.md +0 -6
- data/assets/css/style.scss +0 -12
- data/assets/js/dist/pvreport.min.js +0 -6
- data/index.html +0 -4
data/_includes/update-list.html
CHANGED
@@ -1,13 +1,11 @@
|
|
1
|
-
|
2
|
-
Get the last 5 posts from lastmod list.
|
3
|
-
{% endcomment %}
|
1
|
+
<!-- Get the last 5 posts from lastmod list. -->
|
4
2
|
|
5
3
|
{% assign MAX_SIZE = 5 %}
|
6
4
|
|
7
|
-
{% assign all_list =
|
5
|
+
{% assign all_list = '' | split: '' %}
|
8
6
|
|
9
7
|
{% for post in site.posts %}
|
10
|
-
{% if post.last_modified_at %}
|
8
|
+
{% if post.last_modified_at and post.last_modified_at != post.date %}
|
11
9
|
{% capture elem %}
|
12
10
|
{{- post.last_modified_at | date: "%Y%m%d%H%M%S" -}}::{{- forloop.index0 -}}
|
13
11
|
{% endcapture %}
|
@@ -17,24 +15,25 @@
|
|
17
15
|
|
18
16
|
{% assign all_list = all_list | sort | reverse %}
|
19
17
|
|
20
|
-
{% assign update_list =
|
18
|
+
{% assign update_list = '' | split: '' %}
|
21
19
|
|
22
|
-
{% for entry in all_list limit:MAX_SIZE %}
|
20
|
+
{% for entry in all_list limit: MAX_SIZE %}
|
23
21
|
{% assign update_list = update_list | push: entry %}
|
24
22
|
{% endfor %}
|
25
23
|
|
26
24
|
{% if update_list.size > 0 %}
|
27
|
-
|
28
|
-
|
29
|
-
<
|
30
|
-
<ul class="post-content pl-0 pb-1 ml-1 mt-2">
|
25
|
+
<section id="access-lastmod">
|
26
|
+
<h2 class="panel-heading">{{- site.data.locales[include.lang].panel.lastmod -}}</h2>
|
27
|
+
<ul class="content list-unstyled ps-0 pb-1 ms-1 mt-2">
|
31
28
|
{% for item in update_list %}
|
32
|
-
{% assign index = item | split:
|
29
|
+
{% assign index = item | split: '::' | last | plus: 0 %}
|
33
30
|
{% assign post = site.posts[index] %}
|
34
31
|
{% assign url = post.url | relative_url %}
|
35
|
-
|
32
|
+
<li class="text-truncate lh-lg">
|
33
|
+
<a href="{{ url }}">{{ post.title }}</a>
|
34
|
+
</li>
|
36
35
|
{% endfor %}
|
37
36
|
</ul>
|
38
|
-
</
|
39
|
-
|
37
|
+
</section>
|
38
|
+
<!-- #access-lastmod -->
|
40
39
|
{% endif %}
|
data/_layouts/archives.html
CHANGED
@@ -5,35 +5,31 @@ layout: page
|
|
5
5
|
|
6
6
|
{% include lang.html %}
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
{%
|
13
|
-
|
14
|
-
|
15
|
-
{%
|
16
|
-
|
17
|
-
|
18
|
-
|
8
|
+
{% assign df_strftime_m = site.data.locales[lang].df.archives.strftime | default: '/ %m' %}
|
9
|
+
{% assign df_dayjs_m = site.data.locales[lang].df.archives.dayjs | default: '/ MM' %}
|
10
|
+
|
11
|
+
<div id="archives" class="pl-xl-3">
|
12
|
+
{% for post in site.posts %}
|
13
|
+
{% assign cur_year = post.date | date: '%Y' %}
|
14
|
+
|
15
|
+
{% if cur_year != last_year %}
|
16
|
+
{% unless forloop.first %}</ul>{% endunless %}
|
17
|
+
|
18
|
+
<time class="year lead d-block">{{ cur_year }}</time>
|
19
|
+
{{ '<ul class="list-unstyled">' }}
|
20
|
+
|
21
|
+
{% assign last_year = cur_year %}
|
22
|
+
{% endif %}
|
23
|
+
|
19
24
|
<li>
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
{
|
24
|
-
|
25
|
-
|
26
|
-
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
27
|
-
</div>
|
25
|
+
{% assign ts = post.date | date: '%s' %}
|
26
|
+
<span class="date day" data-ts="{{ ts }}" data-df="DD">{{ post.date | date: '%d' }}</span>
|
27
|
+
<span class="date month small text-muted ms-1" data-ts="{{ ts }}" data-df="{{ df_dayjs_m }}">
|
28
|
+
{{ post.date | date: df_strftime_m }}
|
29
|
+
</span>
|
30
|
+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
28
31
|
</li>
|
29
|
-
|
30
|
-
|
31
|
-
{%
|
32
|
-
</ul>
|
33
|
-
<span class="lead">{{pre_year}}</span>
|
34
|
-
<ul class="list-unstyled">
|
35
|
-
{% assign last_day = "" %}
|
36
|
-
{% assign last_month = "" %}
|
37
|
-
{% endif %}
|
38
|
-
{% endfor %}
|
32
|
+
|
33
|
+
{% if forloop.last %}</ul>{% endif %}
|
34
|
+
{% endfor %}
|
39
35
|
</div>
|
data/_layouts/categories.html
CHANGED
@@ -5,8 +5,8 @@ layout: page
|
|
5
5
|
|
6
6
|
{% include lang.html %}
|
7
7
|
|
8
|
-
{% assign HEAD_PREFIX =
|
9
|
-
{% assign LIST_PREFIX =
|
8
|
+
{% assign HEAD_PREFIX = 'h_' %}
|
9
|
+
{% assign LIST_PREFIX = 'l_' %}
|
10
10
|
|
11
11
|
{% assign group_index = 0 %}
|
12
12
|
|
@@ -18,7 +18,7 @@ layout: page
|
|
18
18
|
{% assign first_post = posts_of_category | first %}
|
19
19
|
|
20
20
|
{% if category_name == first_post.categories[0] %}
|
21
|
-
{% assign sub_categories =
|
21
|
+
{% assign sub_categories = '' | split: '' %}
|
22
22
|
|
23
23
|
{% for post in posts_of_category %}
|
24
24
|
{% assign second_category = post.categories[1] %}
|
@@ -32,68 +32,107 @@ layout: page
|
|
32
32
|
{% assign sub_categories = sub_categories | sort %}
|
33
33
|
{% assign sub_categories_size = sub_categories | size %}
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
<a href="{{ _category_url | relative_url }}" class="ml-1 mr-2">{{ category_name }}</a>
|
44
|
-
|
45
|
-
<!-- content count -->
|
46
|
-
{% assign top_posts_size = site.categories[category_name] | size %}
|
47
|
-
<span class="text-muted small font-weight-light">
|
48
|
-
{% if sub_categories_size > 0 %}
|
49
|
-
{{ sub_categories_size }}
|
50
|
-
{{ site.data.locales[lang].categories.category_measure }},
|
51
|
-
{% endif %}
|
52
|
-
{{ top_posts_size }}
|
53
|
-
{{ site.data.locales[lang].categories.post_measure }}
|
54
|
-
</span>
|
55
|
-
</span>
|
56
|
-
|
57
|
-
<!-- arrow -->
|
58
|
-
{% if sub_categories_size > 0%}
|
59
|
-
<a href="#{{ LIST_PREFIX }}{{ group_index }}" data-toggle="collapse"
|
60
|
-
aria-expanded="true" aria-label="{{ HEAD_PREFIX }}{{ group_index }}-trigger"
|
61
|
-
class="category-trigger hide-border-bottom">
|
62
|
-
<i class="fas fa-fw fa-angle-down"></i>
|
63
|
-
</a>
|
64
|
-
{% else %}
|
65
|
-
<span data-toggle="collapse" class="category-trigger hide-border-bottom disabled">
|
66
|
-
<i class="fas fa-fw fa-angle-right"></i>
|
67
|
-
</span>
|
68
|
-
{% endif %}
|
35
|
+
<div class="card categories">
|
36
|
+
<!-- top-category -->
|
37
|
+
<div
|
38
|
+
id="{{ HEAD_PREFIX }}{{ group_index }}"
|
39
|
+
class="card-header d-flex justify-content-between hide-border-bottom"
|
40
|
+
>
|
41
|
+
<span class="ms-2">
|
42
|
+
<i class="far fa-folder{% if sub_categories_size > 0 %}-open{% endif %} fa-fw"></i>
|
69
43
|
|
70
|
-
|
44
|
+
{% capture _category_url %}/categories/{{ category_name | slugify | url_encode }}/{% endcapture %}
|
45
|
+
<a href="{{ _category_url | relative_url }}" class="mx-2">{{ category_name }}</a>
|
71
46
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
47
|
+
<!-- content count -->
|
48
|
+
{% assign top_posts_size = site.categories[category_name] | size %}
|
49
|
+
<span class="text-muted small font-weight-light">
|
50
|
+
{% if sub_categories_size > 0 %}
|
51
|
+
{{ sub_categories_size }}
|
52
|
+
{% if sub_categories_size > 1 %}
|
53
|
+
{{
|
54
|
+
site.data.locales[lang].categories.category_measure.plural
|
55
|
+
| default: site.data.locales[lang].categories.category_measure
|
56
|
+
}}
|
57
|
+
{% else %}
|
58
|
+
{{
|
59
|
+
site.data.locales[lang].categories.category_measure.singular
|
60
|
+
| default: site.data.locales[lang].categories.category_measure
|
61
|
+
}}
|
62
|
+
{% endif -%}
|
63
|
+
,
|
64
|
+
{% endif %}
|
79
65
|
|
80
|
-
|
81
|
-
<a href="{{ _sub_ctg_url | relative_url }}" class="ml-1 mr-2">{{ sub_category }}</a>
|
66
|
+
{{ top_posts_size }}
|
82
67
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
68
|
+
{% if top_posts_size > 1 %}
|
69
|
+
{{
|
70
|
+
site.data.locales[lang].categories.post_measure.plural
|
71
|
+
| default: site.data.locales[lang].categories.post_measure
|
72
|
+
}}
|
73
|
+
{% else %}
|
74
|
+
{{
|
75
|
+
site.data.locales[lang].categories.post_measure.singular
|
76
|
+
| default: site.data.locales[lang].categories.post_measure
|
77
|
+
}}
|
78
|
+
{% endif %}
|
87
79
|
</span>
|
88
|
-
</
|
89
|
-
{% endfor %}
|
90
|
-
</ul>
|
91
|
-
</div>
|
92
|
-
{% endif %}
|
80
|
+
</span>
|
93
81
|
|
94
|
-
|
82
|
+
<!-- arrow -->
|
83
|
+
{% if sub_categories_size > 0 %}
|
84
|
+
<a
|
85
|
+
href="#{{ LIST_PREFIX }}{{ group_index }}"
|
86
|
+
data-bs-toggle="collapse"
|
87
|
+
aria-expanded="true"
|
88
|
+
aria-label="{{ HEAD_PREFIX }}{{ group_index }}-trigger"
|
89
|
+
class="category-trigger hide-border-bottom"
|
90
|
+
>
|
91
|
+
<i class="fas fa-fw fa-angle-down"></i>
|
92
|
+
</a>
|
93
|
+
{% else %}
|
94
|
+
<span data-bs-toggle="collapse" class="category-trigger hide-border-bottom disabled">
|
95
|
+
<i class="fas fa-fw fa-angle-right"></i>
|
96
|
+
</span>
|
97
|
+
{% endif %}
|
98
|
+
</div>
|
99
|
+
<!-- .card-header -->
|
100
|
+
|
101
|
+
<!-- Sub-categories -->
|
102
|
+
{% if sub_categories_size > 0 %}
|
103
|
+
<div id="{{ LIST_PREFIX }}{{ group_index }}" class="collapse show" aria-expanded="true">
|
104
|
+
<ul class="list-group">
|
105
|
+
{% for sub_category in sub_categories %}
|
106
|
+
<li class="list-group-item">
|
107
|
+
<i class="far fa-folder fa-fw"></i>
|
108
|
+
|
109
|
+
{% capture _sub_ctg_url %}/categories/{{ sub_category | slugify | url_encode }}/{% endcapture %}
|
110
|
+
<a href="{{ _sub_ctg_url | relative_url }}" class="mx-2">{{ sub_category }}</a>
|
111
|
+
|
112
|
+
{% assign posts_size = site.categories[sub_category] | size %}
|
113
|
+
<span class="text-muted small font-weight-light">
|
114
|
+
{{ posts_size }}
|
115
|
+
|
116
|
+
{% if posts_size > 1 %}
|
117
|
+
{{
|
118
|
+
site.data.locales[lang].categories.post_measure.plural
|
119
|
+
| default: site.data.locales[lang].categories.post_measure
|
120
|
+
}}
|
121
|
+
{% else %}
|
122
|
+
{{
|
123
|
+
site.data.locales[lang].categories.post_measure.singular
|
124
|
+
| default: site.data.locales[lang].categories.post_measure
|
125
|
+
}}
|
126
|
+
{% endif %}
|
127
|
+
</span>
|
128
|
+
</li>
|
129
|
+
{% endfor %}
|
130
|
+
</ul>
|
131
|
+
</div>
|
132
|
+
{% endif %}
|
133
|
+
</div>
|
134
|
+
<!-- .card -->
|
95
135
|
|
96
136
|
{% assign group_index = group_index | plus: 1 %}
|
97
|
-
|
98
137
|
{% endif %}
|
99
138
|
{% endfor %}
|
data/_layouts/category.html
CHANGED
@@ -6,21 +6,19 @@ layout: page
|
|
6
6
|
{% include lang.html %}
|
7
7
|
|
8
8
|
<div id="page-category">
|
9
|
-
<h1 class="
|
9
|
+
<h1 class="ps-lg-2">
|
10
10
|
<i class="far fa-folder-open fa-fw text-muted"></i>
|
11
11
|
{{ page.title }}
|
12
|
-
<span class="lead text-muted
|
12
|
+
<span class="lead text-muted ps-2">{{ page.posts | size }}</span>
|
13
13
|
</h1>
|
14
14
|
|
15
|
-
<ul class="
|
16
|
-
{% assign post_df = site.data.locales[lang].date_format.post.long %}
|
17
|
-
|
15
|
+
<ul class="content ps-0">
|
18
16
|
{% for post in page.posts %}
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
17
|
+
<li class="d-flex justify-content-between px-md-3">
|
18
|
+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
19
|
+
<span class="dash flex-grow-1"></span>
|
20
|
+
{% include datetime.html date=post.date class='text-muted small text-nowrap' lang=lang %}
|
21
|
+
</li>
|
24
22
|
{% endfor %}
|
25
23
|
</ul>
|
26
24
|
</div>
|
data/_layouts/default.html
CHANGED
@@ -3,57 +3,93 @@ layout: compress
|
|
3
3
|
# Default layout
|
4
4
|
---
|
5
5
|
|
6
|
-
<!
|
6
|
+
<!doctype html>
|
7
|
+
|
8
|
+
{% include origin-type.html %}
|
7
9
|
|
8
10
|
{% include lang.html %}
|
9
11
|
|
10
12
|
{% capture prefer_mode %}
|
11
13
|
{% if site.theme_mode %}
|
12
|
-
mode="{{ site.theme_mode }}"
|
14
|
+
data-mode="{{ site.theme_mode }}"
|
13
15
|
{% endif %}
|
14
16
|
{% endcapture %}
|
15
17
|
|
16
|
-
|
18
|
+
{% if layout.tail_includes %}
|
19
|
+
{% assign has_tail = true %}
|
20
|
+
{% endif %}
|
17
21
|
|
22
|
+
<!-- `site.alt_lang` can specify a language different from the UI -->
|
23
|
+
<html lang="{{ site.alt_lang | default: site.lang }}" {{ prefer_mode }}>
|
18
24
|
{% include head.html %}
|
19
25
|
|
20
|
-
|
21
|
-
{% include
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
26
|
+
<body>
|
27
|
+
{% include sidebar.html lang=lang %}
|
28
|
+
|
29
|
+
<div id="main-wrapper" class="d-flex justify-content-center">
|
30
|
+
<div class="container px-xxl-5">
|
31
|
+
{% include topbar.html lang=lang %}
|
32
|
+
|
33
|
+
<div class="row">
|
34
|
+
<main
|
35
|
+
aria-label="Main Content"
|
36
|
+
class="col-12 col-lg-11 col-xl-9 px-md-4{% unless has_tail %} pb-5{% endunless %}"
|
37
|
+
>
|
38
|
+
{{ content }}
|
39
|
+
</main>
|
40
|
+
|
41
|
+
<!-- panel -->
|
42
|
+
<aside aria-label="Panel" id="panel-wrapper" class="col-xl-3 ps-2 text-muted">
|
43
|
+
<div class="access">
|
44
|
+
{% include_cached update-list.html lang=lang %}
|
45
|
+
{% include_cached trending-tags.html lang=lang %}
|
46
|
+
</div>
|
47
|
+
|
48
|
+
{% for _include in layout.panel_includes %}
|
49
|
+
{% assign _include_path = _include | append: '.html' %}
|
50
|
+
{% include {{ _include_path }} lang=lang %}
|
51
|
+
{% endfor %}
|
52
|
+
</aside>
|
53
|
+
</div>
|
54
|
+
|
55
|
+
<div class="row">
|
56
|
+
<!-- tail -->
|
57
|
+
<div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 px-md-4">
|
58
|
+
{% if has_tail %}
|
59
|
+
{% for _include in layout.tail_includes %}
|
60
|
+
{% assign _include_path = _include | append: '.html' %}
|
61
|
+
{% include {{ _include_path }} lang=lang %}
|
62
|
+
{% endfor %}
|
63
|
+
{% endif %}
|
64
|
+
|
65
|
+
{% include_cached footer.html lang=lang %}
|
66
|
+
</div>
|
67
|
+
</div>
|
68
|
+
|
69
|
+
{% include_cached search-results.html lang=lang %}
|
70
|
+
</div>
|
32
71
|
|
33
|
-
|
72
|
+
<aside aria-label="Scroll to Top">
|
73
|
+
<button id="back-to-top" type="button" class="btn btn-lg btn-box-shadow">
|
74
|
+
<i class="fas fa-angle-up"></i>
|
75
|
+
</button>
|
76
|
+
</aside>
|
77
|
+
</div>
|
34
78
|
|
35
|
-
|
79
|
+
<div id="mask"></div>
|
36
80
|
|
37
|
-
|
81
|
+
{% if site.pwa.enabled %}
|
82
|
+
{% include_cached notification.html lang=lang %}
|
83
|
+
{% endif %}
|
38
84
|
|
39
|
-
|
85
|
+
<!-- JavaScripts -->
|
40
86
|
|
41
|
-
|
87
|
+
{% include js-selector.html %}
|
42
88
|
|
43
89
|
{% if page.mermaid %}
|
44
90
|
{% include mermaid.html %}
|
45
91
|
{% endif %}
|
46
92
|
|
47
|
-
|
48
|
-
|
49
|
-
<a id="back-to-top" href="#" aria-label="back-to-top" class="btn btn-lg btn-box-shadow" role="button">
|
50
|
-
<i class="fas fa-angle-up"></i>
|
51
|
-
</a>
|
52
|
-
|
53
|
-
{% include search-loader.html %}
|
54
|
-
|
55
|
-
{% include js-selector.html %}
|
56
|
-
|
93
|
+
{% include_cached search-loader.html %}
|
57
94
|
</body>
|
58
|
-
|
59
95
|
</html>
|
data/_layouts/home.html
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
---
|
2
|
-
layout:
|
3
|
-
# The Home page layout
|
2
|
+
layout: default
|
4
3
|
---
|
5
4
|
|
6
5
|
{% include lang.html %}
|
7
6
|
|
8
|
-
{% assign pinned = site.posts | where:
|
9
|
-
{% assign default = site.posts | where_exp:
|
7
|
+
{% assign pinned = site.posts | where: 'pin', 'true' %}
|
8
|
+
{% assign default = site.posts | where_exp: 'item', 'item.pin != true and item.hidden != true' %}
|
10
9
|
|
11
|
-
{% assign posts =
|
10
|
+
{% assign posts = '' | split: '' %}
|
12
11
|
|
13
12
|
<!-- Get pinned posts -->
|
14
13
|
|
@@ -23,7 +22,6 @@ layout: page
|
|
23
22
|
{% assign pinned_num = 0 %}
|
24
23
|
{% endif %}
|
25
24
|
|
26
|
-
|
27
25
|
<!-- Get default posts -->
|
28
26
|
|
29
27
|
{% assign default_beg = offset | minus: pinned.size %}
|
@@ -32,7 +30,7 @@ layout: page
|
|
32
30
|
{% assign default_beg = 0 %}
|
33
31
|
{% endif %}
|
34
32
|
|
35
|
-
{% assign default_num = paginator.posts | size | minus: pinned_num
|
33
|
+
{% assign default_num = paginator.posts | size | minus: pinned_num %}
|
36
34
|
{% assign default_end = default_beg | plus: default_num | minus: 1 %}
|
37
35
|
|
38
36
|
{% if default_num > 0 %}
|
@@ -41,60 +39,73 @@ layout: page
|
|
41
39
|
{% endfor %}
|
42
40
|
{% endif %}
|
43
41
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
<div class="post-content">
|
54
|
-
<p>
|
55
|
-
{% include no-linenos.html content=post.content %}
|
56
|
-
{{ content | markdownify | strip_html | truncate: 200 | escape }}
|
57
|
-
</p>
|
58
|
-
</div>
|
59
|
-
|
60
|
-
<div class="post-meta text-muted d-flex">
|
61
|
-
|
62
|
-
<div class="mr-auto">
|
63
|
-
<!-- posted date -->
|
64
|
-
<i class="far fa-calendar fa-fw"></i>
|
65
|
-
{% include timeago.html date=post.date tooltip=true %}
|
66
|
-
|
67
|
-
<!-- time to read -->
|
68
|
-
<i class="far fa-clock fa-fw"></i>
|
69
|
-
{% include read-time.html content=post.content %}
|
70
|
-
|
71
|
-
<!-- categories -->
|
72
|
-
{% if post.categories.size > 0 %}
|
73
|
-
<i class="far fa-folder-open fa-fw"></i>
|
74
|
-
<span>
|
75
|
-
{% for category in post.categories %}
|
76
|
-
{{ category }}
|
77
|
-
{%- unless forloop.last -%},{%- endunless -%}
|
78
|
-
{% endfor %}
|
79
|
-
</span>
|
80
|
-
{% endif %}
|
81
|
-
</div>
|
42
|
+
{% capture content %}
|
43
|
+
{% for post in posts %}
|
44
|
+
<article class="card-wrapper">
|
45
|
+
<a href="{{ post.url | relative_url }}" class="card post-preview flex-md-row-reverse">
|
46
|
+
{% if post.image %}
|
47
|
+
{% if post.image.lqip %}
|
48
|
+
{% capture lqip %}lqip="{{ post.image.lqip }}"{% endcapture %}
|
49
|
+
{% endif %}
|
82
50
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
</div>
|
88
|
-
{% endif %}
|
51
|
+
{% assign src = post.image.path | default: post.image %}
|
52
|
+
{% unless src contains '//' %}
|
53
|
+
{% assign src = post.img_path | append: '/' | append: src | replace: '//', '/' %}
|
54
|
+
{% endunless %}
|
89
55
|
|
90
|
-
|
56
|
+
{% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %}
|
91
57
|
|
92
|
-
|
58
|
+
<img src="{{ src }}" w="17" h="10" alt="{{ alt }}" {{ lqip }}>
|
59
|
+
{% endif %}
|
93
60
|
|
94
|
-
|
61
|
+
<div class="card-body d-flex flex-column">
|
62
|
+
<h1 class="card-title my-2 mt-md-0">{{ post.title }}</h1>
|
63
|
+
|
64
|
+
<div class="card-text content mt-0 mb-2">
|
65
|
+
<p>
|
66
|
+
{% include no-linenos.html content=post.content %}
|
67
|
+
{{ content | markdownify | strip_html | truncate: 200 | escape }}
|
68
|
+
</p>
|
69
|
+
</div>
|
70
|
+
|
71
|
+
<div class="post-meta flex-grow-1 d-flex align-items-end">
|
72
|
+
<div class="me-auto">
|
73
|
+
<!-- posted date -->
|
74
|
+
<i class="far fa-calendar fa-fw me-1"></i>
|
75
|
+
{% include datetime.html date=post.date lang=lang %}
|
76
|
+
|
77
|
+
<!-- categories -->
|
78
|
+
{% if post.categories.size > 0 %}
|
79
|
+
<i class="far fa-folder-open fa-fw me-1"></i>
|
80
|
+
<span class="categories">
|
81
|
+
{% for category in post.categories %}
|
82
|
+
{{ category }}
|
83
|
+
{%- unless forloop.last -%},{%- endunless -%}
|
84
|
+
{% endfor %}
|
85
|
+
</span>
|
86
|
+
{% endif %}
|
87
|
+
</div>
|
88
|
+
|
89
|
+
{% if post.pin %}
|
90
|
+
<div class="pin ms-1">
|
91
|
+
<i class="fas fa-thumbtack fa-fw"></i>
|
92
|
+
<span>{{ site.data.locales[lang].post.pin_prompt }}</span>
|
93
|
+
</div>
|
94
|
+
{% endif %}
|
95
|
+
</div>
|
96
|
+
<!-- .post-meta -->
|
97
|
+
</div>
|
98
|
+
<!-- .card-body -->
|
99
|
+
</a>
|
100
|
+
</article>
|
101
|
+
{% endfor %}
|
102
|
+
{% endcapture %}
|
95
103
|
|
96
|
-
|
104
|
+
<div id="post-list" class="flex-grow-1 pe-xl-2">
|
105
|
+
{% include refactor-content.html content=content lang=lang %}
|
106
|
+
</div>
|
107
|
+
<!-- #post-list -->
|
97
108
|
|
98
|
-
{% if paginator.total_pages >
|
109
|
+
{% if paginator.total_pages > 1 %}
|
99
110
|
{% include post-paginator.html %}
|
100
111
|
{% endif %}
|