jekyll-theme-chirpy 5.0.2 → 6.2.2

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.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +64 -74
  3. data/_data/locales/ar.yml +91 -0
  4. data/_data/locales/bg-BG.yml +81 -0
  5. data/_data/locales/cs-CZ.yml +89 -0
  6. data/_data/locales/de-DE.yml +80 -0
  7. data/_data/locales/el-GR.yml +91 -0
  8. data/_data/locales/en.yml +23 -23
  9. data/_data/locales/es-ES.yml +77 -0
  10. data/_data/locales/fi-FI.yml +90 -0
  11. data/_data/locales/fr-FR.yml +77 -0
  12. data/_data/locales/hu-HU.yml +79 -0
  13. data/_data/locales/id-ID.yml +5 -19
  14. data/_data/locales/it-IT.yml +90 -0
  15. data/_data/locales/ko-KR.yml +12 -19
  16. data/_data/locales/my-MM.yml +77 -0
  17. data/_data/locales/pt-BR.yml +77 -0
  18. data/_data/locales/ru-RU.yml +77 -0
  19. data/_data/locales/sl-SI.yml +91 -0
  20. data/_data/locales/sv-SE.yml +91 -0
  21. data/_data/locales/th.yml +91 -0
  22. data/_data/locales/tr-TR.yml +77 -0
  23. data/_data/locales/uk-UA.yml +77 -0
  24. data/_data/locales/vi-VN.yml +76 -0
  25. data/_data/locales/zh-CN.yml +13 -20
  26. data/_data/locales/zh-TW.yml +83 -0
  27. data/_data/origin/basic.yml +48 -0
  28. data/_data/origin/cors.yml +59 -0
  29. data/_includes/comments/disqus.html +27 -31
  30. data/_includes/comments/giscus.html +64 -0
  31. data/_includes/comments/utterances.html +2 -2
  32. data/_includes/datetime.html +20 -0
  33. data/_includes/embed/twitch.html +4 -0
  34. data/_includes/embed/youtube.html +6 -0
  35. data/_includes/footer.html +31 -32
  36. data/_includes/head.html +66 -46
  37. data/_includes/js-selector.html +83 -45
  38. data/_includes/jsdelivr-combine.html +26 -0
  39. data/_includes/lang.html +1 -1
  40. data/_includes/mermaid.html +30 -29
  41. data/_includes/metadata-hook.html +1 -0
  42. data/_includes/mode-toggle.html +66 -51
  43. data/_includes/notification.html +24 -0
  44. data/_includes/origin-type.html +13 -0
  45. data/_includes/post-nav.html +26 -22
  46. data/_includes/post-paginator.html +79 -76
  47. data/_includes/post-sharing.html +27 -16
  48. data/_includes/read-time.html +17 -10
  49. data/_includes/refactor-content.html +129 -73
  50. data/_includes/related-posts.html +48 -58
  51. data/_includes/search-loader.html +32 -31
  52. data/_includes/search-results.html +4 -5
  53. data/_includes/sidebar.html +79 -67
  54. data/_includes/toc.html +4 -7
  55. data/_includes/topbar.html +62 -56
  56. data/_includes/trending-tags.html +15 -19
  57. data/_includes/update-list.html +14 -15
  58. data/_layouts/archives.html +25 -29
  59. data/_layouts/categories.html +97 -58
  60. data/_layouts/category.html +8 -10
  61. data/_layouts/default.html +67 -31
  62. data/_layouts/home.html +67 -56
  63. data/_layouts/page.html +20 -58
  64. data/_layouts/post.html +85 -94
  65. data/_layouts/tag.html +8 -10
  66. data/_layouts/tags.html +6 -5
  67. data/_sass/addon/commons.scss +679 -878
  68. data/_sass/addon/module.scss +70 -23
  69. data/_sass/addon/syntax.scss +127 -110
  70. data/_sass/addon/variables.scss +16 -18
  71. data/_sass/colors/syntax-dark.scss +138 -0
  72. data/_sass/colors/syntax-light.scss +179 -0
  73. data/_sass/colors/{dark-typography.scss → typography-dark.scss} +58 -56
  74. data/_sass/colors/typography-light.scss +110 -0
  75. data/_sass/layout/archives.scss +86 -89
  76. data/_sass/layout/categories.scss +29 -13
  77. data/_sass/layout/category-tag.scss +9 -10
  78. data/_sass/layout/home.scss +132 -114
  79. data/_sass/layout/post.scss +213 -173
  80. data/_sass/layout/tags.scss +1 -1
  81. data/_sass/main.scss +13 -0
  82. data/assets/404.html +1 -20
  83. data/assets/css/jekyll-theme-chirpy.scss +6 -0
  84. data/assets/feed.xml +2 -2
  85. data/assets/js/data/search.json +8 -5
  86. data/assets/js/data/swcache.js +14 -29
  87. data/assets/js/dist/categories.min.js +2 -4
  88. data/assets/js/dist/commons.min.js +2 -4
  89. data/assets/js/dist/home.min.js +2 -4
  90. data/assets/js/dist/misc.min.js +4 -0
  91. data/assets/js/dist/page.min.js +2 -4
  92. data/assets/js/dist/post.min.js +2 -4
  93. data/assets/js/pwa/app.js +42 -4
  94. data/assets/js/pwa/sw.js +46 -44
  95. data/assets/js/pwa/unregister.js +12 -0
  96. metadata +64 -32
  97. data/_config.yml +0 -175
  98. data/_data/contact.yml +0 -30
  99. data/_data/share.yml +0 -27
  100. data/_includes/css-selector.html +0 -15
  101. data/_includes/no-zero-date.html +0 -13
  102. data/_includes/timeago.html +0 -26
  103. data/_plugins/posts-lastmod-hook.rb +0 -14
  104. data/_sass/colors/dark-syntax.scss +0 -87
  105. data/_sass/colors/light-syntax.scss +0 -79
  106. data/_sass/colors/light-typography.scss +0 -81
  107. data/_sass/jekyll-theme-chirpy.scss +0 -24
  108. data/_tabs/about.md +0 -8
  109. data/_tabs/archives.md +0 -7
  110. data/_tabs/categories.md +0 -6
  111. data/_tabs/tags.md +0 -6
  112. data/assets/css/style.scss +0 -12
  113. data/assets/js/dist/pvreport.min.js +0 -6
  114. data/index.html +0 -4
