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.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/_data/locales/ar.yml +5 -7
  3. data/_data/locales/bg-BG.yml +1 -3
  4. data/_data/locales/cs-CZ.yml +5 -7
  5. data/_data/locales/de-DE.yml +1 -3
  6. data/_data/locales/el-GR.yml +6 -8
  7. data/_data/locales/en.yml +5 -7
  8. data/_data/locales/es-ES.yml +2 -4
  9. data/_data/locales/fi-FI.yml +5 -7
  10. data/_data/locales/fr-FR.yml +0 -2
  11. data/_data/locales/hu-HU.yml +4 -6
  12. data/_data/locales/id-ID.yml +1 -3
  13. data/_data/locales/it-IT.yml +5 -8
  14. data/_data/locales/ko-KR.yml +3 -5
  15. data/_data/locales/my-MM.yml +1 -3
  16. data/_data/locales/pt-BR.yml +1 -3
  17. data/_data/locales/ru-RU.yml +1 -3
  18. data/_data/locales/sl-SI.yml +91 -0
  19. data/_data/locales/sv-SE.yml +91 -0
  20. data/_data/locales/tr-TR.yml +1 -3
  21. data/_data/locales/uk-UA.yml +1 -3
  22. data/_data/locales/vi-VN.yml +2 -3
  23. data/_data/locales/zh-CN.yml +3 -5
  24. data/_data/locales/zh-TW.yml +83 -0
  25. data/_data/{assets/cross_origin.yml → origin/cors.yml} +12 -12
  26. data/_includes/comments/giscus.html +39 -31
  27. data/_includes/datetime.html +10 -6
  28. data/_includes/footer.html +24 -26
  29. data/_includes/head.html +9 -9
  30. data/_includes/js-selector.html +44 -27
  31. data/_includes/jsdelivr-combine.html +0 -6
  32. data/_includes/lang.html +8 -0
  33. data/_includes/mermaid.html +28 -29
  34. data/_includes/metadata-hook.html +1 -0
  35. data/_includes/mode-toggle.html +44 -21
  36. data/_includes/{assets-origin.html → origin-type.html} +5 -4
  37. data/_includes/post-nav.html +27 -20
  38. data/_includes/post-paginator.html +13 -12
  39. data/_includes/post-sharing.html +21 -13
  40. data/_includes/read-time.html +17 -10
  41. data/_includes/refactor-content.html +31 -27
  42. data/_includes/related-posts.html +35 -34
  43. data/_includes/search-loader.html +23 -24
  44. data/_includes/search-results.html +3 -4
  45. data/_includes/sidebar.html +50 -52
  46. data/_includes/toc.html +2 -5
  47. data/_includes/topbar.html +47 -47
  48. data/_includes/trending-tags.html +13 -17
  49. data/_includes/update-list.html +13 -14
  50. data/_layouts/archives.html +5 -3
  51. data/_layouts/categories.html +97 -77
  52. data/_layouts/category.html +10 -8
  53. data/_layouts/default.html +34 -29
  54. data/_layouts/home.html +35 -18
  55. data/_layouts/page.html +38 -33
  56. data/_layouts/post.html +17 -15
  57. data/_layouts/tag.html +10 -8
  58. data/_layouts/tags.html +4 -5
  59. data/_sass/addon/commons.scss +260 -439
  60. data/_sass/addon/module.scss +18 -8
  61. data/_sass/addon/syntax.scss +42 -41
  62. data/_sass/addon/variables.scss +8 -11
  63. data/_sass/colors/dark-syntax.scss +1 -0
  64. data/_sass/colors/dark-typography.scss +16 -24
  65. data/_sass/colors/light-syntax.scss +3 -3
  66. data/_sass/colors/light-typography.scss +16 -15
  67. data/_sass/jekyll-theme-chirpy.scss +14 -19
  68. data/_sass/layout/categories.scss +20 -4
  69. data/_sass/layout/home.scss +111 -94
  70. data/_sass/layout/post.scss +35 -32
  71. data/assets/404.html +3 -1
  72. data/assets/css/style.scss +1 -7
  73. data/assets/feed.xml +1 -1
  74. data/assets/js/dist/categories.min.js +2 -2
  75. data/assets/js/dist/commons.min.js +2 -2
  76. data/assets/js/dist/home.min.js +6 -0
  77. data/assets/js/dist/misc.min.js +2 -2
  78. data/assets/js/dist/page.min.js +2 -2
  79. data/assets/js/dist/post.min.js +2 -2
  80. metadata +11 -5
  81. /data/_data/{assets/self_host.yml → origin/basic.yml} +0 -0
