jekyll-theme-chirpy 5.6.1 → 6.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_data/locales/ar.yml +5 -7
- data/_data/locales/bg-BG.yml +1 -3
- data/_data/locales/cs-CZ.yml +5 -7
- data/_data/locales/de-DE.yml +1 -3
- data/_data/locales/el-GR.yml +6 -8
- data/_data/locales/en.yml +5 -7
- data/_data/locales/es-ES.yml +2 -4
- data/_data/locales/fi-FI.yml +5 -7
- data/_data/locales/fr-FR.yml +0 -2
- data/_data/locales/hu-HU.yml +4 -6
- data/_data/locales/id-ID.yml +1 -3
- data/_data/locales/it-IT.yml +5 -8
- data/_data/locales/ko-KR.yml +3 -5
- data/_data/locales/my-MM.yml +1 -3
- data/_data/locales/pt-BR.yml +1 -3
- data/_data/locales/ru-RU.yml +1 -3
- data/_data/locales/sl-SI.yml +91 -0
- data/_data/locales/sv-SE.yml +91 -0
- data/_data/locales/tr-TR.yml +1 -3
- data/_data/locales/uk-UA.yml +1 -3
- data/_data/locales/vi-VN.yml +2 -3
- data/_data/locales/zh-CN.yml +3 -5
- data/_data/locales/zh-TW.yml +83 -0
- data/_data/{assets/cross_origin.yml → origin/cors.yml} +12 -12
- data/_includes/comments/giscus.html +39 -31
- data/_includes/datetime.html +10 -6
- data/_includes/footer.html +24 -26
- data/_includes/head.html +9 -9
- data/_includes/js-selector.html +44 -27
- data/_includes/jsdelivr-combine.html +0 -6
- data/_includes/lang.html +8 -0
- data/_includes/mermaid.html +28 -29
- data/_includes/metadata-hook.html +1 -0
- data/_includes/mode-toggle.html +44 -21
- data/_includes/{assets-origin.html → origin-type.html} +5 -4
- data/_includes/post-nav.html +27 -20
- data/_includes/post-paginator.html +13 -12
- data/_includes/post-sharing.html +21 -13
- data/_includes/read-time.html +17 -10
- data/_includes/refactor-content.html +31 -27
- data/_includes/related-posts.html +35 -34
- data/_includes/search-loader.html +23 -24
- data/_includes/search-results.html +3 -4
- data/_includes/sidebar.html +50 -52
- data/_includes/toc.html +2 -5
- data/_includes/topbar.html +47 -47
- data/_includes/trending-tags.html +13 -17
- data/_includes/update-list.html +13 -14
- data/_layouts/archives.html +5 -3
- data/_layouts/categories.html +97 -77
- data/_layouts/category.html +10 -8
- data/_layouts/default.html +34 -29
- data/_layouts/home.html +35 -18
- data/_layouts/page.html +38 -33
- data/_layouts/post.html +17 -15
- data/_layouts/tag.html +10 -8
- data/_layouts/tags.html +4 -5
- data/_sass/addon/commons.scss +260 -439
- data/_sass/addon/module.scss +18 -8
- data/_sass/addon/syntax.scss +42 -41
- data/_sass/addon/variables.scss +8 -11
- data/_sass/colors/dark-syntax.scss +1 -0
- data/_sass/colors/dark-typography.scss +16 -24
- data/_sass/colors/light-syntax.scss +3 -3
- data/_sass/colors/light-typography.scss +16 -15
- data/_sass/jekyll-theme-chirpy.scss +14 -19
- data/_sass/layout/categories.scss +20 -4
- data/_sass/layout/home.scss +111 -94
- data/_sass/layout/post.scss +35 -32
- data/assets/404.html +3 -1
- data/assets/css/style.scss +1 -7
- data/assets/feed.xml +1 -1
- data/assets/js/dist/categories.min.js +2 -2
- data/assets/js/dist/commons.min.js +2 -2
- data/assets/js/dist/home.min.js +6 -0
- data/assets/js/dist/misc.min.js +2 -2
- data/assets/js/dist/page.min.js +2 -2
- data/assets/js/dist/post.min.js +2 -2
- metadata +11 -5
- /data/_data/{assets/self_host.yml → origin/basic.yml} +0 -0
data/_includes/sidebar.html
CHANGED
@@ -1,13 +1,10 @@
|
|
1
|
-
<!--
|
2
|
-
The Side Bar
|
3
|
-
-->
|
1
|
+
<!-- The Side Bar -->
|
4
2
|
|
5
3
|
<div id="sidebar" class="d-flex flex-column align-items-end">
|
6
|
-
<div class="profile-wrapper
|
7
|
-
<
|
8
|
-
|
9
|
-
{%
|
10
|
-
{% capture avatar_url %}
|
4
|
+
<div class="profile-wrapper">
|
5
|
+
<a href="{{ '/' | relative_url }}" id="avatar" class="rounded-circle">
|
6
|
+
{% if site.avatar != empty and site.avatar %}
|
7
|
+
{% capture avatar_url %}
|
11
8
|
{% if site.avatar contains '://' %}
|
12
9
|
{{ site.avatar }}
|
13
10
|
{% elsif site.img_cdn != empty and site.img_cdn %}
|
@@ -16,43 +13,41 @@
|
|
16
13
|
{{ site.avatar | relative_url }}
|
17
14
|
{% endif %}
|
18
15
|
{% endcapture %}
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
</div>
|
16
|
+
<img src="{{ avatar_url | strip }}" width="112" height="112" alt="avatar" onerror="this.style.display='none'">
|
17
|
+
{% endif %}
|
18
|
+
</a>
|
23
19
|
|
24
20
|
<div class="site-title">
|
25
21
|
<a href="{{ '/' | relative_url }}">{{ site.title }}</a>
|
26
22
|
</div>
|
27
|
-
<div class="site-subtitle
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
<ul class="w-100">
|
23
|
+
<div class="site-subtitle fst-italic">{{ site.tagline }}</div>
|
24
|
+
</div>
|
25
|
+
<!-- .profile-wrapper -->
|
32
26
|
|
27
|
+
<ul class="nav flex-column flex-grow-1 w-100 ps-0">
|
33
28
|
<!-- home -->
|
34
29
|
<li class="nav-item{% if page.layout == 'home' %}{{ " active" }}{% endif %}">
|
35
30
|
<a href="{{ '/' | relative_url }}" class="nav-link">
|
36
|
-
<i class="fa-fw fas fa-home
|
37
|
-
<span>{{ site.data.locales[
|
31
|
+
<i class="fa-fw fas fa-home"></i>
|
32
|
+
<span>{{ site.data.locales[include.lang].tabs.home | upcase }}</span>
|
38
33
|
</a>
|
39
34
|
</li>
|
40
35
|
<!-- the real tabs -->
|
41
36
|
{% for tab in site.tabs %}
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
37
|
+
<li class="nav-item{% if tab.url == page.url %}{{ " active" }}{% endif %}">
|
38
|
+
<a href="{{ tab.url | relative_url }}" class="nav-link">
|
39
|
+
<i class="fa-fw {{ tab.icon }}"></i>
|
40
|
+
{% capture tab_name %}{{ tab.url | split: '/' }}{% endcapture %}
|
41
|
+
|
42
|
+
<span>{{ site.data.locales[include.lang].tabs.[tab_name] | default: tab.title | upcase }}</span>
|
43
|
+
</a>
|
44
|
+
</li>
|
45
|
+
<!-- .nav-item -->
|
50
46
|
{% endfor %}
|
47
|
+
</ul>
|
48
|
+
<!-- ul.nav.flex-column -->
|
51
49
|
|
52
|
-
|
53
|
-
|
54
|
-
<div class="sidebar-bottom mt-auto d-flex flex-wrap justify-content-center align-items-center">
|
55
|
-
|
50
|
+
<div class="sidebar-bottom d-flex flex-wrap align-items-center w-100">
|
56
51
|
{% unless site.theme_mode %}
|
57
52
|
<button class="mode-toggle btn" aria-label="Switch Mode">
|
58
53
|
<i class="fas fa-adjust"></i>
|
@@ -81,26 +76,29 @@
|
|
81
76
|
{% endcase %}
|
82
77
|
|
83
78
|
{% if url %}
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
{%
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
79
|
+
<a
|
80
|
+
href="{{ url }}"
|
81
|
+
aria-label="{{ entry.type }}"
|
82
|
+
{% assign link_types = '' %}
|
83
|
+
|
84
|
+
{% unless entry.noblank %}
|
85
|
+
target="_blank"
|
86
|
+
{% assign link_types = 'noopener noreferrer' %}
|
87
|
+
{% endunless %}
|
88
|
+
|
89
|
+
{% if entry.type == 'mastodon' %}
|
90
|
+
{% assign link_types = link_types | append: ' me' | strip %}
|
91
|
+
{% endif %}
|
92
|
+
|
93
|
+
{% unless link_types == empty %}
|
94
|
+
rel="{{ link_types }}"
|
95
|
+
{% endunless %}
|
96
|
+
>
|
97
|
+
<i class="{{ entry.icon }}"></i>
|
98
|
+
</a>
|
100
99
|
{% endif %}
|
101
|
-
|
102
100
|
{% endfor %}
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
101
|
+
</div>
|
102
|
+
<!-- .sidebar-bottom -->
|
103
|
+
</div>
|
104
|
+
<!-- #sidebar -->
|
data/_includes/toc.html
CHANGED
@@ -6,11 +6,8 @@
|
|
6
6
|
{% endif %}
|
7
7
|
|
8
8
|
{% if enable_toc %}
|
9
|
-
<div id="toc-wrapper" class="
|
10
|
-
<div class="panel-heading
|
9
|
+
<div id="toc-wrapper" class="ps-0 pe-4 mb-5">
|
10
|
+
<div class="panel-heading ps-3 pt-2 mb-2">{{- site.data.locales[include.lang].panel.toc -}}</div>
|
11
11
|
<nav id="toc"></nav>
|
12
12
|
</div>
|
13
|
-
|
14
|
-
<!-- toc.js will be loaded at medium priority -->
|
15
|
-
<script src="{{ site.data.assets[origin].toc.js | relative_url }}"></script>
|
16
13
|
{% endif %}
|
data/_includes/topbar.html
CHANGED
@@ -1,70 +1,70 @@
|
|
1
|
-
<!--
|
2
|
-
The Top Bar
|
3
|
-
-->
|
1
|
+
<!-- The Top Bar -->
|
4
2
|
|
5
3
|
<div id="topbar-wrapper">
|
6
|
-
<div
|
4
|
+
<div
|
5
|
+
id="topbar"
|
6
|
+
class="container d-flex align-items-center justify-content-between h-100"
|
7
|
+
>
|
7
8
|
<span id="breadcrumb">
|
9
|
+
{% assign paths = page.url | split: '/' %}
|
8
10
|
|
9
|
-
|
11
|
+
{% if paths.size == 0 or page.layout == 'home' %}
|
12
|
+
<!-- index page -->
|
13
|
+
<span>{{ site.data.locales[include.lang].tabs.home | capitalize }}</span>
|
10
14
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
{{ site.data.locales[
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
15
|
+
{% else %}
|
16
|
+
{% for item in paths %}
|
17
|
+
{% if forloop.first %}
|
18
|
+
<span>
|
19
|
+
<a href="{{ '/' | relative_url }}">
|
20
|
+
{{ site.data.locales[include.lang].tabs.home | capitalize }}
|
21
|
+
</a>
|
22
|
+
</span>
|
23
|
+
|
24
|
+
{% elsif forloop.last %}
|
25
|
+
{% if page.collection == 'tabs' %}
|
26
|
+
<span>{{ site.data.locales[include.lang].tabs[item] | default: page.title }}</span>
|
27
|
+
{% else %}
|
28
|
+
<span>{{ page.title }}</span>
|
29
|
+
{% endif %}
|
30
|
+
|
31
|
+
{% elsif page.layout == 'category' or page.layout == 'tag' %}
|
32
|
+
<span>
|
33
|
+
<a href="{{ item | relative_url }}">
|
34
|
+
{{ site.data.locales[include.lang].tabs[item] | default: page.title }}
|
35
|
+
</a>
|
36
|
+
</span>
|
32
37
|
{% endif %}
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
{{ site.data.locales[site.lang].tabs[item] | default: page.title }}
|
38
|
-
</a>
|
39
|
-
</span>
|
40
|
-
{% endif %}
|
41
|
-
|
42
|
-
{% endfor %}
|
43
|
-
|
44
|
-
{% endif %}
|
45
|
-
|
46
|
-
</span><!-- endof #breadcrumb -->
|
38
|
+
{% endfor %}
|
39
|
+
{% endif %}
|
40
|
+
</span>
|
41
|
+
<!-- endof #breadcrumb -->
|
47
42
|
|
48
43
|
<i id="sidebar-trigger" class="fas fa-bars fa-fw"></i>
|
49
44
|
|
50
45
|
<div id="topbar-title">
|
51
46
|
{% if page.layout == 'home' %}
|
52
|
-
{{- site.data.locales[
|
47
|
+
{{- site.data.locales[include.lang].title | default: site.title -}}
|
53
48
|
{% elsif page.collection == 'tabs' or page.layout == 'page' %}
|
54
49
|
{%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%}
|
55
|
-
{{- site.data.locales[
|
50
|
+
{{- site.data.locales[include.lang].tabs[tab_key] | default: page.title -}}
|
56
51
|
{% else %}
|
57
|
-
{{- site.data.locales[
|
52
|
+
{{- site.data.locales[include.lang].layout[page.layout] | default: page.layout | capitalize -}}
|
58
53
|
{% endif %}
|
59
54
|
</div>
|
60
55
|
|
61
56
|
<i id="search-trigger" class="fas fa-search fa-fw"></i>
|
62
57
|
<span id="search-wrapper" class="align-items-center">
|
63
58
|
<i class="fas fa-search fa-fw"></i>
|
64
|
-
<input
|
65
|
-
|
59
|
+
<input
|
60
|
+
class="form-control"
|
61
|
+
id="search-input"
|
62
|
+
type="search"
|
63
|
+
aria-label="search"
|
64
|
+
autocomplete="off"
|
65
|
+
placeholder="{{ site.data.locales[include.lang].search.hint | capitalize }}..."
|
66
|
+
>
|
66
67
|
</span>
|
67
|
-
<span id="search-cancel"
|
68
|
+
<span id="search-cancel">{{ site.data.locales[include.lang].search.cancel }}</span>
|
68
69
|
</div>
|
69
|
-
|
70
70
|
</div>
|
@@ -1,29 +1,27 @@
|
|
1
|
-
|
2
|
-
The trending tags list
|
3
|
-
{% endcomment %}
|
1
|
+
<!-- The trending tags list -->
|
4
2
|
|
5
3
|
{% assign MAX = 10 %}
|
6
4
|
|
7
|
-
{% assign size_list =
|
8
|
-
{% assign tag_list =
|
5
|
+
{% assign size_list = '' | split: '' %}
|
6
|
+
{% assign tag_list = '' | split: '' %}
|
9
7
|
|
10
8
|
{% for tag in site.tags %}
|
11
9
|
{% assign size = tag | last | size %}
|
12
10
|
{% assign size_list = size_list | push: size %}
|
13
11
|
|
14
|
-
{% assign tag_str = tag | first | append:
|
15
|
-
{% assign tag_list =
|
12
|
+
{% assign tag_str = tag | first | append: '::' | append: size %}
|
13
|
+
{% assign tag_list = tag_list | push: tag_str %}
|
16
14
|
{% endfor %}
|
17
15
|
|
18
16
|
{% assign size_list = size_list | sort | reverse %}
|
19
17
|
|
20
18
|
{% assign tag_list = tag_list | sort_natural %}
|
21
19
|
|
22
|
-
{% assign trending_tags =
|
20
|
+
{% assign trending_tags = '' | split: '' %}
|
23
21
|
|
24
22
|
{% for size in size_list limit: MAX %}
|
25
23
|
{% for tag_str in tag_list %}
|
26
|
-
{% assign tag = tag_str | split:
|
24
|
+
{% assign tag = tag_str | split: '::' %}
|
27
25
|
{% assign tag_name = tag | first %}
|
28
26
|
{% assign tag_size = tag | last | plus: 0 %}
|
29
27
|
{% if tag_size == size %}
|
@@ -37,14 +35,12 @@
|
|
37
35
|
|
38
36
|
{% if trending_tags.size > 0 %}
|
39
37
|
<div id="access-tags">
|
40
|
-
<div class="panel-heading">{{- site.data.locales[
|
41
|
-
<div class="d-flex flex-wrap mt-3 mb-1
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
{% endfor %}
|
47
|
-
|
38
|
+
<div class="panel-heading">{{- site.data.locales[include.lang].panel.trending_tags -}}</div>
|
39
|
+
<div class="d-flex flex-wrap mt-3 mb-1 me-3">
|
40
|
+
{% for tag_name in trending_tags %}
|
41
|
+
{% assign url = tag_name | slugify | url_encode | prepend: '/tags/' | append: '/' %}
|
42
|
+
<a class="post-tag btn btn-outline-primary" href="{{ url | relative_url }}">{{ tag_name }}</a>
|
43
|
+
{% endfor %}
|
48
44
|
</div>
|
49
45
|
</div>
|
50
46
|
{% endif %}
|
data/_includes/update-list.html
CHANGED
@@ -1,13 +1,11 @@
|
|
1
|
-
|
2
|
-
Get the last 5 posts from lastmod list.
|
3
|
-
{% endcomment %}
|
1
|
+
<!-- Get the last 5 posts from lastmod list. -->
|
4
2
|
|
5
3
|
{% assign MAX_SIZE = 5 %}
|
6
4
|
|
7
|
-
{% assign all_list =
|
5
|
+
{% assign all_list = '' | split: '' %}
|
8
6
|
|
9
7
|
{% for post in site.posts %}
|
10
|
-
{% if post.last_modified_at %}
|
8
|
+
{% if post.last_modified_at and post.last_modified_at != post.date %}
|
11
9
|
{% capture elem %}
|
12
10
|
{{- post.last_modified_at | date: "%Y%m%d%H%M%S" -}}::{{- forloop.index0 -}}
|
13
11
|
{% endcapture %}
|
@@ -17,24 +15,25 @@
|
|
17
15
|
|
18
16
|
{% assign all_list = all_list | sort | reverse %}
|
19
17
|
|
20
|
-
{% assign update_list =
|
18
|
+
{% assign update_list = '' | split: '' %}
|
21
19
|
|
22
|
-
{% for entry in all_list limit:MAX_SIZE %}
|
20
|
+
{% for entry in all_list limit: MAX_SIZE %}
|
23
21
|
{% assign update_list = update_list | push: entry %}
|
24
22
|
{% endfor %}
|
25
23
|
|
26
24
|
{% if update_list.size > 0 %}
|
27
|
-
|
28
25
|
<div id="access-lastmod" class="post">
|
29
|
-
<div class="panel-heading">{{- site.data.locales[
|
30
|
-
<ul class="post-content
|
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">
|
31
28
|
{% for item in update_list %}
|
32
|
-
{% assign index = item | split:
|
29
|
+
{% assign index = item | split: '::' | last | plus: 0 %}
|
33
30
|
{% assign post = site.posts[index] %}
|
34
31
|
{% assign url = post.url | relative_url %}
|
35
|
-
|
32
|
+
<li class="text-truncate lh-lg">
|
33
|
+
<a href="{{ url }}">{{ post.title }}</a>
|
34
|
+
</li>
|
36
35
|
{% endfor %}
|
37
36
|
</ul>
|
38
|
-
</div>
|
39
|
-
|
37
|
+
</div>
|
38
|
+
<!-- #access-lastmod -->
|
40
39
|
{% endif %}
|
data/_layouts/archives.html
CHANGED
@@ -3,8 +3,10 @@ layout: page
|
|
3
3
|
# The Archives of posts.
|
4
4
|
---
|
5
5
|
|
6
|
-
{%
|
7
|
-
|
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' %}
|
8
10
|
|
9
11
|
<div id="archives" class="pl-xl-3">
|
10
12
|
|
@@ -21,7 +23,7 @@ layout: page
|
|
21
23
|
<li>
|
22
24
|
{% assign ts = post.date | date: '%s' %}
|
23
25
|
<span class="date day" data-ts="{{ ts }}" data-df="DD">{{ post.date | date: "%d" }}</span>
|
24
|
-
<span class="date month small text-muted
|
26
|
+
<span class="date month small text-muted ms-1" data-ts="{{ ts }}" data-df="{{ df_dayjs_m }}">
|
25
27
|
{{ post.date | date: df_strftime_m }}
|
26
28
|
</span>
|
27
29
|
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
data/_layouts/categories.html
CHANGED
@@ -3,8 +3,10 @@ layout: page
|
|
3
3
|
# All the Categories of posts
|
4
4
|
---
|
5
5
|
|
6
|
-
{%
|
7
|
-
|
6
|
+
{% include lang.html %}
|
7
|
+
|
8
|
+
{% assign HEAD_PREFIX = 'h_' %}
|
9
|
+
{% assign LIST_PREFIX = 'l_' %}
|
8
10
|
|
9
11
|
{% assign group_index = 0 %}
|
10
12
|
|
@@ -16,7 +18,7 @@ layout: page
|
|
16
18
|
{% assign first_post = posts_of_category | first %}
|
17
19
|
|
18
20
|
{% if category_name == first_post.categories[0] %}
|
19
|
-
{% assign sub_categories =
|
21
|
+
{% assign sub_categories = '' | split: '' %}
|
20
22
|
|
21
23
|
{% for post in posts_of_category %}
|
22
24
|
{% assign second_category = post.categories[1] %}
|
@@ -30,89 +32,107 @@ layout: page
|
|
30
32
|
{% assign sub_categories = sub_categories | sort %}
|
31
33
|
{% assign sub_categories_size = sub_categories | size %}
|
32
34
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
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 %}
|
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>
|
81
43
|
|
82
|
-
|
44
|
+
{% capture _category_url %}/categories/{{ category_name | slugify | url_encode }}/{% endcapture %}
|
45
|
+
<a href="{{ _category_url | relative_url }}" class="mx-2">{{ category_name }}</a>
|
83
46
|
|
84
|
-
|
85
|
-
|
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 %}
|
47
|
+
<!-- content count -->
|
48
|
+
{% assign top_posts_size = site.categories[category_name] | size %}
|
96
49
|
<span class="text-muted small font-weight-light">
|
97
|
-
{
|
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 %}
|
98
65
|
|
99
|
-
{
|
100
|
-
|
101
|
-
|
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
|
+
}}
|
102
73
|
{% else %}
|
103
|
-
{{
|
104
|
-
|
74
|
+
{{
|
75
|
+
site.data.locales[lang].categories.post_measure.singular
|
76
|
+
| default: site.data.locales[lang].categories.post_measure
|
77
|
+
}}
|
105
78
|
{% endif %}
|
106
79
|
</span>
|
107
|
-
</
|
108
|
-
{% endfor %}
|
109
|
-
</ul>
|
110
|
-
</div>
|
111
|
-
{% endif %}
|
80
|
+
</span>
|
112
81
|
|
113
|
-
|
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 -->
|
114
135
|
|
115
136
|
{% assign group_index = group_index | plus: 1 %}
|
116
|
-
|
117
137
|
{% endif %}
|
118
138
|
{% endfor %}
|
data/_layouts/category.html
CHANGED
@@ -3,20 +3,22 @@ layout: page
|
|
3
3
|
# The Category layout
|
4
4
|
---
|
5
5
|
|
6
|
+
{% include lang.html %}
|
7
|
+
|
6
8
|
<div id="page-category">
|
7
|
-
<h1 class="
|
9
|
+
<h1 class="ps-lg-2">
|
8
10
|
<i class="far fa-folder-open fa-fw text-muted"></i>
|
9
11
|
{{ page.title }}
|
10
|
-
<span class="lead text-muted
|
12
|
+
<span class="lead text-muted ps-2">{{ page.posts | size }}</span>
|
11
13
|
</h1>
|
12
14
|
|
13
|
-
<ul class="post-content
|
15
|
+
<ul class="post-content ps-0">
|
14
16
|
{% for post in page.posts %}
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
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>
|
20
22
|
{% endfor %}
|
21
23
|
</ul>
|
22
24
|
</div>
|