@@ -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
- <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">
25
+ <section id="access-lastmod">
26
+ <h2 class="panel-heading">{{- site.data.locales[include.lang].panel.lastmod -}}</h2>
27
+ <ul class="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
+ </section>
38
+ <!-- #access-lastmod -->
40
39
  {% endif %}
@@ -5,35 +5,31 @@ layout: page
5
5
 
6
6
  {% include lang.html %}
7
7
 
8
- <div id="archives" class="pl-xl-2">
9
-
10
- {% for post in site.posts %}
11
- {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
12
- {% capture pre_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}
13
- {% if forloop.first %}
14
- {% assign last_day = "" %}
15
- {% assign last_month = "" %}
16
- <span class="lead">{{this_year}}</span>
17
- <ul class="list-unstyled">
18
- {% endif %}
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' %}
10
+
11
+ <div id="archives" class="pl-xl-3">
12
+ {% for post in site.posts %}
13
+ {% assign cur_year = post.date | date: '%Y' %}
14
+
15
+ {% if cur_year != last_year %}
16
+ {% unless forloop.first %}</ul>{% endunless %}
17
+
18
+ <time class="year lead d-block">{{ cur_year }}</time>
19
+ {{ '<ul class="list-unstyled">' }}
20
+
21
+ {% assign last_year = cur_year %}
22
+ {% endif %}
23
+
19
24
  <li>
20
- <div>
21
- {% capture this_day %}{{ post.date | date: "%d" }}{% endcapture %}
22
- {% capture _mth_df %}{{ site.data.locales[lang].date_format.post.archive_month }}{% endcapture %}
23
- {% capture this_month %}{{ post.date | date: _mth_df }}{% endcapture %}
24
- <span class="date day">{{ this_day }}</span>
25
- <span class="date month small text-muted">{% include no-zero-date.html date_str=this_month %}</span>
26
- <a href="{{ post.url | relative_url }}">{{ post.title }}</a>
27
- </div>
25
+ {% assign ts = post.date | date: '%s' %}
26
+ <span class="date day" data-ts="{{ ts }}" data-df="DD">{{ post.date | date: '%d' }}</span>
27
+ <span class="date month small text-muted ms-1" data-ts="{{ ts }}" data-df="{{ df_dayjs_m }}">
28
+ {{ post.date | date: df_strftime_m }}
29
+ </span>
30
+ <a href="{{ post.url | relative_url }}">{{ post.title }}</a>
28
31
  </li>
29
- {% if forloop.last %}
30
- </ul>
31
- {% elsif this_year != pre_year %}
32
- </ul>
33
- <span class="lead">{{pre_year}}</span>
34
- <ul class="list-unstyled">
35
- {% assign last_day = "" %}
36
- {% assign last_month = "" %}
37
- {% endif %}
38
- {% endfor %}
32
+
33
+ {% if forloop.last %}</ul>{% endif %}
34
+ {% endfor %}
39
35
  </div>
@@ -5,8 +5,8 @@ layout: page
5
5
 
6
6
  {% include lang.html %}
7
7
 
8
- {% assign HEAD_PREFIX = "h_" %}
9
- {% assign LIST_PREFIX = "l_" %}
8
+ {% assign HEAD_PREFIX = 'h_' %}
9
+ {% assign LIST_PREFIX = 'l_' %}
10
10
 
11
11
  {% assign group_index = 0 %}
12
12
 
@@ -18,7 +18,7 @@ layout: page
18
18
  {% assign first_post = posts_of_category | first %}
19
19
 
20
20
  {% if category_name == first_post.categories[0] %}
21
- {% assign sub_categories = "" | split: "" %}
21
+ {% assign sub_categories = '' | split: '' %}
22
22
 
23
23
  {% for post in posts_of_category %}
24
24
  {% assign second_category = post.categories[1] %}
@@ -32,68 +32,107 @@ layout: page
32
32
  {% assign sub_categories = sub_categories | sort %}
33
33
  {% assign sub_categories_size = sub_categories | size %}
34
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
- {{ site.data.locales[lang].categories.category_measure }},
51
- {% endif %}
52
- {{ top_posts_size }}
53
- {{ site.data.locales[lang].categories.post_measure }}
54
- </span>
55
- </span>
56
-
57
- <!-- arrow -->
58
- {% if sub_categories_size > 0%}
59
- <a href="#{{ LIST_PREFIX }}{{ group_index }}" data-toggle="collapse"
60
- aria-expanded="true" aria-label="{{ HEAD_PREFIX }}{{ group_index }}-trigger"
61
- class="category-trigger hide-border-bottom">
62
- <i class="fas fa-fw fa-angle-down"></i>
63
- </a>
64
- {% else %}
65
- <span data-toggle="collapse" class="category-trigger hide-border-bottom disabled">
66
- <i class="fas fa-fw fa-angle-right"></i>
67
- </span>
68
- {% 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>
69
43
 
70
- </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>
71
46
 
72
- <!-- Sub-categories -->
73
- {% if sub_categories_size > 0 %}
74
- <div id="{{ LIST_PREFIX }}{{ group_index }}" class="collapse show" aria-expanded="true">
75
- <ul class="list-group">
76
- {% for sub_category in sub_categories %}
77
- <li class="list-group-item">
78
- <i class="far fa-folder fa-fw"></i>
47
+ <!-- content count -->
48
+ {% assign top_posts_size = site.categories[category_name] | size %}
49
+ <span class="text-muted small font-weight-light">
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 %}
79
65
 
80
- {% capture _sub_ctg_url %}/categories/{{ sub_category | slugify | url_encode }}/{% endcapture %}
81
- <a href="{{ _sub_ctg_url | relative_url }}" class="ml-1 mr-2">{{ sub_category }}</a>
66
+ {{ top_posts_size }}
82
67
 
83
- {% assign posts_size = site.categories[sub_category] | size %}
84
- <span class="text-muted small font-weight-light">
85
- {{ posts_size }}
86
- {{ site.data.locales[lang].categories.post_measure }}
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
+ }}
73
+ {% else %}
74
+ {{
75
+ site.data.locales[lang].categories.post_measure.singular
76
+ | default: site.data.locales[lang].categories.post_measure
77
+ }}
78
+ {% endif %}
87
79
  </span>