@@ -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 text-center">
7
- <div id="avatar">
8
- <a href="{{ '/' | relative_url }}" class="mx-auto">
9
- {% if site.avatar != empty and site.avatar %}
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
- <img src="{{ avatar_url | strip }}" alt="avatar" onerror="this.style.display='none'">
20
- {% endif %}
21
- </a>
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 font-italic">{{ site.tagline }}</div>
28
-
29
- </div><!-- .profile-wrapper -->
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 ml-xl-3 mr-xl-3 unloaded"></i>
37
- <span>{{ site.data.locales[site.lang].tabs.home | upcase }}</span>
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
- <li class="nav-item{% if tab.url == page.url %}{{ " active" }}{% endif %}">
43
- <a href="{{ tab.url | relative_url }}" class="nav-link">
44
- <i class="fa-fw {{ tab.icon }} ml-xl-3 mr-xl-3 unloaded"></i>
45
- {% capture tab_name %}{{ tab.url | split: '/' }}{% endcapture %}
46
-
47
- <span>{{ site.data.locales[site.lang].tabs.[tab_name] | default: tab.title | upcase }}</span>
48
- </a>
49
- </li> <!-- .nav-item -->
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
- </ul> <!-- ul.nav.flex-column -->
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
- <a href="{{ url }}" aria-label="{{ entry.type }}"
85
- {% assign link_types = '' %}
86
-
87
- {% unless entry.noblank %}
88
- target="_blank"
89
- {% assign link_types = 'noopener noreferrer' %}
90
- {% endunless %}
91
-
92
- {% if entry.type == 'mastodon' %}
93
- {% assign link_types = link_types | append: ' me' | strip %}
94
- {% endif %}
95
-
96
- {% unless link_types == empty %}rel="{{ link_types }}"{% endunless %}>
97
-
98
- <i class="{{ entry.icon }}"></i>
99
- </a>
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
- </div> <!-- .sidebar-bottom -->
105
-
106
- </div><!-- #sidebar -->
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="pl-0 pr-4 mb-5">
10
- <div class="panel-heading pl-3 pt-2 mb-2">{{- site.data.locales[site.lang].panel.toc -}}</div>
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 %}
@@ -1,70 +1,70 @@
1
- <!--
2
- The Top Bar
3
- -->
1
+ <!-- The Top Bar -->
4
2
 
5
3
  <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">
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
- {% assign paths = page.url | split: '/' %}
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
- {% if paths.size == 0 or page.layout == 'home' %}
12
- <!-- index page -->
13
- <span>{{ site.data.locales[site.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[site.lang].tabs.home | capitalize }}
23
- </a>
24
- </span>
25
-
26
- {% elsif forloop.last %}
27
-
28
- {% if page.collection == 'tabs' %}
29
- <span>{{ site.data.locales[site.lang].tabs[item] | default: page.title }}</span>
30
- {% else %}
31
- <span>{{ page.title }}</span>
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
- {% elsif page.layout == 'category' or page.layout == 'tag' %}
35
- <span>
36
- <a href="{{ item | relative_url }}">
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[site.lang].title | default: site.title -}}
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[site.lang].tabs[tab_key] | default: page.title -}}
50
+ {{- site.data.locales[include.lang].tabs[tab_key] | default: page.title -}}
56
51
  {% else %}
57
- {{- site.data.locales[site.lang].layout[page.layout] | default: page.layout | capitalize -}}
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 class="form-control" id="search-input" type="search"
65
- aria-label="search" autocomplete="off" placeholder="{{ site.data.locales[site.lang].search.hint | capitalize }}...">
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" >{{ site.data.locales[site.lang].search.cancel }}</span>
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
- {% comment %}
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 = "" | split: "" %}
8
- {% assign tag_list = "" | split: "" %}
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: "::" | append: size %}
15
- {% assign tag_list = tag_list | push: tag_str %}
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 = "" | split: "" %}
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[site.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
-
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 %}
@@ -1,13 +1,11 @@
1
- {% comment %}
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 = "" | split: "" %}
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 = "" | split: "" %}
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[site.lang].panel.lastmod -}}</div>
30
- <ul class="post-content pl-0 pb-1 ml-1 mt-2">
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: "::" | last | plus: 0 %}
29
+ {% assign index = item | split: '::' | last | plus: 0 %}
33
30
  {% assign post = site.posts[index] %}
34
31
  {% assign url = post.url | relative_url %}
35
- <li><a href="{{ url }}">{{ post.title }}</a></li>
32
+ <li class="text-truncate lh-lg">
33
+ <a href="{{ url }}">{{ post.title }}</a>
34
+ </li>
36
35
  {% endfor %}
37
36
  </ul>
38
- </div> <!-- #access-lastmod -->
39
-
37
+ </div>
38
+ <!-- #access-lastmod -->
40
39
  {% endif %}
@@ -3,8 +3,10 @@ layout: page
3
3
  # The Archives of posts.
4
4
  ---
5
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' %}
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 ml-1" data-ts="{{ ts }}" data-df="{{ df_dayjs_m }}">
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>
@@ -3,8 +3,10 @@ layout: page
3
3
  # All the Categories of posts
4
4
  ---
5
5
 
6
- {% assign HEAD_PREFIX = "h_" %}
7
- {% assign LIST_PREFIX = "l_" %}
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 = "" | split: "" %}
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
- <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 %}
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
- </div> <!-- .card-header -->
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
- <!-- 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 %}
47
+ <!-- content count -->
48
+ {% assign top_posts_size = site.categories[category_name] | size %}
96
49
  <span class="text-muted small font-weight-light">
97
- {{ posts_size }}
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
- {% if posts_size > 1 %}
100
- {{ site.data.locales[site.lang].categories.post_measure.plural
101
- | default: site.data.locales[site.lang].categories.post_measure }}
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
- {{ site.data.locales[site.lang].categories.post_measure.singular
104
- | default: site.data.locales[site.lang].categories.post_measure }}
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
- </li>
108
- {% endfor %}
109
- </ul>
110
- </div>
111
- {% endif %}
80
+ </span>
112
81
 
113
- </div> <!-- .card -->
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 %}
@@ -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="pl-lg-2">
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 pl-2">{{ page.posts | size }}</span>
12
+ <span class="lead text-muted ps-2">{{ page.posts | size }}</span>
11
13
  </h1>
12
14
 
13
- <ul class="post-content pl-0">
15
+ <ul class="post-content ps-0">
14
16
  {% 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>
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>