jekyll-theme-resuchirp 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +94 -0
- data/_data/authors.yml +17 -0
- data/_data/contact.yml +28 -0
- 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 +91 -0
- 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 +77 -0
- data/_data/locales/it-IT.yml +90 -0
- data/_data/locales/ko-KR.yml +84 -0
- 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 +83 -0
- data/_data/locales/zh-TW.yml +83 -0
- data/_data/origin/basic.yml +48 -0
- data/_data/origin/cors.yml +59 -0
- data/_data/share.yml +25 -0
- data/_includes/comments/disqus.html +49 -0
- data/_includes/comments/giscus.html +64 -0
- data/_includes/comments/utterances.html +51 -0
- data/_includes/comments.html +5 -0
- data/_includes/datetime.html +19 -0
- data/_includes/embed/twitch.html +4 -0
- data/_includes/embed/youtube.html +6 -0
- data/_includes/favicons.html +17 -0
- data/_includes/footer.html +34 -0
- data/_includes/google-analytics.html +14 -0
- data/_includes/head.html +95 -0
- data/_includes/js-selector.html +106 -0
- data/_includes/jsdelivr-combine.html +26 -0
- data/_includes/lang.html +8 -0
- data/_includes/language-alias.html +70 -0
- data/_includes/mermaid.html +58 -0
- data/_includes/metadata-hook.html +1 -0
- data/_includes/mode-toggle.html +143 -0
- data/_includes/no-linenos.html +10 -0
- data/_includes/origin-type.html +13 -0
- data/_includes/post-nav.html +37 -0
- data/_includes/post-paginator.html +89 -0
- data/_includes/post-sharing.html +37 -0
- data/_includes/read-time.html +37 -0
- data/_includes/refactor-content.html +286 -0
- data/_includes/related-posts.html +97 -0
- data/_includes/search-loader.html +45 -0
- data/_includes/search-results.html +10 -0
- data/_includes/sidebar.html +104 -0
- data/_includes/toc.html +13 -0
- data/_includes/topbar.html +70 -0
- data/_includes/trending-tags.html +46 -0
- data/_includes/update-list.html +39 -0
- data/_layouts/archives.html +36 -0
- data/_layouts/categories.html +138 -0
- data/_layouts/category.html +24 -0
- data/_layouts/compress.html +10 -0
- data/_layouts/default.html +76 -0
- data/_layouts/home.html +110 -0
- data/_layouts/page.html +68 -0
- data/_layouts/post.html +133 -0
- data/_layouts/tag.html +23 -0
- data/_layouts/tags.html +22 -0
- data/_sass/addon/commons.scss +1578 -0
- data/_sass/addon/module.scss +178 -0
- data/_sass/addon/syntax.scss +271 -0
- data/_sass/addon/variables.scss +27 -0
- data/_sass/colors/dark-syntax.scss +87 -0
- data/_sass/colors/dark-typography.scss +151 -0
- data/_sass/colors/light-syntax.scss +84 -0
- data/_sass/colors/light-typography.scss +109 -0
- data/_sass/jekyll-theme-chirpy.scss +19 -0
- data/_sass/layout/archives.scss +144 -0
- data/_sass/layout/categories.scss +83 -0
- data/_sass/layout/category-tag.scss +77 -0
- data/_sass/layout/home.scss +219 -0
- data/_sass/layout/post.scss +414 -0
- data/_sass/layout/tags.scss +19 -0
- data/_sass/variables-hook.scss +3 -0
- data/assets/404.html +16 -0
- data/assets/css/style.scss +6 -0
- data/assets/feed.xml +61 -0
- data/assets/img/favicons/android-chrome-192x192.png +0 -0
- data/assets/img/favicons/android-chrome-512x512.png +0 -0
- data/assets/img/favicons/apple-touch-icon.png +0 -0
- data/assets/img/favicons/browserconfig.xml +13 -0
- data/assets/img/favicons/favicon-16x16.png +0 -0
- data/assets/img/favicons/favicon-32x32.png +0 -0
- data/assets/img/favicons/favicon.ico +0 -0
- data/assets/img/favicons/mstile-150x150.png +0 -0
- data/assets/img/favicons/site.webmanifest +26 -0
- data/assets/js/data/search.json +20 -0
- data/assets/js/data/swcache.js +50 -0
- data/assets/js/pwa/app.js +47 -0
- data/assets/js/pwa/sw.js +90 -0
- data/assets/js/pwa/unregister.js +12 -0
- data/assets/robots.txt +10 -0
- metadata +255 -0
@@ -0,0 +1,39 @@
|
|
1
|
+
<!-- Get the last 5 posts from lastmod list. -->
|
2
|
+
|
3
|
+
{% assign MAX_SIZE = 5 %}
|
4
|
+
|
5
|
+
{% assign all_list = '' | split: '' %}
|
6
|
+
|
7
|
+
{% for post in site.posts %}
|
8
|
+
{% if post.last_modified_at and post.last_modified_at != post.date %}
|
9
|
+
{% capture elem %}
|
10
|
+
{{- post.last_modified_at | date: "%Y%m%d%H%M%S" -}}::{{- forloop.index0 -}}
|
11
|
+
{% endcapture %}
|
12
|
+
{% assign all_list = all_list | push: elem %}
|
13
|
+
{% endif %}
|
14
|
+
{% endfor %}
|
15
|
+
|
16
|
+
{% assign all_list = all_list | sort | reverse %}
|
17
|
+
|
18
|
+
{% assign update_list = '' | split: '' %}
|
19
|
+
|
20
|
+
{% for entry in all_list limit: MAX_SIZE %}
|
21
|
+
{% assign update_list = update_list | push: entry %}
|
22
|
+
{% endfor %}
|
23
|
+
|
24
|
+
{% if update_list.size > 0 %}
|
25
|
+
<div id="access-lastmod" class="post">
|
26
|
+
<div class="panel-heading">{{- site.data.locales[include.lang].panel.lastmod -}}</div>
|
27
|
+
<ul class="post-content list-unstyled ps-0 pb-1 ms-1 mt-2">
|
28
|
+
{% for item in update_list %}
|
29
|
+
{% assign index = item | split: '::' | last | plus: 0 %}
|
30
|
+
{% assign post = site.posts[index] %}
|
31
|
+
{% assign url = post.url | relative_url %}
|
32
|
+
<li class="text-truncate lh-lg">
|
33
|
+
<a href="{{ url }}">{{ post.title }}</a>
|
34
|
+
</li>
|
35
|
+
{% endfor %}
|
36
|
+
</ul>
|
37
|
+
</div>
|
38
|
+
<!-- #access-lastmod -->
|
39
|
+
{% endif %}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
# The Archives of posts.
|
4
|
+
---
|
5
|
+
|
6
|
+
{% include lang.html %}
|
7
|
+
|
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
|
+
|
13
|
+
{% for post in site.posts %}
|
14
|
+
{% capture cur_year %}{{ post.date | date: "%Y" }}{% endcapture %}
|
15
|
+
|
16
|
+
{% if cur_year != last_year %}
|
17
|
+
{% unless forloop.first %}</ul>{% endunless %}
|
18
|
+
<div class="year lead">{{ cur_year }}</div>
|
19
|
+
<ul class="list-unstyled">
|
20
|
+
{% assign last_year = cur_year %}
|
21
|
+
{% endif %}
|
22
|
+
|
23
|
+
<li>
|
24
|
+
{% assign ts = post.date | date: '%s' %}
|
25
|
+
<span class="date day" data-ts="{{ ts }}" data-df="DD">{{ post.date | date: "%d" }}</span>
|
26
|
+
<span class="date month small text-muted ms-1" data-ts="{{ ts }}" data-df="{{ df_dayjs_m }}">
|
27
|
+
{{ post.date | date: df_strftime_m }}
|
28
|
+
</span>
|
29
|
+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
30
|
+
</li>
|
31
|
+
|
32
|
+
{% if forloop.last %}</ul>{% endif %}
|
33
|
+
|
34
|
+
{% endfor %}
|
35
|
+
|
36
|
+
</div>
|
@@ -0,0 +1,138 @@
|
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
# All the Categories of posts
|
4
|
+
---
|
5
|
+
|
6
|
+
{% include lang.html %}
|
7
|
+
|
8
|
+
{% assign HEAD_PREFIX = 'h_' %}
|
9
|
+
{% assign LIST_PREFIX = 'l_' %}
|
10
|
+
|
11
|
+
{% assign group_index = 0 %}
|
12
|
+
|
13
|
+
{% assign sort_categories = site.categories | sort %}
|
14
|
+
|
15
|
+
{% for category in sort_categories %}
|
16
|
+
{% assign category_name = category | first %}
|
17
|
+
{% assign posts_of_category = category | last %}
|
18
|
+
{% assign first_post = posts_of_category | first %}
|
19
|
+
|
20
|
+
{% if category_name == first_post.categories[0] %}
|
21
|
+
{% assign sub_categories = '' | split: '' %}
|
22
|
+
|
23
|
+
{% for post in posts_of_category %}
|
24
|
+
{% assign second_category = post.categories[1] %}
|
25
|
+
{% if second_category %}
|
26
|
+
{% unless sub_categories contains second_category %}
|
27
|
+
{% assign sub_categories = sub_categories | push: second_category %}
|
28
|
+
{% endunless %}
|
29
|
+
{% endif %}
|
30
|
+
{% endfor %}
|
31
|
+
|
32
|
+
{% assign sub_categories = sub_categories | sort %}
|
33
|
+
{% assign sub_categories_size = sub_categories | size %}
|
34
|
+
|
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>
|
43
|
+
|
44
|
+
{% capture _category_url %}/categories/{{ category_name | slugify | url_encode }}/{% endcapture %}
|
45
|
+
<a href="{{ _category_url | relative_url }}" class="mx-2">{{ category_name }}</a>
|
46
|
+
|
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 %}
|
65
|
+
|
66
|
+
{{ top_posts_size }}
|
67
|
+
|
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 %}
|
79
|
+
</span>
|
80
|
+
</span>
|
81
|
+
|
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 -->
|
135
|
+
|
136
|
+
{% assign group_index = group_index | plus: 1 %}
|
137
|
+
{% endif %}
|
138
|
+
{% endfor %}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
# The Category layout
|
4
|
+
---
|
5
|
+
|
6
|
+
{% include lang.html %}
|
7
|
+
|
8
|
+
<div id="page-category">
|
9
|
+
<h1 class="ps-lg-2">
|
10
|
+
<i class="far fa-folder-open fa-fw text-muted"></i>
|
11
|
+
{{ page.title }}
|
12
|
+
<span class="lead text-muted ps-2">{{ page.posts | size }}</span>
|
13
|
+
</h1>
|
14
|
+
|
15
|
+
<ul class="post-content ps-0">
|
16
|
+
{% for post in page.posts %}
|
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 wrap='span' class='text-muted small' lang=lang %}
|
21
|
+
</li>
|
22
|
+
{% endfor %}
|
23
|
+
</ul>
|
24
|
+
</div>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
---
|
2
|
+
# Jekyll layout that compresses HTML
|
3
|
+
# v3.1.0
|
4
|
+
# http://jch.penibelst.de/
|
5
|
+
# © 2014–2015 Anatol Broder
|
6
|
+
# MIT License
|
7
|
+
---
|
8
|
+
|
9
|
+
{% capture _LINE_FEED %}
|
10
|
+
{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment or site.compress_html.ignore.envs == "all" %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}
|
@@ -0,0 +1,76 @@
|
|
1
|
+
---
|
2
|
+
layout: compress
|
3
|
+
# Default layout
|
4
|
+
---
|
5
|
+
|
6
|
+
<!doctype html>
|
7
|
+
|
8
|
+
{% include origin-type.html %}
|
9
|
+
|
10
|
+
{% include lang.html %}
|
11
|
+
|
12
|
+
{% capture prefer_mode %}
|
13
|
+
{% if site.theme_mode %}
|
14
|
+
data-mode="{{ site.theme_mode }}"
|
15
|
+
{% endif %}
|
16
|
+
{% endcapture %}
|
17
|
+
|
18
|
+
<!-- `site.alt_lang` can specify a language different from the UI -->
|
19
|
+
<html lang="{{ site.alt_lang | default: site.lang }}" {{ prefer_mode }}>
|
20
|
+
{% include head.html %}
|
21
|
+
|
22
|
+
<body>
|
23
|
+
{% include sidebar.html lang=lang %}
|
24
|
+
|
25
|
+
<div id="main-wrapper" class="d-flex justify-content-center">
|
26
|
+
<div id="main" class="container px-xxl-5">
|
27
|
+
{% include topbar.html lang=lang %}
|
28
|
+
{{ content }}
|
29
|
+
{% include_cached search-results.html lang=lang %}
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
{% include_cached footer.html lang=lang %}
|
34
|
+
|
35
|
+
<div id="mask"></div>
|
36
|
+
|
37
|
+
<button id="back-to-top" aria-label="back-to-top" class="btn btn-lg btn-box-shadow">
|
38
|
+
<i class="fas fa-angle-up"></i>
|
39
|
+
</button>
|
40
|
+
|
41
|
+
{% if site.pwa.enabled %}
|
42
|
+
<div
|
43
|
+
id="notification"
|
44
|
+
class="toast"
|
45
|
+
role="alert"
|
46
|
+
aria-live="assertive"
|
47
|
+
aria-atomic="true"
|
48
|
+
data-bs-animation="true"
|
49
|
+
data-bs-autohide="false"
|
50
|
+
>
|
51
|
+
<div class="toast-header">
|
52
|
+
<button
|
53
|
+
type="button"
|
54
|
+
class="btn-close ms-auto"
|
55
|
+
data-bs-dismiss="toast"
|
56
|
+
aria-label="Close"
|
57
|
+
></button>
|
58
|
+
</div>
|
59
|
+
<div class="toast-body text-center pt-0">
|
60
|
+
<p class="px-2 mb-3">{{ site.data.locales[lang].notification.update_found }}</p>
|
61
|
+
<button type="button" class="btn btn-primary" aria-label="Update">
|
62
|
+
{{ site.data.locales[lang].notification.update }}
|
63
|
+
</button>
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
{% endif %}
|
67
|
+
|
68
|
+
{% include js-selector.html %}
|
69
|
+
|
70
|
+
{% if page.mermaid %}
|
71
|
+
{% include mermaid.html %}
|
72
|
+
{% endif %}
|
73
|
+
|
74
|
+
{% include_cached search-loader.html %}
|
75
|
+
</body>
|
76
|
+
</html>
|
data/_layouts/home.html
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
refactor: true
|
4
|
+
---
|
5
|
+
|
6
|
+
{% include lang.html %}
|
7
|
+
|
8
|
+
{% assign pinned = site.posts | where: 'pin', 'true' %}
|
9
|
+
{% assign default = site.posts | where_exp: 'item', 'item.pin != true and item.hidden != true' %}
|
10
|
+
|
11
|
+
{% assign posts = '' | split: '' %}
|
12
|
+
|
13
|
+
<!-- Get pinned posts -->
|
14
|
+
|
15
|
+
{% assign offset = paginator.page | minus: 1 | times: paginator.per_page %}
|
16
|
+
{% assign pinned_num = pinned.size | minus: offset %}
|
17
|
+
|
18
|
+
{% if pinned_num > 0 %}
|
19
|
+
{% for i in (offset..pinned.size) limit: pinned_num %}
|
20
|
+
{% assign posts = posts | push: pinned[i] %}
|
21
|
+
{% endfor %}
|
22
|
+
{% else %}
|
23
|
+
{% assign pinned_num = 0 %}
|
24
|
+
{% endif %}
|
25
|
+
|
26
|
+
<!-- Get default posts -->
|
27
|
+
|
28
|
+
{% assign default_beg = offset | minus: pinned.size %}
|
29
|
+
|
30
|
+
{% if default_beg < 0 %}
|
31
|
+
{% assign default_beg = 0 %}
|
32
|
+
{% endif %}
|
33
|
+
|
34
|
+
{% assign default_num = paginator.posts | size | minus: pinned_num %}
|
35
|
+
{% assign default_end = default_beg | plus: default_num | minus: 1 %}
|
36
|
+
|
37
|
+
{% if default_num > 0 %}
|
38
|
+
{% for i in (default_beg..default_end) %}
|
39
|
+
{% assign posts = posts | push: default[i] %}
|
40
|
+
{% endfor %}
|
41
|
+
{% endif %}
|
42
|
+
|
43
|
+
<div id="post-list">
|
44
|
+
{% for post in posts %}
|
45
|
+
<a href="{{ post.url | relative_url }}" class="card-wrapper">
|
46
|
+
<div class="card post-preview flex-md-row-reverse">
|
47
|
+
{% if post.image %}
|
48
|
+
{% if post.image.lqip %}
|
49
|
+
{% capture lqip %}lqip="{{ post.image.lqip }}"{% endcapture %}
|
50
|
+
{% endif %}
|
51
|
+
|
52
|
+
{% assign src = post.image.path | default: post.image %}
|
53
|
+
{% unless src contains '//' %}
|
54
|
+
{% assign src = post.img_path | append: '/' | append: src | replace: '//', '/' %}
|
55
|
+
{% endunless %}
|
56
|
+
|
57
|
+
{% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %}
|
58
|
+
|
59
|
+
<img src="{{ src }}" w="17" h="10" alt="{{ alt }}" {{ lqip }}>
|
60
|
+
{% endif %}
|
61
|
+
|
62
|
+
<div class="card-body d-flex flex-column">
|
63
|
+
<h1 class="card-title my-2 mt-md-0">
|
64
|
+
{{ post.title }}
|
65
|
+
</h1>
|
66
|
+
|
67
|
+
<div class="card-text post-content mt-0 mb-2">
|
68
|
+
<p>
|
69
|
+
{% include no-linenos.html content=post.content %}
|
70
|
+
{{ content | markdownify | strip_html | truncate: 200 | escape }}
|
71
|
+
</p>
|
72
|
+
</div>
|
73
|
+
|
74
|
+
<div class="post-meta flex-grow-1 d-flex align-items-end">
|
75
|
+
<div class="me-auto">
|
76
|
+
<!-- posted date -->
|
77
|
+
<i class="far fa-calendar fa-fw me-1"></i>
|
78
|
+
{% include datetime.html date=post.date lang=lang %}
|
79
|
+
|
80
|
+
<!-- categories -->
|
81
|
+
{% if post.categories.size > 0 %}
|
82
|
+
<i class="far fa-folder-open fa-fw me-1"></i>
|
83
|
+
<span class="categories">
|
84
|
+
{% for category in post.categories %}
|
85
|
+
{{ category }}
|
86
|
+
{%- unless forloop.last -%},{%- endunless -%}
|
87
|
+
{% endfor %}
|
88
|
+
</span>
|
89
|
+
{% endif %}
|
90
|
+
</div>
|
91
|
+
|
92
|
+
{% if post.pin %}
|
93
|
+
<div class="pin ms-1">
|
94
|
+
<i class="fas fa-thumbtack fa-fw"></i>
|
95
|
+
<span>{{ site.data.locales[lang].post.pin_prompt }}</span>
|
96
|
+
</div>
|
97
|
+
{% endif %}
|
98
|
+
</div>
|
99
|
+
<!-- .post-meta -->
|
100
|
+
</div>
|
101
|
+
<!-- .card-body -->
|
102
|
+
</div>
|
103
|
+
</a>
|
104
|
+
{% endfor %}
|
105
|
+
</div>
|
106
|
+
<!-- #post-list -->
|
107
|
+
|
108
|
+
{% if paginator.total_pages > 1 %}
|
109
|
+
{% include post-paginator.html %}
|
110
|
+
{% endif %}
|
data/_layouts/page.html
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
|
5
|
+
{% include lang.html %}
|
6
|
+
{% include origin-type.html %}
|
7
|
+
|
8
|
+
{% if layout.tail_includes %}
|
9
|
+
{% assign has_tail = true %}
|
10
|
+
{% endif %}
|
11
|
+
|
12
|
+
<div class="row{% unless has_tail %} mb-5{% endunless %}">
|
13
|
+
<!-- core -->
|
14
|
+
<div id="core-wrapper" class="col-12 col-lg-11 col-xl-9 pe-xl-4">
|
15
|
+
{% capture padding %}
|
16
|
+
{% unless page.layout == 'home' %}px-1{% endunless %}
|
17
|
+
{% endcapture %}
|
18
|
+
|
19
|
+
<div class="post {{ padding | strip }} px-md-2">
|
20
|
+
{% capture _content %}
|
21
|
+
{% if layout.refactor or page.layout == 'page' %}
|
22
|
+
{% include refactor-content.html content=content lang=lang %}
|
23
|
+
{% else %}
|
24
|
+
{{ content }}
|
25
|
+
{% endif %}
|
26
|
+
{% endcapture %}
|
27
|
+
|
28
|
+
{% if page.layout == 'page' or page.collection == 'tabs' %}
|
29
|
+
{% assign tab_key = page.title | downcase %}
|
30
|
+
{% assign title = site.data.locales[lang].tabs[tab_key] | default: page.title %}
|
31
|
+
<h1 class="dynamic-title">
|
32
|
+
{{ title }}
|
33
|
+
</h1>
|
34
|
+
<div class="post-content">
|
35
|
+
{{ _content }}
|
36
|
+
</div>
|
37
|
+
{% else %}
|
38
|
+
{{ _content }}
|
39
|
+
{% endif %}
|
40
|
+
</div>
|
41
|
+
</div>
|
42
|
+
<!-- #core-wrapper -->
|
43
|
+
|
44
|
+
<!-- panel -->
|
45
|
+
<div id="panel-wrapper" class="col-xl-3 ps-2 text-muted">
|
46
|
+
<div class="access">
|
47
|
+
{% include_cached update-list.html lang=lang %}
|
48
|
+
{% include_cached trending-tags.html lang=lang %}
|
49
|
+
</div>
|
50
|
+
|
51
|
+
{% for _include in layout.panel_includes %}
|
52
|
+
{% assign _include_path = _include | append: '.html' %}
|
53
|
+
{% include {{ _include_path }} lang=lang %}
|
54
|
+
{% endfor %}
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<!-- tail -->
|
59
|
+
{% if has_tail %}
|
60
|
+
<div class="row">
|
61
|
+
<div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 px-3 pe-xl-4 mt-5">
|
62
|
+
{% for _include in layout.tail_includes %}
|
63
|
+
{% assign _include_path = _include | append: '.html' %}
|
64
|
+
{% include {{ _include_path }} lang=lang %}
|
65
|
+
{% endfor %}
|
66
|
+
</div>
|
67
|
+
</div>
|
68
|
+
{% endif %}
|
data/_layouts/post.html
ADDED
@@ -0,0 +1,133 @@
|
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
refactor: true
|
4
|
+
panel_includes:
|
5
|
+
- toc
|
6
|
+
tail_includes:
|
7
|
+
- related-posts
|
8
|
+
- post-nav
|
9
|
+
- comments
|
10
|
+
---
|
11
|
+
|
12
|
+
{% include lang.html %}
|
13
|
+
|
14
|
+
<h1 data-toc-skip>{{ page.title }}</h1>
|
15
|
+
|
16
|
+
<div class="post-meta text-muted">
|
17
|
+
<!-- published date -->
|
18
|
+
<span>
|
19
|
+
{{ site.data.locales[lang].post.posted }}
|
20
|
+
{% include datetime.html date=page.date tooltip=true lang=lang %}
|
21
|
+
</span>
|
22
|
+
|
23
|
+
<!-- lastmod date -->
|
24
|
+
{% if page.last_modified_at and page.last_modified_at != page.date %}
|
25
|
+
<span>
|
26
|
+
{{ site.data.locales[lang].post.updated }}
|
27
|
+
{% include datetime.html date=page.last_modified_at tooltip=true lang=lang %}
|
28
|
+
</span>
|
29
|
+
{% endif %}
|
30
|
+
|
31
|
+
{% if page.image %}
|
32
|
+
{% capture src %}src="{{ page.image.path | default: page.image }}"{% endcapture %}
|
33
|
+
{% capture class %}class="preview-img{% if page.image.no_bg %}{{ ' no-bg' }}{% endif %}"{% endcapture %}
|
34
|
+
{% capture alt %}alt="{{ page.image.alt | xml_escape | default: "Preview Image" }}"{% endcapture %}
|
35
|
+
|
36
|
+
{% capture lqip %}
|
37
|
+
{% if page.image.lqip %}
|
38
|
+
lqip="{{ page.image.lqip }}"
|
39
|
+
{% endif %}
|
40
|
+
{% endcapture %}
|
41
|
+
|
42
|
+
<div class="mt-3 mb-3">
|
43
|
+
<img {{ src }} {{ class }} {{ alt }} w="1200" h="630" {{ lqip | strip }}>
|
44
|
+
{%- if page.image.alt -%}
|
45
|
+
<figcaption class="text-center pt-2 pb-2">{{ page.image.alt }}</figcaption>
|
46
|
+
{%- endif -%}
|
47
|
+
</div>
|
48
|
+
{% endif %}
|
49
|
+
|
50
|
+
<div class="d-flex justify-content-between">
|
51
|
+
<!-- author(s) -->
|
52
|
+
<span>
|
53
|
+
{% if page.author %}
|
54
|
+
{% assign authors = page.author %}
|
55
|
+
{% elsif page.authors %}
|
56
|
+
{% assign authors = page.authors %}
|
57
|
+
{% endif %}
|
58
|
+
|
59
|
+
{{ site.data.locales[lang].post.written_by }}
|
60
|
+
|
61
|
+
<em>
|
62
|
+
{% if authors %}
|
63
|
+
{% for author in authors %}
|
64
|
+
<a href="{{ site.data.authors[author].url }}">{{ site.data.authors[author].name }}</a>
|
65
|
+
{% unless forloop.last %}</em>, <em>{% endunless %}
|
66
|
+
{% endfor %}
|
67
|
+
{% else %}
|
68
|
+
<a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>
|
69
|
+
{% endif %}
|
70
|
+
</em>
|
71
|
+
</span>
|
72
|
+
|
73
|
+
<div>
|
74
|
+
<!-- read time -->
|
75
|
+
{% include read-time.html content=content prompt=true lang=lang %}
|
76
|
+
</div>
|
77
|
+
|
78
|
+
</div> <!-- .d-flex -->
|
79
|
+
|
80
|
+
</div> <!-- .post-meta -->
|
81
|
+
|
82
|
+
<div class="post-content">
|
83
|
+
{{ content }}
|
84
|
+
</div>
|
85
|
+
|
86
|
+
<div class="post-tail-wrapper text-muted">
|
87
|
+
|
88
|
+
<!-- categories -->
|
89
|
+
{% if page.categories.size > 0 %}
|
90
|
+
<div class="post-meta mb-3">
|
91
|
+
<i class="far fa-folder-open fa-fw me-1"></i>
|
92
|
+
{% for category in page.categories %}
|
93
|
+
<a href='{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/'>{{ category }}</a>
|
94
|
+
{%- unless forloop.last -%}, {%- endunless -%}
|
95
|
+
{% endfor %}
|
96
|
+
</div>
|
97
|
+
{% endif %}
|
98
|
+
|
99
|
+
<!-- tags -->
|
100
|
+
{% if page.tags.size > 0 %}
|
101
|
+
<div class="post-tags">
|
102
|
+
<i class="fa fa-tags fa-fw me-1"></i>
|
103
|
+
{% for tag in page.tags %}
|
104
|
+
<a href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/"
|
105
|
+
class="post-tag no-text-decoration" >
|
106
|
+
{{- tag -}}
|
107
|
+
</a>
|
108
|
+
{% endfor %}
|
109
|
+
</div>
|
110
|
+
{% endif %}
|
111
|
+
|
112
|
+
<div class="post-tail-bottom
|
113
|
+
d-flex justify-content-between align-items-center mt-3 pt-5 pb-2">
|
114
|
+
<div class="license-wrapper">
|
115
|
+
|
116
|
+
{% if site.data.locales[lang].copyright.license.template %}
|
117
|
+
|
118
|
+
{% capture _replacement %}
|
119
|
+
<a href="{{ site.data.locales[lang].copyright.license.link }}">
|
120
|
+
{{ site.data.locales[lang].copyright.license.name }}
|
121
|
+
</a>
|
122
|
+
{% endcapture %}
|
123
|
+
|
124
|
+
{{ site.data.locales[lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }}
|
125
|
+
|
126
|
+
{% endif %}
|
127
|
+
</div>
|
128
|
+
|
129
|
+
{% include post-sharing.html lang=lang %}
|
130
|
+
|
131
|
+
</div><!-- .post-tail-bottom -->
|
132
|
+
|
133
|
+
</div><!-- div.post-tail-wrapper -->
|
data/_layouts/tag.html
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
# The layout for Tag page
|
4
|
+
---
|
5
|
+
|
6
|
+
{% include lang.html %}
|
7
|
+
|
8
|
+
<div id="page-tag">
|
9
|
+
<h1 class="ps-lg-2">
|
10
|
+
<i class="fa fa-tag fa-fw text-muted"></i>
|
11
|
+
{{ page.title }}
|
12
|
+
<span class="lead text-muted ps-2">{{ page.posts | size }}</span>
|
13
|
+
</h1>
|
14
|
+
<ul class="post-content ps-0">
|
15
|
+
{% for post in page.posts %}
|
16
|
+
<li class="d-flex justify-content-between px-md-3">
|
17
|
+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
18
|
+
<span class="dash flex-grow-1"></span>
|
19
|
+
{% include datetime.html date=post.date wrap='span' class='text-muted small' lang=lang %}
|
20
|
+
</li>
|
21
|
+
{% endfor %}
|
22
|
+
</ul>
|
23
|
+
</div>
|