88
- </li>
89
- {% endfor %}
90
- </ul>
91
- </div>
92
- {% endif %}
80
+ </span>
93
81
 
94
- </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 -->
95
135
 
96
136
  {% assign group_index = group_index | plus: 1 %}
97
-
98
137
  {% endif %}
99
138
  {% endfor %}
@@ -6,21 +6,19 @@ layout: page
6
6
  {% include lang.html %}
7
7
 
8
8
  <div id="page-category">
9
- <h1 class="pl-lg-2">
9
+ <h1 class="ps-lg-2">
10
10
  <i class="far fa-folder-open fa-fw text-muted"></i>
11
11
  {{ page.title }}
12
- <span class="lead text-muted pl-2">{{ page.posts | size }}</span>
12
+ <span class="lead text-muted ps-2">{{ page.posts | size }}</span>
13
13
  </h1>
14
14
 
15
- <ul class="post-content pl-0">
16
- {% assign post_df = site.data.locales[lang].date_format.post.long %}
17
-
15
+ <ul class="content ps-0">
18
16
  {% for post in page.posts %}
19
- <li class="d-flex justify-content-between pl-md-3 pr-md-3">
20
- <a href="{{ post.url | relative_url }}">{{ post.title }}</a>
21
- <span class="dash flex-grow-1"></span>
22
- <span class="text-muted small">{{ post.date | date: post_df }}</span>
23
- </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 class='text-muted small text-nowrap' lang=lang %}
21
+ </li>
24
22
  {% endfor %}
