jekyll-theme-abd3lraouf 5.2.3
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 +7 -0
- data/LICENSE +21 -0
- data/README.md +105 -0
- data/_config.yml +206 -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/en.yml +83 -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 +79 -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 +78 -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 +21 -0
- data/_includes/favicons.html +17 -0
- data/_includes/footer.html +36 -0
- data/_includes/google-analytics.html +14 -0
- data/_includes/head.html +116 -0
- data/_includes/js-selector.html +104 -0
- data/_includes/jsdelivr-combine.html +32 -0
- data/_includes/lang.html +8 -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 +48 -0
- data/_layouts/categories.html +120 -0
- data/_layouts/category.html +24 -0
- data/_layouts/compress.html +10 -0
- data/_layouts/default.html +74 -0
- data/_layouts/home.html +103 -0
- data/_layouts/page.html +64 -0
- data/_layouts/post.html +159 -0
- data/_layouts/tag.html +23 -0
- data/_layouts/tags.html +23 -0
- data/_plugins/posts-lastmod-hook.rb +14 -0
- data/_sass/addon/commons.scss +1680 -0
- data/_sass/addon/module.scss +151 -0
- data/_sass/addon/syntax.scss +289 -0
- data/_sass/addon/variables.scss +34 -0
- data/_sass/colors/dark-syntax.scss +88 -0
- data/_sass/colors/dark-typography.scss +157 -0
- data/_sass/colors/light-syntax.scss +84 -0
- data/_sass/colors/light-typography.scss +94 -0
- data/_sass/jekyll-theme-abd3lraouf.scss +24 -0
- data/_sass/layout/archives.scss +147 -0
- data/_sass/layout/categories.scss +67 -0
- data/_sass/layout/category-tag.scss +73 -0
- data/_sass/layout/home.scss +184 -0
- data/_sass/layout/post.scss +369 -0
- data/_sass/layout/tags.scss +19 -0
- data/_sass/variables-hook.scss +3 -0
- data/_tabs/about.md +8 -0
- data/_tabs/archives.md +7 -0
- data/_tabs/categories.md +6 -0
- data/_tabs/tags.md +6 -0
- data/assets/404.html +16 -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
- data/index.html +4 -0
- metadata +243 -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[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,48 @@
|
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
# The Archives of posts.
|
4
|
+
---
|
5
|
+
|
6
|
+
{% include lang.html %}
|
7
|
+
|
8
|
+
{% if site.prefer_datetime_locale == 'en' or lang == 'en' %}
|
9
|
+
{% assign df_strftime_m = '%b' %}
|
10
|
+
{% assign df_dayjs_m = 'MMM' %}
|
11
|
+
{% else %}
|
12
|
+
{% assign df_strftime_m = '/ %m' %}
|
13
|
+
{% assign df_dayjs_m = '/ MM' %}
|
14
|
+
{% endif %}
|
15
|
+
|
16
|
+
<div id="archives" class="pl-xl-2">
|
17
|
+
{% for post in site.posts %}
|
18
|
+
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
|
19
|
+
{% capture pre_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}
|
20
|
+
{% if forloop.first %}
|
21
|
+
{% assign last_day = "" %}
|
22
|
+
{% assign last_month = "" %}
|
23
|
+
<span class="lead">{{this_year}}</span>
|
24
|
+
<ul class="list-unstyled">
|
25
|
+
{% endif %}
|
26
|
+
<li>
|
27
|
+
<div>
|
28
|
+
{% assign ts = post.date | date: '%s' %}
|
29
|
+
<span class="date day" data-ts="{{ ts }}" data-df="DD">
|
30
|
+
{{ post.date | date: "%d" }}
|
31
|
+
</span>
|
32
|
+
<span class="date month small text-muted" data-ts="{{ ts }}" data-df="{{ df_dayjs_m }}">
|
33
|
+
{{ post.date | date: df_strftime_m }}
|
34
|
+
</span>
|
35
|
+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
36
|
+
</div>
|
37
|
+
</li>
|
38
|
+
{% if forloop.last %}
|
39
|
+
</ul>
|
40
|
+
{% elsif this_year != pre_year %}
|
41
|
+
</ul>
|
42
|
+
<span class="lead">{{pre_year}}</span>
|
43
|
+
<ul class="list-unstyled">
|
44
|
+
{% assign last_day = "" %}
|
45
|
+
{% assign last_month = "" %}
|
46
|
+
{% endif %}
|
47
|
+
{% endfor %}
|
48
|
+
</div>
|
@@ -0,0 +1,120 @@
|
|
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 id="{{ HEAD_PREFIX }}{{ group_index }}"
|
38
|
+
class="card-header d-flex justify-content-between hide-border-bottom">
|
39
|
+
<span>
|
40
|
+
<i class="far fa-folder{% if sub_categories_size > 0 %}-open{% endif %} fa-fw"></i>
|
41
|
+
|
42
|
+
{% capture _category_url %}/categories/{{ category_name | slugify | url_encode }}/{% endcapture %}
|
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
|
+
{% if sub_categories_size > 1 %}
|
51
|
+
{{ site.data.locales[lang].categories.category_measure.plural
|
52
|
+
| default: site.data.locales[lang].categories.category_measure }}
|
53
|
+
{% else %}
|
54
|
+
{{ site.data.locales[lang].categories.category_measure.singular
|
55
|
+
| default: site.data.locales[lang].categories.category_measure }}
|
56
|
+
{% endif %},
|
57
|
+
{% endif %}
|
58
|
+
|
59
|
+
{{ top_posts_size }}
|
60
|
+
|
61
|
+
{% if top_posts_size > 1 %}
|
62
|
+
{{ site.data.locales[lang].categories.post_measure.plural
|
63
|
+
| default: site.data.locales[lang].categories.post_measure }}
|
64
|
+
{% else %}
|
65
|
+
{{ site.data.locales[lang].categories.post_measure.singular
|
66
|
+
| default: site.data.locales[lang].categories.post_measure }}
|
67
|
+
{% endif %}
|
68
|
+
</span>
|
69
|
+
</span>
|
70
|
+
|
71
|
+
<!-- arrow -->
|
72
|
+
{% if sub_categories_size > 0%}
|
73
|
+
<a href="#{{ LIST_PREFIX }}{{ group_index }}" data-toggle="collapse"
|
74
|
+
aria-expanded="true" aria-label="{{ HEAD_PREFIX }}{{ group_index }}-trigger"
|
75
|
+
class="category-trigger hide-border-bottom">
|
76
|
+
<i class="fas fa-fw fa-angle-down"></i>
|
77
|
+
</a>
|
78
|
+
{% else %}
|
79
|
+
<span data-toggle="collapse" class="category-trigger hide-border-bottom disabled">
|
80
|
+
<i class="fas fa-fw fa-angle-right"></i>
|
81
|
+
</span>
|
82
|
+
{% endif %}
|
83
|
+
|
84
|
+
</div> <!-- .card-header -->
|
85
|
+
|
86
|
+
<!-- Sub-categories -->
|
87
|
+
{% if sub_categories_size > 0 %}
|
88
|
+
<div id="{{ LIST_PREFIX }}{{ group_index }}" class="collapse show" aria-expanded="true">
|
89
|
+
<ul class="list-group">
|
90
|
+
{% for sub_category in sub_categories %}
|
91
|
+
<li class="list-group-item">
|
92
|
+
<i class="far fa-folder fa-fw"></i>
|
93
|
+
|
94
|
+
{% capture _sub_ctg_url %}/categories/{{ sub_category | slugify | url_encode }}/{% endcapture %}
|
95
|
+
<a href="{{ _sub_ctg_url | relative_url }}" class="ml-1 mr-2">{{ sub_category }}</a>
|
96
|
+
|
97
|
+
{% assign posts_size = site.categories[sub_category] | size %}
|
98
|
+
<span class="text-muted small font-weight-light">
|
99
|
+
{{ posts_size }}
|
100
|
+
|
101
|
+
{% if posts_size > 1 %}
|
102
|
+
{{ site.data.locales[lang].categories.post_measure.plural
|
103
|
+
| default: site.data.locales[lang].categories.post_measure }}
|
104
|
+
{% else %}
|
105
|
+
{{ site.data.locales[lang].categories.post_measure.singular
|
106
|
+
| default: site.data.locales[lang].categories.post_measure }}
|
107
|
+
{% endif %}
|
108
|
+
</span>
|
109
|
+
</li>
|
110
|
+
{% endfor %}
|
111
|
+
</ul>
|
112
|
+
</div>
|
113
|
+
{% endif %}
|
114
|
+
|
115
|
+
</div> <!-- .card -->
|
116
|
+
|
117
|
+
{% assign group_index = group_index | plus: 1 %}
|
118
|
+
|
119
|
+
{% endif %}
|
120
|
+
{% 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="pl-lg-2">
|
10
|
+
<i class="far fa-folder-open fa-fw text-muted"></i>
|
11
|
+
{{ page.title }}
|
12
|
+
<span class="lead text-muted pl-2">{{ page.posts | size }}</span>
|
13
|
+
</h1>
|
14
|
+
|
15
|
+
<ul class="post-content pl-0">
|
16
|
+
{% for post in page.posts %}
|
17
|
+
<li class="d-flex justify-content-between pl-md-3 pr-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' %}
|
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,74 @@
|
|
1
|
+
---
|
2
|
+
layout: compress
|
3
|
+
# Default layout
|
4
|
+
---
|
5
|
+
|
6
|
+
<!DOCTYPE html>
|
7
|
+
|
8
|
+
{% include lang.html %}
|
9
|
+
|
10
|
+
{% include assets-origin.html %}
|
11
|
+
|
12
|
+
{% capture prefer_mode %}
|
13
|
+
{% if site.theme_mode %}
|
14
|
+
data-mode="{{ site.theme_mode }}"
|
15
|
+
{% endif %}
|
16
|
+
{% endcapture %}
|
17
|
+
|
18
|
+
<html lang="{{ site.lang }}"{{ prefer_mode }}>
|
19
|
+
|
20
|
+
{% include head.html %}
|
21
|
+
|
22
|
+
<body data-spy="scroll" data-target="#toc" data-topbar-visible="true">
|
23
|
+
|
24
|
+
{% include sidebar.html %}
|
25
|
+
|
26
|
+
{% include topbar.html %}
|
27
|
+
|
28
|
+
<div id="main-wrapper" class="d-flex justify-content-center">
|
29
|
+
<div id="main" class="container pl-xl-4 pr-xl-4">
|
30
|
+
|
31
|
+
{{ content }}
|
32
|
+
|
33
|
+
{% include footer.html %}
|
34
|
+
|
35
|
+
</div>
|
36
|
+
|
37
|
+
{% include search-results.html %}
|
38
|
+
|
39
|
+
</div> <!-- #main-wrapper -->
|
40
|
+
|
41
|
+
{% if page.mermaid %}
|
42
|
+
{% include mermaid.html %}
|
43
|
+
{% endif %}
|
44
|
+
|
45
|
+
<div id="mask"></div>
|
46
|
+
|
47
|
+
<a id="back-to-top" href="#" aria-label="back-to-top" class="btn btn-lg btn-box-shadow" role="button">
|
48
|
+
<i class="fas fa-angle-up"></i>
|
49
|
+
</a>
|
50
|
+
|
51
|
+
{% if site.pwa.enabled %}
|
52
|
+
<div id="notification" class="toast" role="alert" aria-live="assertive" aria-atomic="true"
|
53
|
+
data-animation="true" data-autohide="false">
|
54
|
+
<div class="toast-header">
|
55
|
+
<button type="button" class="ml-2 ml-auto close" data-dismiss="toast" aria-label="Close">
|
56
|
+
<span aria-hidden="true">×</span>
|
57
|
+
</button>
|
58
|
+
</div>
|
59
|
+
<div class="toast-body text-center pt-0">
|
60
|
+
<p class="pl-2 pr-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 search-loader.html %}
|
69
|
+
|
70
|
+
{% include js-selector.html %}
|
71
|
+
|
72
|
+
</body>
|
73
|
+
|
74
|
+
</html>
|
data/_layouts/home.html
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
# The Home page layout
|
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
|
+
|
45
|
+
{% for post in posts %}
|
46
|
+
|
47
|
+
<div class="post-preview">
|
48
|
+
<h1>
|
49
|
+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
50
|
+
</h1>
|
51
|
+
|
52
|
+
<div class="post-content">
|
53
|
+
<p>
|
54
|
+
{% include no-linenos.html content=post.content %}
|
55
|
+
<!-- extract excerpt-block from content -->
|
56
|
+
{% assign excerptParts = post.excerpt | split: "<!-- excerpt-start -->" %}
|
57
|
+
<!-- check if the excerpt tag exists -->
|
58
|
+
{% if excerptParts.size == 1 %}
|
59
|
+
{{ content | markdownify | strip_html | truncate: 200 | escape }}
|
60
|
+
{% else %}
|
61
|
+
{{ excerptParts[1] | markdownify | strip_html | truncate: 200 | escape }}
|
62
|
+
{% endif %}
|
63
|
+
</p>
|
64
|
+
</div>
|
65
|
+
|
66
|
+
<div class="post-meta text-muted d-flex">
|
67
|
+
<div class="mr-auto">
|
68
|
+
|
69
|
+
<!-- posted date -->
|
70
|
+
<i class="far fa-calendar fa-fw"></i>
|
71
|
+
{% include datetime.html date=post.date %}
|
72
|
+
|
73
|
+
<!-- categories -->
|
74
|
+
{% if post.categories.size > 0 %}
|
75
|
+
<i class="far fa-folder-open fa-fw"></i>
|
76
|
+
<span>
|
77
|
+
{% for category in post.categories %}
|
78
|
+
{{ category }}
|
79
|
+
{%- unless forloop.last -%},{%- endunless -%}
|
80
|
+
{% endfor %}
|
81
|
+
</span>
|
82
|
+
{% endif %}
|
83
|
+
|
84
|
+
</div>
|
85
|
+
|
86
|
+
{% if post.pin %}
|
87
|
+
<div class="pin">
|
88
|
+
<i class="fas fa-thumbtack fa-fw"></i>
|
89
|
+
<span>{{ site.data.locales[lang].post.pin_prompt }}</span>
|
90
|
+
</div>
|
91
|
+
{% endif %}
|
92
|
+
|
93
|
+
</div> <!-- .post-meta -->
|
94
|
+
|
95
|
+
</div> <!-- .post-review -->
|
96
|
+
|
97
|
+
{% endfor %}
|
98
|
+
|
99
|
+
</div> <!-- #post-list -->
|
100
|
+
|
101
|
+
{% if paginator.total_pages > 0 %}
|
102
|
+
{% include post-paginator.html %}
|
103
|
+
{% endif %}
|
data/_layouts/page.html
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
|
5
|
+
{% include lang.html %}
|
6
|
+
|
7
|
+
{% include assets-origin.html %}
|
8
|
+
|
9
|
+
<div class="row">
|
10
|
+
|
11
|
+
<!-- core -->
|
12
|
+
<div id="core-wrapper" class="col-12 col-lg-11 col-xl-9 pr-xl-4">
|
13
|
+
<div class="post pl-1 pr-1 pl-md-2 pr-md-2">
|
14
|
+
|
15
|
+
{% capture _content %}
|
16
|
+
{% if layout.refactor or page.layout == 'page' %}
|
17
|
+
{% include refactor-content.html content=content %}
|
18
|
+
{% else %}
|
19
|
+
{{ content }}
|
20
|
+
{% endif %}
|
21
|
+
{% endcapture %}
|
22
|
+
|
23
|
+
{% if page.layout == 'page' or page.collection == 'tabs'%}
|
24
|
+
{% assign title = site.data.locales[lang].tabs[tab_key] | default: page.title %}
|
25
|
+
<h1 class="dynamic-title">
|
26
|
+
{{ title }}
|
27
|
+
</h1>
|
28
|
+
<div class="post-content">
|
29
|
+
{{ _content }}
|
30
|
+
</div>
|
31
|
+
{% else %}
|
32
|
+
{{ _content }}
|
33
|
+
{% endif %}
|
34
|
+
|
35
|
+
</div>
|
36
|
+
</div> <!-- #core-wrapper -->
|
37
|
+
|
38
|
+
<!-- pannel -->
|
39
|
+
<div id="panel-wrapper" class="col-xl-3 pl-2 text-muted">
|
40
|
+
|
41
|
+
<div class="access">
|
42
|
+
{% include update-list.html %}
|
43
|
+
{% include trending-tags.html %}
|
44
|
+
</div>
|
45
|
+
|
46
|
+
{% for _include in layout.pannel_includes %}
|
47
|
+
{% assign _include_path = _include | append: '.html' %}
|
48
|
+
{% include {{ _include_path }} %}
|
49
|
+
{% endfor %}
|
50
|
+
</div>
|
51
|
+
|
52
|
+
</div>
|
53
|
+
|
54
|
+
<!-- tail -->
|
55
|
+
{% if layout.tail_includes %}
|
56
|
+
<div class="row">
|
57
|
+
<div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 pl-3 pr-3 pr-xl-4">
|
58
|
+
{% for _include in layout.tail_includes %}
|
59
|
+
{% assign _include_path = _include | append: '.html' %}
|
60
|
+
{% include {{ _include_path }} %}
|
61
|
+
{% endfor %}
|
62
|
+
</div>
|
63
|
+
</div>
|
64
|
+
{% endif %}
|
data/_layouts/post.html
ADDED
@@ -0,0 +1,159 @@
|
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
refactor: true
|
4
|
+
pannel_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 %}
|
21
|
+
</span>
|
22
|
+
|
23
|
+
<!-- lastmod date -->
|
24
|
+
{% if page.last_modified_at %}
|
25
|
+
<span>
|
26
|
+
{{ site.data.locales[lang].post.updated }}
|
27
|
+
{% include datetime.html date=page.last_modified_at tooltip=true %}
|
28
|
+
</span>
|
29
|
+
{% endif %}
|
30
|
+
|
31
|
+
{% if page.image.path %}
|
32
|
+
{% capture bg %}
|
33
|
+
{% unless page.image.no_bg %}{{ 'bg' }}{% endunless %}
|
34
|
+
{% endcapture %}
|
35
|
+
|
36
|
+
<div class="mt-3 mb-3">
|
37
|
+
<img src="{{ page.image.path }}" class="preview-img {{ bg | strip }}"
|
38
|
+
alt="{{ page.image.alt | default: "Preview Image" }}"
|
39
|
+
|
40
|
+
{% if page.image.width %}
|
41
|
+
width="{{ page.image.width }}"
|
42
|
+
{% elsif page.image.w %}
|
43
|
+
width="{{ page.image.w }}"
|
44
|
+
{% endif %}
|
45
|
+
|
46
|
+
{% if page.image.height %}
|
47
|
+
height="{{ page.image.height }}"
|
48
|
+
{% elsif page.image.h %}
|
49
|
+
height="{{ page.image.h }}"
|
50
|
+
{% endif %}>
|
51
|
+
|
52
|
+
{% if page.image.alt %}
|
53
|
+
<figcaption class="text-center pt-2 pb-2">{{ page.image.alt }}</figcaption>
|
54
|
+
{% endif %}
|
55
|
+
|
56
|
+
</div>
|
57
|
+
{% endif %}
|
58
|
+
|
59
|
+
<div class="d-flex justify-content-between">
|
60
|
+
<!-- author -->
|
61
|
+
<span>
|
62
|
+
{% capture author_name %}{{ site.data.authors[page.author].name | default: site.social.name }}{% endcapture %}
|
63
|
+
{% assign author_link = nil %}
|
64
|
+
|
65
|
+
{% if page.author %}
|
66
|
+
{% assign author_link = site.data.authors[page.author].url %}
|
67
|
+
{% elsif author_name == site.social.name %}
|
68
|
+
{% assign author_link = site.social.links[0] %}
|
69
|
+
{% endif %}
|
70
|
+
|
71
|
+
{{ site.data.locales[lang].post.written_by }}
|
72
|
+
|
73
|
+
<em>
|
74
|
+
{% if author_link %}
|
75
|
+
<a href="{{ author_link }}">{{ author_name }}</a>
|
76
|
+
{% else %}
|
77
|
+
{{ author_name }}
|
78
|
+
{% endif %}
|
79
|
+
</em>
|
80
|
+
</span>
|
81
|
+
|
82
|
+
<div>
|
83
|
+
<!-- page views -->
|
84
|
+
{% if site.google_analytics.pv.proxy_endpoint or site.google_analytics.pv.cache_path %}
|
85
|
+
<span>
|
86
|
+
<em id="pv" class="pageviews">
|
87
|
+
<i class="fas fa-spinner fa-spin fa-fw"></i>
|
88
|
+
</em>
|
89
|
+
{{ site.data.locales[lang].post.pageview_measure }}
|
90
|
+
</span>
|
91
|
+
{% endif %}
|
92
|
+
|
93
|
+
<!-- read time -->
|
94
|
+
{% include read-time.html content=content prompt=true %}
|
95
|
+
</div>
|
96
|
+
|
97
|
+
</div> <!-- .d-flex -->
|
98
|
+
|
99
|
+
</div> <!-- .post-meta -->
|
100
|
+
|
101
|
+
<div class="post-content">
|
102
|
+
<!-- extract excerpt-block from content -->
|
103
|
+
{% assign contentParts = content | split: "<!-- excerpt-end -->" %}
|
104
|
+
<!-- check if the excerpt tag exists -->
|
105
|
+
{% if contentParts.size == 1 %}
|
106
|
+
{{ content }}
|
107
|
+
{% else %}
|
108
|
+
{{ contentParts[1] }}
|
109
|
+
{% endif %}
|
110
|
+
</div>
|
111
|
+
|
112
|
+
<div class="post-tail-wrapper text-muted">
|
113
|
+
|
114
|
+
<!-- categories -->
|
115
|
+
{% if page.categories.size > 0 %}
|
116
|
+
<div class="post-meta mb-3">
|
117
|
+
<i class="far fa-folder-open fa-fw mr-1"></i>
|
118
|
+
{% for category in page.categories %}
|
119
|
+
<a href='{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/'>{{ category }}</a>
|
120
|
+
{%- unless forloop.last -%}, {%- endunless -%}
|
121
|
+
{% endfor %}
|
122
|
+
</div>
|
123
|
+
{% endif %}
|
124
|
+
|
125
|
+
<!-- tags -->
|
126
|
+
{% if page.tags.size > 0 %}
|
127
|
+
<div class="post-tags">
|
128
|
+
<i class="fa fa-tags fa-fw mr-1"></i>
|
129
|
+
{% for tag in page.tags %}
|
130
|
+
<a href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/"
|
131
|
+
class="post-tag no-text-decoration" >
|
132
|
+
{{- tag -}}
|
133
|
+
</a>
|
134
|
+
{% endfor %}
|
135
|
+
</div>
|
136
|
+
{% endif %}
|
137
|
+
|
138
|
+
<div class="post-tail-bottom
|
139
|
+
d-flex justify-content-between align-items-center mt-3 pt-5 pb-2">
|
140
|
+
<div class="license-wrapper">
|
141
|
+
|
142
|
+
{% if site.data.locales[lang].copyright.license.template %}
|
143
|
+
|
144
|
+
{% capture _replacement %}
|
145
|
+
<a href="{{ site.data.locales[lang].copyright.license.link }}">
|
146
|
+
{{ site.data.locales[lang].copyright.license.name }}
|
147
|
+
</a>
|
148
|
+
{% endcapture %}
|
149
|
+
|
150
|
+
{{ site.data.locales[lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }}
|
151
|
+
|
152
|
+
{% endif %}
|
153
|
+
</div>
|
154
|
+
|
155
|
+
{% include post-sharing.html %}
|
156
|
+
|
157
|
+
</div><!-- .post-tail-bottom -->
|
158
|
+
|
159
|
+
</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="pl-lg-2">
|
10
|
+
<i class="fa fa-tag fa-fw text-muted"></i>
|
11
|
+
{{ page.title }}
|
12
|
+
<span class="lead text-muted pl-2">{{ page.posts | size }}</span>
|
13
|
+
</h1>
|
14
|
+
<ul class="post-content pl-0">
|
15
|
+
{% for post in page.posts %}
|
16
|
+
<li class="d-flex justify-content-between pl-md-3 pr-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' %}
|
20
|
+
</li>
|
21
|
+
{% endfor %}
|
22
|
+
</ul>
|
23
|
+
</div>
|