jekyll-theme-chirpy-clarkezone 5.3.2
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 +105 -0
- data/_data/assets/cross_origin.yml +62 -0
- data/_data/assets/self_host.yml +51 -0
- data/_data/authors.yml +17 -0
- data/_data/contact.yml +30 -0
- data/_data/locales/bg-BG.yml +83 -0
- data/_data/locales/de-DE.yml +82 -0
- data/_data/locales/en.yml +93 -0
- data/_data/locales/es-ES.yml +79 -0
- data/_data/locales/fr-FR.yml +79 -0
- data/_data/locales/hu-HU.yml +81 -0
- data/_data/locales/id-ID.yml +79 -0
- data/_data/locales/ko-KR.yml +86 -0
- data/_data/locales/my-MM.yml +79 -0
- data/_data/locales/pt-BR.yml +79 -0
- data/_data/locales/ru-RU.yml +79 -0
- data/_data/locales/tr-TR.yml +79 -0
- data/_data/locales/uk-UA.yml +79 -0
- data/_data/locales/vi-VN.yml +77 -0
- data/_data/locales/zh-CN.yml +85 -0
- data/_data/share.yml +27 -0
- data/_includes/assets-origin.html +12 -0
- data/_includes/comments/disqus.html +54 -0
- data/_includes/comments/giscus.html +56 -0
- data/_includes/comments/utterances.html +51 -0
- data/_includes/comments.html +5 -0
- data/_includes/datetime.html +15 -0
- data/_includes/favicons.html +17 -0
- data/_includes/footer.html +36 -0
- data/_includes/google-analytics.html +14 -0
- data/_includes/head.html +115 -0
- data/_includes/js-selector.html +100 -0
- data/_includes/jsdelivr-combine.html +32 -0
- data/_includes/language-alias.html +70 -0
- data/_includes/mermaid.html +57 -0
- data/_includes/mode-toggle.html +129 -0
- data/_includes/no-linenos.html +10 -0
- data/_includes/post-nav.html +30 -0
- data/_includes/post-paginator.html +88 -0
- data/_includes/post-sharing.html +27 -0
- data/_includes/read-time.html +30 -0
- data/_includes/refactor-content.html +282 -0
- data/_includes/related-posts.html +103 -0
- data/_includes/search-loader.html +46 -0
- data/_includes/search-results.html +11 -0
- data/_includes/sidebar.html +93 -0
- data/_includes/toc.html +16 -0
- data/_includes/topbar.html +70 -0
- data/_includes/trending-tags.html +50 -0
- data/_includes/update-list.html +40 -0
- data/_layouts/archives.html +34 -0
- data/_layouts/categories.html +118 -0
- data/_layouts/category.html +22 -0
- data/_layouts/compress.html +10 -0
- data/_layouts/default.html +71 -0
- data/_layouts/home.html +94 -0
- data/_layouts/page.html +63 -0
- data/_layouts/post.html +150 -0
- data/_layouts/tag.html +21 -0
- data/_layouts/tags.html +23 -0
- data/_sass/addon/commons.scss +1667 -0
- data/_sass/addon/module.scss +154 -0
- data/_sass/addon/syntax.scss +283 -0
- data/_sass/addon/variables.scss +30 -0
- data/_sass/colors/dark-syntax.scss +87 -0
- data/_sass/colors/dark-typography.scss +157 -0
- data/_sass/colors/light-syntax.scss +83 -0
- data/_sass/colors/light-typography.scss +93 -0
- data/_sass/jekyll-theme-chirpy-clarkezone.scss +24 -0
- data/_sass/layout/archives.scss +136 -0
- data/_sass/layout/categories.scss +66 -0
- data/_sass/layout/category-tag.scss +73 -0
- data/_sass/layout/home.scss +178 -0
- data/_sass/layout/post.scss +369 -0
- data/_sass/layout/tags.scss +19 -0
- data/_sass/variables-hook.scss +3 -0
- data/assets/404.html +14 -0
- data/assets/css/style.scss +12 -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 +18 -0
- data/assets/js/data/swcache.js +55 -0
- data/assets/js/dist/categories.min.js +6 -0
- data/assets/js/dist/commons.min.js +6 -0
- data/assets/js/dist/home.min.js +6 -0
- data/assets/js/dist/misc.min.js +6 -0
- data/assets/js/dist/page.min.js +6 -0
- data/assets/js/dist/post.min.js +6 -0
- data/assets/js/dist/pvreport.min.js +6 -0
- data/assets/js/pwa/app.js +47 -0
- data/assets/js/pwa/sw.js +89 -0
- data/assets/js/pwa/unregister.js +12 -0
- data/assets/robots.txt +10 -0
- metadata +236 -0
@@ -0,0 +1,40 @@
|
|
1
|
+
{% comment %}
|
2
|
+
Get the last 5 posts from lastmod list.
|
3
|
+
{% endcomment %}
|
4
|
+
|
5
|
+
{% assign MAX_SIZE = 5 %}
|
6
|
+
|
7
|
+
{% assign all_list = "" | split: "" %}
|
8
|
+
|
9
|
+
{% for post in site.posts %}
|
10
|
+
{% if post.last_modified_at %}
|
11
|
+
{% capture elem %}
|
12
|
+
{{- post.last_modified_at | date: "%Y%m%d%H%M%S" -}}::{{- forloop.index0 -}}
|
13
|
+
{% endcapture %}
|
14
|
+
{% assign all_list = all_list | push: elem %}
|
15
|
+
{% endif %}
|
16
|
+
{% endfor %}
|
17
|
+
|
18
|
+
{% assign all_list = all_list | sort | reverse %}
|
19
|
+
|
20
|
+
{% assign update_list = "" | split: "" %}
|
21
|
+
|
22
|
+
{% for entry in all_list limit:MAX_SIZE %}
|
23
|
+
{% assign update_list = update_list | push: entry %}
|
24
|
+
{% endfor %}
|
25
|
+
|
26
|
+
{% if update_list.size > 0 %}
|
27
|
+
|
28
|
+
<div id="access-lastmod" class="post">
|
29
|
+
<div class="panel-heading">{{- site.data.locales[site.lang].panel.lastmod -}}</div>
|
30
|
+
<ul class="post-content pl-0 pb-1 ml-1 mt-2">
|
31
|
+
{% for item in update_list %}
|
32
|
+
{% assign index = item | split: "::" | last | plus: 0 %}
|
33
|
+
{% assign post = site.posts[index] %}
|
34
|
+
{% assign url = post.url | relative_url %}
|
35
|
+
<li><a href="{{ url }}">{{ post.title }}</a></li>
|
36
|
+
{% endfor %}
|
37
|
+
</ul>
|
38
|
+
</div> <!-- #access-lastmod -->
|
39
|
+
|
40
|
+
{% endif %}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
# The Archives of posts.
|
4
|
+
---
|
5
|
+
|
6
|
+
{% assign df_strftime_m = site.data.locales[site.lang].df.archives.strftime | default: '/ %m' %}
|
7
|
+
{% assign df_dayjs_m = site.data.locales[site.lang].df.archives.dayjs | default: '/ MM' %}
|
8
|
+
|
9
|
+
<div id="archives" class="pl-xl-3">
|
10
|
+
|
11
|
+
{% for post in site.posts %}
|
12
|
+
{% capture cur_year %}{{ post.date | date: "%Y" }}{% endcapture %}
|
13
|
+
|
14
|
+
{% if cur_year != last_year %}
|
15
|
+
{% unless forloop.first %}</ul>{% endunless %}
|
16
|
+
<div class="year lead">{{ cur_year }}</div>
|
17
|
+
<ul class="list-unstyled">
|
18
|
+
{% assign last_year = cur_year %}
|
19
|
+
{% endif %}
|
20
|
+
|
21
|
+
<li>
|
22
|
+
{% assign ts = post.date | date: '%s' %}
|
23
|
+
<span class="date day" data-ts="{{ ts }}" data-df="DD">{{ post.date | date: "%d" }}</span>
|
24
|
+
<span class="date month small text-muted ml-1" data-ts="{{ ts }}" data-df="{{ df_dayjs_m }}">
|
25
|
+
{{ post.date | date: df_strftime_m }}
|
26
|
+
</span>
|
27
|
+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
28
|
+
</li>
|
29
|
+
|
30
|
+
{% if forloop.last %}</ul>{% endif %}
|
31
|
+
|
32
|
+
{% endfor %}
|
33
|
+
|
34
|
+
</div>
|
@@ -0,0 +1,118 @@
|
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
# All the Categories of posts
|
4
|
+
---
|
5
|
+
|
6
|
+
{% assign HEAD_PREFIX = "h_" %}
|
7
|
+
{% assign LIST_PREFIX = "l_" %}
|
8
|
+
|
9
|
+
{% assign group_index = 0 %}
|
10
|
+
|
11
|
+
{% assign sort_categories = site.categories | sort %}
|
12
|
+
|
13
|
+
{% for category in sort_categories %}
|
14
|
+
{% assign category_name = category | first %}
|
15
|
+
{% assign posts_of_category = category | last %}
|
16
|
+
{% assign first_post = posts_of_category | first %}
|
17
|
+
|
18
|
+
{% if category_name == first_post.categories[0] %}
|
19
|
+
{% assign sub_categories = "" | split: "" %}
|
20
|
+
|
21
|
+
{% for post in posts_of_category %}
|
22
|
+
{% assign second_category = post.categories[1] %}
|
23
|
+
{% if second_category %}
|
24
|
+
{% unless sub_categories contains second_category %}
|
25
|
+
{% assign sub_categories = sub_categories | push: second_category %}
|
26
|
+
{% endunless %}
|
27
|
+
{% endif %}
|
28
|
+
{% endfor %}
|
29
|
+
|
30
|
+
{% assign sub_categories = sub_categories | sort %}
|
31
|
+
{% assign sub_categories_size = sub_categories | size %}
|
32
|
+
|
33
|
+
<div class="card categories">
|
34
|
+
<!-- top-category -->
|
35
|
+
<div id="{{ HEAD_PREFIX }}{{ group_index }}"
|
36
|
+
class="card-header d-flex justify-content-between hide-border-bottom">
|
37
|
+
<span>
|
38
|
+
<i class="far fa-folder{% if sub_categories_size > 0 %}-open{% endif %} fa-fw"></i>
|
39
|
+
|
40
|
+
{% capture _category_url %}/categories/{{ category_name | slugify | url_encode }}/{% endcapture %}
|
41
|
+
<a href="{{ _category_url | relative_url }}" class="ml-1 mr-2">{{ category_name }}</a>
|
42
|
+
|
43
|
+
<!-- content count -->
|
44
|
+
{% assign top_posts_size = site.categories[category_name] | size %}
|
45
|
+
<span class="text-muted small font-weight-light">
|
46
|
+
{% if sub_categories_size > 0 %}
|
47
|
+
{{ sub_categories_size }}
|
48
|
+
{% if sub_categories_size > 1 %}
|
49
|
+
{{ site.data.locales[site.lang].categories.category_measure.plural
|
50
|
+
| default: site.data.locales[site.lang].categories.category_measure }}
|
51
|
+
{% else %}
|
52
|
+
{{ site.data.locales[site.lang].categories.category_measure.singular
|
53
|
+
| default: site.data.locales[site.lang].categories.category_measure }}
|
54
|
+
{% endif %},
|
55
|
+
{% endif %}
|
56
|
+
|
57
|
+
{{ top_posts_size }}
|
58
|
+
|
59
|
+
{% if top_posts_size > 1 %}
|
60
|
+
{{ site.data.locales[site.lang].categories.post_measure.plural
|
61
|
+
| default: site.data.locales[site.lang].categories.post_measure }}
|
62
|
+
{% else %}
|
63
|
+
{{ site.data.locales[site.lang].categories.post_measure.singular
|
64
|
+
| default: site.data.locales[site.lang].categories.post_measure }}
|
65
|
+
{% endif %}
|
66
|
+
</span>
|
67
|
+
</span>
|
68
|
+
|
69
|
+
<!-- arrow -->
|
70
|
+
{% if sub_categories_size > 0%}
|
71
|
+
<a href="#{{ LIST_PREFIX }}{{ group_index }}" data-toggle="collapse"
|
72
|
+
aria-expanded="true" aria-label="{{ HEAD_PREFIX }}{{ group_index }}-trigger"
|
73
|
+
class="category-trigger hide-border-bottom">
|
74
|
+
<i class="fas fa-fw fa-angle-down"></i>
|
75
|
+
</a>
|
76
|
+
{% else %}
|
77
|
+
<span data-toggle="collapse" class="category-trigger hide-border-bottom disabled">
|
78
|
+
<i class="fas fa-fw fa-angle-right"></i>
|
79
|
+
</span>
|
80
|
+
{% endif %}
|
81
|
+
|
82
|
+
</div> <!-- .card-header -->
|
83
|
+
|
84
|
+
<!-- Sub-categories -->
|
85
|
+
{% if sub_categories_size > 0 %}
|
86
|
+
<div id="{{ LIST_PREFIX }}{{ group_index }}" class="collapse show" aria-expanded="true">
|
87
|
+
<ul class="list-group">
|
88
|
+
{% for sub_category in sub_categories %}
|
89
|
+
<li class="list-group-item">
|
90
|
+
<i class="far fa-folder fa-fw"></i>
|
91
|
+
|
92
|
+
{% capture _sub_ctg_url %}/categories/{{ sub_category | slugify | url_encode }}/{% endcapture %}
|
93
|
+
<a href="{{ _sub_ctg_url | relative_url }}" class="ml-1 mr-2">{{ sub_category }}</a>
|
94
|
+
|
95
|
+
{% assign posts_size = site.categories[sub_category] | size %}
|
96
|
+
<span class="text-muted small font-weight-light">
|
97
|
+
{{ posts_size }}
|
98
|
+
|
99
|
+
{% if posts_size > 1 %}
|
100
|
+
{{ site.data.locales[site.lang].categories.post_measure.plural
|
101
|
+
| default: site.data.locales[site.lang].categories.post_measure }}
|
102
|
+
{% else %}
|
103
|
+
{{ site.data.locales[site.lang].categories.post_measure.singular
|
104
|
+
| default: site.data.locales[site.lang].categories.post_measure }}
|
105
|
+
{% endif %}
|
106
|
+
</span>
|
107
|
+
</li>
|
108
|
+
{% endfor %}
|
109
|
+
</ul>
|
110
|
+
</div>
|
111
|
+
{% endif %}
|
112
|
+
|
113
|
+
</div> <!-- .card -->
|
114
|
+
|
115
|
+
{% assign group_index = group_index | plus: 1 %}
|
116
|
+
|
117
|
+
{% endif %}
|
118
|
+
{% endfor %}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
# The Category layout
|
4
|
+
---
|
5
|
+
|
6
|
+
<div id="page-category">
|
7
|
+
<h1 class="pl-lg-2">
|
8
|
+
<i class="far fa-folder-open fa-fw text-muted"></i>
|
9
|
+
{{ page.title }}
|
10
|
+
<span class="lead text-muted pl-2">{{ page.posts | size }}</span>
|
11
|
+
</h1>
|
12
|
+
|
13
|
+
<ul class="post-content pl-0">
|
14
|
+
{% for post in page.posts %}
|
15
|
+
<li class="d-flex justify-content-between pl-md-3 pr-md-3">
|
16
|
+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
17
|
+
<span class="dash flex-grow-1"></span>
|
18
|
+
{% include datetime.html date=post.date wrap='span' class='text-muted small' %}
|
19
|
+
</li>
|
20
|
+
{% endfor %}
|
21
|
+
</ul>
|
22
|
+
</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,71 @@
|
|
1
|
+
---
|
2
|
+
layout: compress
|
3
|
+
# Default layout
|
4
|
+
---
|
5
|
+
|
6
|
+
<!DOCTYPE html>
|
7
|
+
|
8
|
+
{% include assets-origin.html %}
|
9
|
+
|
10
|
+
{% capture prefer_mode %}
|
11
|
+
{% if site.theme_mode %}
|
12
|
+
data-mode="{{ site.theme_mode }}"
|
13
|
+
{% endif %}
|
14
|
+
{% endcapture %}
|
15
|
+
|
16
|
+
<!-- `site.alt_lang` can specify a language different from the UI -->
|
17
|
+
<html lang="{{ site.alt_lang | default: site.lang }}"{{ prefer_mode }}>
|
18
|
+
|
19
|
+
{% include head.html %}
|
20
|
+
|
21
|
+
<body data-spy="scroll" data-target="#toc" data-topbar-visible="true">
|
22
|
+
|
23
|
+
{% include sidebar.html %}
|
24
|
+
|
25
|
+
{% include topbar.html %}
|
26
|
+
|
27
|
+
<div id="main-wrapper" class="d-flex justify-content-center">
|
28
|
+
<div id="main" class="container pl-xl-4 pr-xl-4">
|
29
|
+
{{ content }}
|
30
|
+
</div>
|
31
|
+
|
32
|
+
{% include search-results.html %}
|
33
|
+
|
34
|
+
</div> <!-- #main-wrapper -->
|
35
|
+
|
36
|
+
{% include footer.html %}
|
37
|
+
|
38
|
+
{% if page.mermaid %}
|
39
|
+
{% include mermaid.html %}
|
40
|
+
{% endif %}
|
41
|
+
|
42
|
+
<div id="mask"></div>
|
43
|
+
|
44
|
+
<a id="back-to-top" href="#" aria-label="back-to-top" class="btn btn-lg btn-box-shadow" role="button">
|
45
|
+
<i class="fas fa-angle-up"></i>
|
46
|
+
</a>
|
47
|
+
|
48
|
+
{% if site.pwa.enabled %}
|
49
|
+
<div id="notification" class="toast" role="alert" aria-live="assertive" aria-atomic="true"
|
50
|
+
data-animation="true" data-autohide="false">
|
51
|
+
<div class="toast-header">
|
52
|
+
<button type="button" class="ml-2 ml-auto close" data-dismiss="toast" aria-label="Close">
|
53
|
+
<span aria-hidden="true">×</span>
|
54
|
+
</button>
|
55
|
+
</div>
|
56
|
+
<div class="toast-body text-center pt-0">
|
57
|
+
<p class="pl-2 pr-2 mb-3">{{ site.data.locales[site.lang].notification.update_found }}</p>
|
58
|
+
<button type="button" class="btn btn-primary" aria-label="Update">
|
59
|
+
{{ site.data.locales[site.lang].notification.update }}
|
60
|
+
</button>
|
61
|
+
</div>
|
62
|
+
</div>
|
63
|
+
{% endif %}
|
64
|
+
|
65
|
+
{% include search-loader.html %}
|
66
|
+
|
67
|
+
{% include js-selector.html %}
|
68
|
+
|
69
|
+
</body>
|
70
|
+
|
71
|
+
</html>
|
data/_layouts/home.html
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
# The Home page layout
|
4
|
+
---
|
5
|
+
|
6
|
+
{% assign pinned = site.posts | where: "pin", "true" %}
|
7
|
+
{% assign default = site.posts | where_exp: "item", "item.pin != true and item.hidden != true" %}
|
8
|
+
|
9
|
+
{% assign posts = "" | split: "" %}
|
10
|
+
|
11
|
+
<!-- Get pinned posts -->
|
12
|
+
|
13
|
+
{% assign offset = paginator.page | minus: 1 | times: paginator.per_page %}
|
14
|
+
{% assign pinned_num = pinned.size | minus: offset %}
|
15
|
+
|
16
|
+
{% if pinned_num > 0 %}
|
17
|
+
{% for i in (offset..pinned.size) limit: pinned_num %}
|
18
|
+
{% assign posts = posts | push: pinned[i] %}
|
19
|
+
{% endfor %}
|
20
|
+
{% else %}
|
21
|
+
{% assign pinned_num = 0 %}
|
22
|
+
{% endif %}
|
23
|
+
|
24
|
+
<!-- Get default posts -->
|
25
|
+
|
26
|
+
{% assign default_beg = offset | minus: pinned.size %}
|
27
|
+
|
28
|
+
{% if default_beg < 0 %}
|
29
|
+
{% assign default_beg = 0 %}
|
30
|
+
{% endif %}
|
31
|
+
|
32
|
+
{% assign default_num = paginator.posts | size | minus: pinned_num %}
|
33
|
+
{% assign default_end = default_beg | plus: default_num | minus: 1 %}
|
34
|
+
|
35
|
+
{% if default_num > 0 %}
|
36
|
+
{% for i in (default_beg..default_end) %}
|
37
|
+
{% assign posts = posts | push: default[i] %}
|
38
|
+
{% endfor %}
|
39
|
+
{% endif %}
|
40
|
+
|
41
|
+
<div id="post-list">
|
42
|
+
|
43
|
+
{% for post in posts %}
|
44
|
+
|
45
|
+
<div class="post-preview">
|
46
|
+
<h1>
|
47
|
+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
48
|
+
</h1>
|
49
|
+
|
50
|
+
<div class="post-content">
|
51
|
+
<p>
|
52
|
+
{% include no-linenos.html content=post.content %}
|
53
|
+
{{ content | markdownify | strip_html | truncate: 200 | escape }}
|
54
|
+
</p>
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<div class="post-meta text-muted d-flex">
|
58
|
+
<div class="mr-auto">
|
59
|
+
|
60
|
+
<!-- posted date -->
|
61
|
+
<i class="far fa-calendar fa-fw"></i>
|
62
|
+
{% include datetime.html date=post.date %}
|
63
|
+
|
64
|
+
<!-- categories -->
|
65
|
+
{% if post.categories.size > 0 %}
|
66
|
+
<i class="far fa-folder-open fa-fw"></i>
|
67
|
+
<span>
|
68
|
+
{% for category in post.categories %}
|
69
|
+
{{ category }}
|
70
|
+
{%- unless forloop.last -%},{%- endunless -%}
|
71
|
+
{% endfor %}
|
72
|
+
</span>
|
73
|
+
{% endif %}
|
74
|
+
|
75
|
+
</div>
|
76
|
+
|
77
|
+
{% if post.pin %}
|
78
|
+
<div class="pin">
|
79
|
+
<i class="fas fa-thumbtack fa-fw"></i>
|
80
|
+
<span>{{ site.data.locales[site.lang].post.pin_prompt }}</span>
|
81
|
+
</div>
|
82
|
+
{% endif %}
|
83
|
+
|
84
|
+
</div> <!-- .post-meta -->
|
85
|
+
|
86
|
+
</div> <!-- .post-review -->
|
87
|
+
|
88
|
+
{% endfor %}
|
89
|
+
|
90
|
+
</div> <!-- #post-list -->
|
91
|
+
|
92
|
+
{% if paginator.total_pages > 0 %}
|
93
|
+
{% include post-paginator.html %}
|
94
|
+
{% endif %}
|
data/_layouts/page.html
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
|
5
|
+
{% include assets-origin.html %}
|
6
|
+
|
7
|
+
<div class="row">
|
8
|
+
|
9
|
+
<!-- core -->
|
10
|
+
<div id="core-wrapper" class="col-12 col-lg-11 col-xl-9 pr-xl-4">
|
11
|
+
<div class="post pl-1 pr-1 pl-md-2 pr-md-2">
|
12
|
+
|
13
|
+
{% capture _content %}
|
14
|
+
{% if layout.refactor or page.layout == 'page' %}
|
15
|
+
{% include refactor-content.html content=content %}
|
16
|
+
{% else %}
|
17
|
+
{{ content }}
|
18
|
+
{% endif %}
|
19
|
+
{% endcapture %}
|
20
|
+
|
21
|
+
{% if page.layout == 'page' or page.collection == 'tabs' %}
|
22
|
+
{% assign tab_key = page.title | downcase %}
|
23
|
+
{% assign title = site.data.locales[site.lang].tabs[tab_key] | default: page.title %}
|
24
|
+
<h1 class="dynamic-title">
|
25
|
+
{{ title }}
|
26
|
+
</h1>
|
27
|
+
<div class="post-content">
|
28
|
+
{{ _content }}
|
29
|
+
</div>
|
30
|
+
{% else %}
|
31
|
+
{{ _content }}
|
32
|
+
{% endif %}
|
33
|
+
|
34
|
+
</div>
|
35
|
+
</div> <!-- #core-wrapper -->
|
36
|
+
|
37
|
+
<!-- panel -->
|
38
|
+
<div id="panel-wrapper" class="col-xl-3 pl-2 text-muted">
|
39
|
+
|
40
|
+
<div class="access">
|
41
|
+
{% include update-list.html %}
|
42
|
+
{% include trending-tags.html %}
|
43
|
+
</div>
|
44
|
+
|
45
|
+
{% for _include in layout.panel_includes %}
|
46
|
+
{% assign _include_path = _include | append: '.html' %}
|
47
|
+
{% include {{ _include_path }} %}
|
48
|
+
{% endfor %}
|
49
|
+
</div>
|
50
|
+
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<!-- tail -->
|
54
|
+
{% if layout.tail_includes %}
|
55
|
+
<div class="row">
|
56
|
+
<div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 pl-3 pr-3 pr-xl-4 mt-5">
|
57
|
+
{% for _include in layout.tail_includes %}
|
58
|
+
{% assign _include_path = _include | append: '.html' %}
|
59
|
+
{% include {{ _include_path }} %}
|
60
|
+
{% endfor %}
|
61
|
+
</div>
|
62
|
+
</div>
|
63
|
+
{% endif %}
|
data/_layouts/post.html
ADDED
@@ -0,0 +1,150 @@
|
|
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
|
+
<h1 data-toc-skip>{{ page.title }}</h1>
|
13
|
+
|
14
|
+
<div class="post-meta text-muted">
|
15
|
+
<!-- published date -->
|
16
|
+
<span>
|
17
|
+
{{ site.data.locales[site.lang].post.posted }}
|
18
|
+
{% include datetime.html date=page.date tooltip=true %}
|
19
|
+
</span>
|
20
|
+
|
21
|
+
<!-- lastmod date -->
|
22
|
+
{% if page.last_modified_at %}
|
23
|
+
<span>
|
24
|
+
{{ site.data.locales[site.lang].post.updated }}
|
25
|
+
{% include datetime.html date=page.last_modified_at tooltip=true %}
|
26
|
+
</span>
|
27
|
+
{% endif %}
|
28
|
+
|
29
|
+
{% if page.image.path %}
|
30
|
+
{% capture bg %}
|
31
|
+
{% unless page.image.no_bg %}{{ 'bg' }}{% endunless %}
|
32
|
+
{% endcapture %}
|
33
|
+
|
34
|
+
<div class="mt-3 mb-3">
|
35
|
+
<img src="{{ page.image.path }}" class="preview-img {{ bg | strip }}"
|
36
|
+
alt="{{ page.image.alt | default: "Preview Image" }}"
|
37
|
+
|
38
|
+
{% if page.image.width %}
|
39
|
+
width="{{ page.image.width }}"
|
40
|
+
{% elsif page.image.w %}
|
41
|
+
width="{{ page.image.w }}"
|
42
|
+
{% endif %}
|
43
|
+
|
44
|
+
{% if page.image.height %}
|
45
|
+
height="{{ page.image.height }}"
|
46
|
+
{% elsif page.image.h %}
|
47
|
+
height="{{ page.image.h }}"
|
48
|
+
{% endif %}>
|
49
|
+
|
50
|
+
{% if page.image.alt %}
|
51
|
+
<figcaption class="text-center pt-2 pb-2">{{ page.image.alt }}</figcaption>
|
52
|
+
{% endif %}
|
53
|
+
|
54
|
+
</div>
|
55
|
+
{% endif %}
|
56
|
+
|
57
|
+
<div class="d-flex justify-content-between">
|
58
|
+
<!-- author(s) -->
|
59
|
+
<span>
|
60
|
+
{% if page.author %}
|
61
|
+
{% assign authors = page.author %}
|
62
|
+
{% elsif page.authors %}
|
63
|
+
{% assign authors = page.authors %}
|
64
|
+
{% endif %}
|
65
|
+
|
66
|
+
{{ site.data.locales[site.lang].post.written_by }}
|
67
|
+
|
68
|
+
<em>
|
69
|
+
{% if authors %}
|
70
|
+
{% for author in authors %}
|
71
|
+
<a href="{{ site.data.authors[author].url }}">{{ site.data.authors[author].name }}</a>
|
72
|
+
{% unless forloop.last %}</em>, <em>{% endunless %}
|
73
|
+
{% endfor %}
|
74
|
+
{% else %}
|
75
|
+
<a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>
|
76
|
+
{% endif %}
|
77
|
+
</em>
|
78
|
+
</span>
|
79
|
+
|
80
|
+
<div>
|
81
|
+
<!-- page views -->
|
82
|
+
{% if site.google_analytics.pv.proxy_endpoint or site.google_analytics.pv.cache_path %}
|
83
|
+
<span>
|
84
|
+
<em id="pv" class="pageviews">
|
85
|
+
<i class="fas fa-spinner fa-spin fa-fw"></i>
|
86
|
+
</em>
|
87
|
+
{{ site.data.locales[site.lang].post.pageview_measure }}
|
88
|
+
</span>
|
89
|
+
{% endif %}
|
90
|
+
|
91
|
+
<!-- read time -->
|
92
|
+
{% include read-time.html content=content prompt=true %}
|
93
|
+
</div>
|
94
|
+
|
95
|
+
</div> <!-- .d-flex -->
|
96
|
+
|
97
|
+
</div> <!-- .post-meta -->
|
98
|
+
|
99
|
+
<div class="post-content">
|
100
|
+
{{ content }}
|
101
|
+
</div>
|
102
|
+
|
103
|
+
<div class="post-tail-wrapper text-muted">
|
104
|
+
|
105
|
+
<!-- categories -->
|
106
|
+
{% if page.categories.size > 0 %}
|
107
|
+
<div class="post-meta mb-3">
|
108
|
+
<i class="far fa-folder-open fa-fw mr-1"></i>
|
109
|
+
{% for category in page.categories %}
|
110
|
+
<a href='{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/'>{{ category }}</a>
|
111
|
+
{%- unless forloop.last -%}, {%- endunless -%}
|
112
|
+
{% endfor %}
|
113
|
+
</div>
|
114
|
+
{% endif %}
|
115
|
+
|
116
|
+
<!-- tags -->
|
117
|
+
{% if page.tags.size > 0 %}
|
118
|
+
<div class="post-tags">
|
119
|
+
<i class="fa fa-tags fa-fw mr-1"></i>
|
120
|
+
{% for tag in page.tags %}
|
121
|
+
<a href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/"
|
122
|
+
class="post-tag no-text-decoration" >
|
123
|
+
{{- tag -}}
|
124
|
+
</a>
|
125
|
+
{% endfor %}
|
126
|
+
</div>
|
127
|
+
{% endif %}
|
128
|
+
|
129
|
+
<div class="post-tail-bottom
|
130
|
+
d-flex justify-content-between align-items-center mt-3 pt-5 pb-2">
|
131
|
+
<div class="license-wrapper">
|
132
|
+
|
133
|
+
{% if site.data.locales[site.lang].copyright.license.template %}
|
134
|
+
|
135
|
+
{% capture _replacement %}
|
136
|
+
<a href="{{ site.data.locales[site.lang].copyright.license.link }}">
|
137
|
+
{{ site.data.locales[site.lang].copyright.license.name }}
|
138
|
+
</a>
|
139
|
+
{% endcapture %}
|
140
|
+
|
141
|
+
{{ site.data.locales[site.lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }}
|
142
|
+
|
143
|
+
{% endif %}
|
144
|
+
</div>
|
145
|
+
|
146
|
+
{% include post-sharing.html %}
|
147
|
+
|
148
|
+
</div><!-- .post-tail-bottom -->
|
149
|
+
|
150
|
+
</div><!-- div.post-tail-wrapper -->
|
data/_layouts/tag.html
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
# The layout for Tag page
|
4
|
+
---
|
5
|
+
|
6
|
+
<div id="page-tag">
|
7
|
+
<h1 class="pl-lg-2">
|
8
|
+
<i class="fa fa-tag fa-fw text-muted"></i>
|
9
|
+
{{ page.title }}
|
10
|
+
<span class="lead text-muted pl-2">{{ page.posts | size }}</span>
|
11
|
+
</h1>
|
12
|
+
<ul class="post-content pl-0">
|
13
|
+
{% for post in page.posts %}
|
14
|
+
<li class="d-flex justify-content-between pl-md-3 pr-md-3">
|
15
|
+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
16
|
+
<span class="dash flex-grow-1"></span>
|
17
|
+
{% include datetime.html date=post.date wrap='span' class='text-muted small' %}
|
18
|
+
</li>
|
19
|
+
{% endfor %}
|
20
|
+
</ul>
|
21
|
+
</div>
|
data/_layouts/tags.html
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
# All the Tags of posts.
|
4
|
+
---
|
5
|
+
|
6
|
+
<div id="tags" class="d-flex flex-wrap ml-xl-2 mr-xl-2">
|
7
|
+
|
8
|
+
{% assign tags = "" | split: "" %}
|
9
|
+
{% for t in site.tags %}
|
10
|
+
{% assign tags = tags | push: t[0] %}
|
11
|
+
{% endfor %}
|
12
|
+
|
13
|
+
{% assign sorted_tags = tags | sort_natural %}
|
14
|
+
|
15
|
+
{% for t in sorted_tags %}
|
16
|
+
<div>
|
17
|
+
<a class="tag" href="{{ t | slugify | url_encode | prepend: '/tags/' | append: '/' | relative_url }}">
|
18
|
+
{{ t }}<span class="text-muted">{{ site.tags[t].size }}</span>
|
19
|
+
</a>
|
20
|
+
</div>
|
21
|
+
{% endfor %}
|
22
|
+
|
23
|
+
</div>
|