25
23
  </ul>
26
24
  </div>
@@ -3,57 +3,93 @@ layout: compress
3
3
  # Default layout
4
4
  ---
5
5
 
6
- <!DOCTYPE html>
6
+ <!doctype html>
7
+
8
+ {% include origin-type.html %}
7
9
 
8
10
  {% include lang.html %}
9
11
 
10
12
  {% capture prefer_mode %}
11
13
  {% if site.theme_mode %}
12
- mode="{{ site.theme_mode }}"
14
+ data-mode="{{ site.theme_mode }}"
13
15
  {% endif %}
14
16
  {% endcapture %}
15
17
 
16
- <html lang="{{ site.lang }}"{{ prefer_mode }}>
18
+ {% if layout.tail_includes %}
19
+ {% assign has_tail = true %}
20
+ {% endif %}
17
21
 
22
+ <!-- `site.alt_lang` can specify a language different from the UI -->
23
+ <html lang="{{ site.alt_lang | default: site.lang }}" {{ prefer_mode }}>
18
24
  {% include head.html %}
19
25
 
20
- {% unless site.theme_mode %}
21
- {% include mode-toggle.html %}
22
- {% endunless %}
23
-
24
- <body data-spy="scroll" data-target="#toc">
25
-
26
- {% include sidebar.html %}
27
-
28
- {% include topbar.html %}
29
-
30
- <div id="main-wrapper">
31
- <div id="main">
26
+ <body>
27
+ {% include sidebar.html lang=lang %}
28
+
29
+ <div id="main-wrapper" class="d-flex justify-content-center">
30
+ <div class="container px-xxl-5">
31
+ {% include topbar.html lang=lang %}
32
+
33
+ <div class="row">
34
+ <main
35
+ aria-label="Main Content"
36
+ class="col-12 col-lg-11 col-xl-9 px-md-4{% unless has_tail %} pb-5{% endunless %}"
37
+ >
38
+ {{ content }}
39
+ </main>
40
+
41
+ <!-- panel -->
42
+ <aside aria-label="Panel" id="panel-wrapper" class="col-xl-3 ps-2 text-muted">
43
+ <div class="access">
44
+ {% include_cached update-list.html lang=lang %}
45
+ {% include_cached trending-tags.html lang=lang %}
46
+ </div>
47
+
48
+ {% for _include in layout.panel_includes %}
49
+ {% assign _include_path = _include | append: '.html' %}
50
+ {% include {{ _include_path }} lang=lang %}
51
+ {% endfor %}
52
+ </aside>
53
+ </div>
54
+
55
+ <div class="row">
56
+ <!-- tail -->
57
+ <div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 px-md-4">
58
+ {% if has_tail %}
59
+ {% for _include in layout.tail_includes %}
60
+ {% assign _include_path = _include | append: '.html' %}
61
+ {% include {{ _include_path }} lang=lang %}
62
+ {% endfor %}
63
+ {% endif %}
64
+
65
+ {% include_cached footer.html lang=lang %}
66
+ </div>
67
+ </div>
68
+
69
+ {% include_cached search-results.html lang=lang %}
70
+ </div>
32
71
 
