jekyll-theme-abd3lraouf 5.2.6 → 5.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +21 -21
- data/README.md +105 -105
- data/_data/assets/cross_origin.yml +62 -62
- data/_data/assets/self_host.yml +51 -51
- data/_data/authors.yml +17 -17
- data/_data/contact.yml +30 -30
- data/_data/locales/bg-BG.yml +83 -83
- data/_data/locales/en.yml +83 -83
- data/_data/locales/es-ES.yml +79 -79
- data/_data/locales/fr-FR.yml +79 -79
- data/_data/locales/hu-HU.yml +81 -81
- data/_data/locales/id-ID.yml +79 -79
- data/_data/locales/ko-KR.yml +79 -79
- data/_data/locales/my-MM.yml +79 -79
- data/_data/locales/pt-BR.yml +79 -79
- data/_data/locales/ru-RU.yml +79 -79
- data/_data/locales/tr-TR.yml +79 -79
- data/_data/locales/uk-UA.yml +79 -79
- data/_data/locales/vi-VN.yml +77 -77
- data/_data/locales/zh-CN.yml +78 -78
- data/_data/share.yml +27 -27
- data/_includes/assets-origin.html +12 -12
- data/_includes/comments/disqus.html +54 -54
- data/_includes/comments/giscus.html +56 -56
- data/_includes/comments/utterances.html +51 -51
- data/_includes/comments.html +5 -5
- data/_includes/datetime.html +21 -21
- data/_includes/favicons.html +17 -17
- data/_includes/footer.html +17 -36
- data/_includes/google-analytics.html +14 -14
- data/_includes/head.html +116 -116
- data/_includes/js-selector.html +104 -104
- data/_includes/jsdelivr-combine.html +32 -32
- data/_includes/lang.html +8 -8
- data/_includes/language-alias.html +70 -70
- data/_includes/mermaid.html +57 -57
- data/_includes/mode-toggle.html +129 -129
- data/_includes/no-linenos.html +10 -10
- data/_includes/post-nav.html +30 -30
- data/_includes/post-paginator.html +88 -88
- data/_includes/post-sharing.html +27 -27
- data/_includes/read-time.html +30 -30
- data/_includes/refactor-content.html +282 -282
- data/_includes/related-posts.html +103 -103
- data/_includes/search-loader.html +46 -46
- data/_includes/search-results.html +11 -11
- data/_includes/sidebar.html +93 -93
- data/_includes/toc.html +16 -16
- data/_includes/topbar.html +70 -70
- data/_includes/trending-tags.html +50 -50
- data/_includes/update-list.html +40 -40
- data/_layouts/archives.html +48 -48
- data/_layouts/categories.html +120 -120
- data/_layouts/category.html +24 -24
- data/_layouts/compress.html +10 -10
- data/_layouts/default.html +74 -74
- data/_layouts/home.html +103 -103
- data/_layouts/page.html +64 -64
- data/_layouts/post.html +159 -159
- data/_layouts/tag.html +23 -23
- data/_layouts/tags.html +23 -23
- data/_plugins/posts-lastmod-hook.rb +14 -14
- data/_sass/addon/commons.scss +1694 -1680
- data/_sass/addon/module.scss +151 -151
- data/_sass/addon/syntax.scss +289 -289
- data/_sass/addon/variables.scss +34 -34
- data/_sass/colors/dark-syntax.scss +88 -88
- data/_sass/colors/dark-typography.scss +157 -157
- data/_sass/colors/light-syntax.scss +84 -84
- data/_sass/colors/light-typography.scss +94 -94
- data/_sass/layout/archives.scss +147 -147
- data/_sass/layout/categories.scss +67 -67
- data/_sass/layout/category-tag.scss +73 -73
- data/_sass/layout/home.scss +184 -184
- data/_sass/layout/post.scss +369 -369
- data/_sass/layout/tags.scss +19 -19
- data/_sass/variables-hook.scss +3 -3
- data/_tabs/about.md +8 -8
- data/_tabs/archives.md +7 -7
- data/_tabs/categories.md +6 -6
- data/_tabs/tags.md +6 -6
- data/assets/404.html +69 -16
- data/assets/css/style.scss +12 -12
- data/assets/feed.xml +61 -61
- data/assets/img/404.png +0 -0
- data/assets/img/favicons/browserconfig.xml +13 -13
- data/assets/img/favicons/site.webmanifest +26 -26
- data/assets/js/data/search.json +18 -18
- data/assets/js/data/swcache.js +55 -55
- data/assets/js/pwa/app.js +47 -47
- data/assets/js/pwa/sw.js +89 -89
- data/assets/js/pwa/unregister.js +12 -12
- data/assets/robots.txt +10 -10
- data/index.html +4 -4
- metadata +8 -7
data/_includes/topbar.html
CHANGED
@@ -1,70 +1,70 @@
|
|
1
|
-
<!--
|
2
|
-
The Top Bar
|
3
|
-
-->
|
4
|
-
|
5
|
-
<div id="topbar-wrapper">
|
6
|
-
<div id="topbar" class="container d-flex align-items-center justify-content-between h-100 pl-3 pr-3 pl-md-4 pr-md-4">
|
7
|
-
<span id="breadcrumb">
|
8
|
-
|
9
|
-
{% assign paths = page.url | split: '/' %}
|
10
|
-
|
11
|
-
{% if paths.size == 0 or page.layout == 'home' %}
|
12
|
-
<!-- index page -->
|
13
|
-
<span>{{ site.data.locales[lang].tabs.home | capitalize }}</span>
|
14
|
-
|
15
|
-
{% else %}
|
16
|
-
|
17
|
-
{% for item in paths %}
|
18
|
-
|
19
|
-
{% if forloop.first %}
|
20
|
-
<span>
|
21
|
-
<a href="{{ '/' | relative_url }}">
|
22
|
-
{{ site.data.locales[lang].tabs.home | capitalize }}
|
23
|
-
</a>
|
24
|
-
</span>
|
25
|
-
|
26
|
-
{% elsif forloop.last %}
|
27
|
-
|
28
|
-
{% if page.collection == 'tabs' %}
|
29
|
-
<span>{{ site.data.locales[lang].tabs[item] | default: page.title }}</span>
|
30
|
-
{% else %}
|
31
|
-
<span>{{ page.title }}</span>
|
32
|
-
{% endif %}
|
33
|
-
|
34
|
-
{% elsif page.layout == 'category' or page.layout == 'tag' %}
|
35
|
-
<span>
|
36
|
-
<a href="{{ item | relative_url }}">
|
37
|
-
{{ site.data.locales[lang].tabs[item] | default: page.title }}
|
38
|
-
</a>
|
39
|
-
</span>
|
40
|
-
{% endif %}
|
41
|
-
|
42
|
-
{% endfor %}
|
43
|
-
|
44
|
-
{% endif %}
|
45
|
-
|
46
|
-
</span><!-- endof #breadcrumb -->
|
47
|
-
|
48
|
-
<i id="sidebar-trigger" class="fas fa-bars fa-fw"></i>
|
49
|
-
|
50
|
-
<div id="topbar-title">
|
51
|
-
{% if page.layout == 'home' %}
|
52
|
-
{{- site.data.locales[lang].title | default: site.title -}}
|
53
|
-
{% elsif page.collection == 'tabs' or page.layout == 'page' %}
|
54
|
-
{%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%}
|
55
|
-
{{- site.data.locales[lang].tabs[tab_key] | default: page.title -}}
|
56
|
-
{% else %}
|
57
|
-
{{- site.data.locales[lang].layout[page.layout] | default: page.layout | capitalize -}}
|
58
|
-
{% endif %}
|
59
|
-
</div>
|
60
|
-
|
61
|
-
<i id="search-trigger" class="fas fa-search fa-fw"></i>
|
62
|
-
<span id="search-wrapper" class="align-items-center">
|
63
|
-
<i class="fas fa-search fa-fw"></i>
|
64
|
-
<input class="form-control" id="search-input" type="search"
|
65
|
-
aria-label="search" autocomplete="off" placeholder="{{ site.data.locales[lang].search.hint | capitalize }}...">
|
66
|
-
</span>
|
67
|
-
<span id="search-cancel" >{{ site.data.locales[lang].search.cancel }}</span>
|
68
|
-
</div>
|
69
|
-
|
70
|
-
</div>
|
1
|
+
<!--
|
2
|
+
The Top Bar
|
3
|
+
-->
|
4
|
+
|
5
|
+
<div id="topbar-wrapper">
|
6
|
+
<div id="topbar" class="container d-flex align-items-center justify-content-between h-100 pl-3 pr-3 pl-md-4 pr-md-4">
|
7
|
+
<span id="breadcrumb">
|
8
|
+
|
9
|
+
{% assign paths = page.url | split: '/' %}
|
10
|
+
|
11
|
+
{% if paths.size == 0 or page.layout == 'home' %}
|
12
|
+
<!-- index page -->
|
13
|
+
<span>{{ site.data.locales[lang].tabs.home | capitalize }}</span>
|
14
|
+
|
15
|
+
{% else %}
|
16
|
+
|
17
|
+
{% for item in paths %}
|
18
|
+
|
19
|
+
{% if forloop.first %}
|
20
|
+
<span>
|
21
|
+
<a href="{{ '/' | relative_url }}">
|
22
|
+
{{ site.data.locales[lang].tabs.home | capitalize }}
|
23
|
+
</a>
|
24
|
+
</span>
|
25
|
+
|
26
|
+
{% elsif forloop.last %}
|
27
|
+
|
28
|
+
{% if page.collection == 'tabs' %}
|
29
|
+
<span>{{ site.data.locales[lang].tabs[item] | default: page.title }}</span>
|
30
|
+
{% else %}
|
31
|
+
<span>{{ page.title }}</span>
|
32
|
+
{% endif %}
|
33
|
+
|
34
|
+
{% elsif page.layout == 'category' or page.layout == 'tag' %}
|
35
|
+
<span>
|
36
|
+
<a href="{{ item | relative_url }}">
|
37
|
+
{{ site.data.locales[lang].tabs[item] | default: page.title }}
|
38
|
+
</a>
|
39
|
+
</span>
|
40
|
+
{% endif %}
|
41
|
+
|
42
|
+
{% endfor %}
|
43
|
+
|
44
|
+
{% endif %}
|
45
|
+
|
46
|
+
</span><!-- endof #breadcrumb -->
|
47
|
+
|
48
|
+
<i id="sidebar-trigger" class="fas fa-bars fa-fw"></i>
|
49
|
+
|
50
|
+
<div id="topbar-title">
|
51
|
+
{% if page.layout == 'home' %}
|
52
|
+
{{- site.data.locales[lang].title | default: site.title -}}
|
53
|
+
{% elsif page.collection == 'tabs' or page.layout == 'page' %}
|
54
|
+
{%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%}
|
55
|
+
{{- site.data.locales[lang].tabs[tab_key] | default: page.title -}}
|
56
|
+
{% else %}
|
57
|
+
{{- site.data.locales[lang].layout[page.layout] | default: page.layout | capitalize -}}
|
58
|
+
{% endif %}
|
59
|
+
</div>
|
60
|
+
|
61
|
+
<i id="search-trigger" class="fas fa-search fa-fw"></i>
|
62
|
+
<span id="search-wrapper" class="align-items-center">
|
63
|
+
<i class="fas fa-search fa-fw"></i>
|
64
|
+
<input class="form-control" id="search-input" type="search"
|
65
|
+
aria-label="search" autocomplete="off" placeholder="{{ site.data.locales[lang].search.hint | capitalize }}...">
|
66
|
+
</span>
|
67
|
+
<span id="search-cancel" >{{ site.data.locales[lang].search.cancel }}</span>
|
68
|
+
</div>
|
69
|
+
|
70
|
+
</div>
|
@@ -1,50 +1,50 @@
|
|
1
|
-
{% comment %}
|
2
|
-
The trending tags list
|
3
|
-
{% endcomment %}
|
4
|
-
|
5
|
-
{% assign MAX = 10 %}
|
6
|
-
|
7
|
-
{% assign size_list = "" | split: "" %}
|
8
|
-
{% assign tag_list = "" | split: "" %}
|
9
|
-
|
10
|
-
{% for tag in site.tags %}
|
11
|
-
{% assign size = tag | last | size %}
|
12
|
-
{% assign size_list = size_list | push: size %}
|
13
|
-
|
14
|
-
{% assign tag_str = tag | first | append: "::" | append: size %}
|
15
|
-
{% assign tag_list = tag_list | push: tag_str %}
|
16
|
-
{% endfor %}
|
17
|
-
|
18
|
-
{% assign size_list = size_list | sort | reverse %}
|
19
|
-
|
20
|
-
{% assign tag_list = tag_list | sort_natural %}
|
21
|
-
|
22
|
-
{% assign trending_tags = "" | split: "" %}
|
23
|
-
|
24
|
-
{% for size in size_list limit: MAX %}
|
25
|
-
{% for tag_str in tag_list %}
|
26
|
-
{% assign tag = tag_str | split: "::" %}
|
27
|
-
{% assign tag_name = tag | first %}
|
28
|
-
{% assign tag_size = tag | last | plus: 0 %}
|
29
|
-
{% if tag_size == size %}
|
30
|
-
{% unless trending_tags contains tag_name %}
|
31
|
-
{% assign trending_tags = trending_tags | push: tag_name %}
|
32
|
-
{% break %}
|
33
|
-
{% endunless %}
|
34
|
-
{% endif %}
|
35
|
-
{% endfor %}
|
36
|
-
{% endfor %}
|
37
|
-
|
38
|
-
{% if trending_tags.size > 0 %}
|
39
|
-
<div id="access-tags">
|
40
|
-
<div class="panel-heading">{{- site.data.locales[lang].panel.trending_tags -}}</div>
|
41
|
-
<div class="d-flex flex-wrap mt-3 mb-1 mr-3">
|
42
|
-
|
43
|
-
{% for tag_name in trending_tags %}
|
44
|
-
{% assign url = tag_name | slugify | url_encode | prepend: "/tags/" | append: "/" %}
|
45
|
-
<a class="post-tag" href="{{ url | relative_url }}">{{ tag_name }}</a>
|
46
|
-
{% endfor %}
|
47
|
-
|
48
|
-
</div>
|
49
|
-
</div>
|
50
|
-
{% endif %}
|
1
|
+
{% comment %}
|
2
|
+
The trending tags list
|
3
|
+
{% endcomment %}
|
4
|
+
|
5
|
+
{% assign MAX = 10 %}
|
6
|
+
|
7
|
+
{% assign size_list = "" | split: "" %}
|
8
|
+
{% assign tag_list = "" | split: "" %}
|
9
|
+
|
10
|
+
{% for tag in site.tags %}
|
11
|
+
{% assign size = tag | last | size %}
|
12
|
+
{% assign size_list = size_list | push: size %}
|
13
|
+
|
14
|
+
{% assign tag_str = tag | first | append: "::" | append: size %}
|
15
|
+
{% assign tag_list = tag_list | push: tag_str %}
|
16
|
+
{% endfor %}
|
17
|
+
|
18
|
+
{% assign size_list = size_list | sort | reverse %}
|
19
|
+
|
20
|
+
{% assign tag_list = tag_list | sort_natural %}
|
21
|
+
|
22
|
+
{% assign trending_tags = "" | split: "" %}
|
23
|
+
|
24
|
+
{% for size in size_list limit: MAX %}
|
25
|
+
{% for tag_str in tag_list %}
|
26
|
+
{% assign tag = tag_str | split: "::" %}
|
27
|
+
{% assign tag_name = tag | first %}
|
28
|
+
{% assign tag_size = tag | last | plus: 0 %}
|
29
|
+
{% if tag_size == size %}
|
30
|
+
{% unless trending_tags contains tag_name %}
|
31
|
+
{% assign trending_tags = trending_tags | push: tag_name %}
|
32
|
+
{% break %}
|
33
|
+
{% endunless %}
|
34
|
+
{% endif %}
|
35
|
+
{% endfor %}
|
36
|
+
{% endfor %}
|
37
|
+
|
38
|
+
{% if trending_tags.size > 0 %}
|
39
|
+
<div id="access-tags">
|
40
|
+
<div class="panel-heading">{{- site.data.locales[lang].panel.trending_tags -}}</div>
|
41
|
+
<div class="d-flex flex-wrap mt-3 mb-1 mr-3">
|
42
|
+
|
43
|
+
{% for tag_name in trending_tags %}
|
44
|
+
{% assign url = tag_name | slugify | url_encode | prepend: "/tags/" | append: "/" %}
|
45
|
+
<a class="post-tag" href="{{ url | relative_url }}">{{ tag_name }}</a>
|
46
|
+
{% endfor %}
|
47
|
+
|
48
|
+
</div>
|
49
|
+
</div>
|
50
|
+
{% endif %}
|
data/_includes/update-list.html
CHANGED
@@ -1,40 +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 %}
|
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 %}
|
data/_layouts/archives.html
CHANGED
@@ -1,48 +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>
|
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>
|
data/_layouts/categories.html
CHANGED
@@ -1,120 +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 %}
|
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 %}
|