33
- {{ content }}
72
+ <aside aria-label="Scroll to Top">
73
+ <button id="back-to-top" type="button" class="btn btn-lg btn-box-shadow">
74
+ <i class="fas fa-angle-up"></i>
75
+ </button>
76
+ </aside>
77
+ </div>
34
78
 
35
- {% include footer.html %}
79
+ <div id="mask"></div>
36
80
 
37
- </div>
81
+ {% if site.pwa.enabled %}
82
+ {% include_cached notification.html lang=lang %}
83
+ {% endif %}
38
84
 
39
- {% include search-results.html %}
85
+ <!-- JavaScripts -->
40
86
 
41
- </div> <!-- #main-wrapper -->
87
+ {% include js-selector.html %}
42
88
 
43
89
  {% if page.mermaid %}
44
90
  {% include mermaid.html %}
45
91
  {% endif %}
46
92
 
47
- <div id="mask"></div>
48
-
49
- <a id="back-to-top" href="#" aria-label="back-to-top" class="btn btn-lg btn-box-shadow" role="button">
50
- <i class="fas fa-angle-up"></i>
51
- </a>
52
-
53
- {% include search-loader.html %}
54
-
55
- {% include js-selector.html %}
56
-
93
+ {% include_cached search-loader.html %}
57
94
  </body>
58
-
59
95
  </html>
data/_layouts/home.html CHANGED
@@ -1,14 +1,13 @@
1
1
  ---
2
- layout: page
3
- # The Home page layout
2
+ layout: default
4
3
  ---
5
4
 
6
5
  {% include lang.html %}
7
6
 
8
- {% assign pinned = site.posts | where: "pin", "true" %}
9
- {% assign default = site.posts | where_exp: "item", "item.pin != true" %}
7
+ {% assign pinned = site.posts | where: 'pin', 'true' %}
8
+ {% assign default = site.posts | where_exp: 'item', 'item.pin != true and item.hidden != true' %}
10
9
 
11
- {% assign posts = "" | split: "" %}
10
+ {% assign posts = '' | split: '' %}
12
11
 
13
12
  <!-- Get pinned posts -->
14
13
 
@@ -23,7 +22,6 @@ layout: page
23
22
  {% assign pinned_num = 0 %}
24
23
  {% endif %}
25
24
 
26
-
27
25
  <!-- Get default posts -->
28
26
 
29
27
  {% assign default_beg = offset | minus: pinned.size %}
@@ -32,7 +30,7 @@ layout: page
32
30
  {% assign default_beg = 0 %}
33
31
  {% endif %}
34
32
 
35
- {% assign default_num = paginator.posts | size | minus: pinned_num %}
33
+ {% assign default_num = paginator.posts | size | minus: pinned_num %}
36
34
  {% assign default_end = default_beg | plus: default_num | minus: 1 %}
37
35
 
38
36
  {% if default_num > 0 %}
@@ -41,60 +39,73 @@ layout: page
41
39
  {% endfor %}
42
40
  {% endif %}
43
41
 
44
- <div id="post-list">
45
-
46
- {% for post in posts %}
47
-
48
- <div class="post-preview">
49
- <h1>
50
- <a href="{{ post.url | relative_url }}">{{ post.title }}</a>
51
- </h1>
52
-
53
- <div class="post-content">
54
- <p>
55
- {% include no-linenos.html content=post.content %}
56
- {{ content | markdownify | strip_html | truncate: 200 | escape }}
57
- </p>
58
- </div>
59
-
60
- <div class="post-meta text-muted d-flex">
61
-
62
- <div class="mr-auto">
63
- <!-- posted date -->
64
- <i class="far fa-calendar fa-fw"></i>
65
- {% include timeago.html date=post.date tooltip=true %}
66
-
67
- <!-- time to read -->
68
- <i class="far fa-clock fa-fw"></i>
69
- {% include read-time.html content=post.content %}
70
-
71
- <!-- categories -->
72
- {% if post.categories.size > 0 %}
73
- <i class="far fa-folder-open fa-fw"></i>
74
- <span>
75
- {% for category in post.categories %}
76
- {{ category }}
77
- {%- unless forloop.last -%},{%- endunless -%}
78
- {% endfor %}
79
- </span>
80
- {% endif %}
81
- </div>
42
+ {% capture content %}
43
+ {% for post in posts %}
44
+ <article class="card-wrapper">
45
+ <a href="{{ post.url | relative_url }}" class="card post-preview flex-md-row-reverse">
46
+ {% if post.image %}
47
+ {% if post.image.lqip %}
48
+ {% capture lqip %}lqip="{{ post.image.lqip }}"{% endcapture %}
49
+ {% endif %}
82
50
 
83
- {% if post.pin %}
84
- <div class="pin">
85
- <i class="fas fa-thumbtack fa-fw"></i>
86
- <span>{{ site.data.locales[lang].post.pin_prompt }}</span>
87
- </div>
88
- {% endif %}
51
+ {% assign src = post.image.path | default: post.image %}
52
+ {% unless src contains '//' %}
53
+ {% assign src = post.img_path | append: '/' | append: src | replace: '//', '/' %}
54
+ {% endunless %}
89
55
 
90
- </div> <!-- .post-meta -->
56
+ {% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %}
91
57
 
92
- </div> <!-- .post-review -->
58
+ <img src="{{ src }}" w="17" h="10" alt="{{ alt }}" {{ lqip }}>
59
+ {% endif %}
93
60
 
94
- {% endfor %}
61
+ <div class="card-body d-flex flex-column">
62
+ <h1 class="card-title my-2 mt-md-0">{{ post.title }}</h1>
63
+
64
+ <div class="card-text content mt-0 mb-2">
65
+ <p>
66
+ {% include no-linenos.html content=post.content %}
67
+ {{ content | markdownify | strip_html | truncate: 200 | escape }}
68
+ </p>
69
+ </div>
70
+
71
+ <div class="post-meta flex-grow-1 d-flex align-items-end">
72
+ <div class="me-auto">
73
+ <!-- posted date -->
74
+ <i class="far fa-calendar fa-fw me-1"></i>
75
+ {% include datetime.html date=post.date lang=lang %}
76
+
77
+ <!-- categories -->
78
+ {% if post.categories.size > 0 %}
79
+ <i class="far fa-folder-open fa-fw me-1"></i>
80
+ <span class="categories">
81
+ {% for category in post.categories %}
82
+ {{ category }}
83
+ {%- unless forloop.last -%},{%- endunless -%}
84
+ {% endfor %}
85
+ </span>
86
+ {% endif %}
87
+ </div>
88
+
89
+ {% if post.pin %}
90
+ <div class="pin ms-1">
91
+ <i class="fas fa-thumbtack fa-fw"></i>
92
+ <span>{{ site.data.locales[lang].post.pin_prompt }}</span>
93
+ </div>
94
+ {% endif %}
95
+ </div>
96
+ <!-- .post-meta -->
97
+ </div>
98
+ <!-- .card-body -->
99
+ </a>
100
+ </article>
101
+ {% endfor %}
102
+ {% endcapture %}
95
103
 
96
- </div> <!-- #post-list -->
104
+ <div id="post-list" class="flex-grow-1 pe-xl-2">
105
+ {% include refactor-content.html content=content lang=lang %}
106
+ </div>
107
+ <!-- #post-list -->
97
108
 
98
- {% if paginator.total_pages > 0 %}
109
+ {% if paginator.total_pages > 1 %}
99
110
  {% include post-paginator.html %}
100
111
  {% endif %}