jekyll-theme-chirpy 6.2.1 → 6.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +32 -33
- data/_data/locales/de-DE.yml +8 -1
- data/_data/locales/en.yml +1 -1
- data/_data/locales/ru-RU.yml +28 -18
- data/_data/origin/basic.yml +3 -5
- data/_data/origin/cors.yml +12 -14
- data/_includes/comments/disqus.html +1 -1
- data/_includes/comments/giscus.html +1 -0
- data/_includes/comments/utterances.html +22 -23
- data/_includes/embed/twitch.html +6 -3
- data/_includes/embed/youtube.html +5 -2
- data/_includes/head.html +4 -0
- data/_includes/js-selector.html +2 -2
- data/_includes/refactor-content.html +59 -79
- data/_includes/related-posts.html +2 -2
- data/_includes/sidebar.html +32 -34
- data/_includes/toc.html +1 -1
- data/_layouts/default.html +15 -23
- data/_layouts/home.html +50 -43
- data/_layouts/page.html +3 -9
- data/_layouts/post.html +102 -102
- data/_sass/addon/commons.scss +65 -77
- data/_sass/addon/module.scss +19 -1
- data/_sass/addon/syntax.scss +2 -2
- data/_sass/addon/variables.scss +3 -2
- data/_sass/colors/syntax-dark.scss +26 -0
- data/_sass/colors/syntax-light.scss +35 -0
- data/_sass/colors/typography-dark.scss +1 -0
- data/_sass/colors/typography-light.scss +1 -0
- data/_sass/layout/home.scss +8 -21
- data/_sass/layout/post.scss +11 -55
- data/assets/js/dist/categories.min.js +1 -1
- data/assets/js/dist/commons.min.js +1 -1
- data/assets/js/dist/home.min.js +2 -2
- data/assets/js/dist/misc.min.js +1 -1
- data/assets/js/dist/page.min.js +2 -2
- data/assets/js/dist/post.min.js +2 -2
- data/assets/js/pwa/sw.js +1 -1
- metadata +3 -3
@@ -30,22 +30,22 @@
|
|
30
30
|
{% endif %}
|
31
31
|
|
32
32
|
<!-- Change the icon of checkbox -->
|
33
|
+
|
33
34
|
{% if _content contains '<input type="checkbox"' %}
|
34
35
|
{% assign _content = _content
|
35
|
-
| replace:
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
'<input type="checkbox" class="task-list-item-checkbox" disabled="disabled" />',
|
40
|
-
'<i class="far fa-circle fa-fw"></i>'
|
36
|
+
| replace: '<input type="checkbox" class="task-list-item-checkbox" disabled="disabled" checked="checked" />',
|
37
|
+
'<i class="fas fa-check-circle fa-fw checked"></i>'
|
38
|
+
| replace: '<input type="checkbox" class="task-list-item-checkbox" disabled="disabled" />',
|
39
|
+
'<i class="far fa-circle fa-fw"></i>'
|
41
40
|
%}
|
42
41
|
{% endif %}
|
43
42
|
|
44
|
-
<!-- images -->
|
43
|
+
<!-- Handle images -->
|
44
|
+
|
45
45
|
{% assign IMG_TAG = '<img ' %}
|
46
46
|
|
47
47
|
{% if _content contains IMG_TAG %}
|
48
|
-
{% assign _img_content =
|
48
|
+
{% assign _img_content = null %}
|
49
49
|
{% assign _img_snippets = _content | split: IMG_TAG %}
|
50
50
|
|
51
51
|
<!-- CDN URL -->
|
@@ -81,10 +81,9 @@
|
|
81
81
|
{% assign _left = _left | remove: ' /' | replace: ' w=', ' width=' | replace: ' h=', ' height=' %}
|
82
82
|
{% assign _attrs = _left | split: '" ' %}
|
83
83
|
|
84
|
-
{% assign
|
85
|
-
{% assign
|
86
|
-
{% assign
|
87
|
-
{% assign _class = nil %}
|
84
|
+
{% assign _src = null %}
|
85
|
+
{% assign _lqip = null %}
|
86
|
+
{% assign _class = null %}
|
88
87
|
|
89
88
|
{% for _attr in _attrs %}
|
90
89
|
{% unless _attr contains '=' %}
|
@@ -96,10 +95,6 @@
|
|
96
95
|
{% capture _value %}{{ _pair | last | remove: '"' }}{% endcapture %}
|
97
96
|
|
98
97
|
{% case _key %}
|
99
|
-
{% when 'width' %}
|
100
|
-
{% assign _width = _value %}
|
101
|
-
{% when 'height' %}
|
102
|
-
{% assign _height = _value %}
|
103
98
|
{% when 'src' %}
|
104
99
|
{% assign _src = _value %}
|
105
100
|
{% when 'lqip' %}
|
@@ -115,54 +110,40 @@
|
|
115
110
|
{% assign _left = _left | remove: _old_class %}
|
116
111
|
{% endif %}
|
117
112
|
|
118
|
-
{% assign _final_src =
|
113
|
+
{% assign _final_src = null %}
|
114
|
+
{% assign _lazyload = true %}
|
119
115
|
|
120
116
|
{% unless _src contains '//' %}
|
121
117
|
{% assign _final_src = _path_prefix | append: _src %}
|
122
|
-
{%
|
123
|
-
{%
|
124
|
-
{% assign _left = _left | replace: _src_from, _src_to %}
|
118
|
+
{% assign _src_alt = 'src="' | append: _path_prefix %}
|
119
|
+
{% assign _left = _left | replace: 'src="', _src_alt %}
|
125
120
|
{% endunless %}
|
126
121
|
|
127
122
|
{% if _lqip %}
|
128
|
-
{%
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
{% assign
|
123
|
+
{% assign _lazyload = false %}
|
124
|
+
{% assign _class = _class | append: ' blur' %}
|
125
|
+
|
126
|
+
{% unless _lqip contains 'data:' %}
|
127
|
+
{% assign _lqip_alt = 'lqip="' | append: _path_prefix %}
|
128
|
+
{% assign _left = _left | replace: 'lqip="', _lqip_alt %}
|
133
129
|
{% endunless %}
|
134
|
-
{% endif %}
|
135
130
|
|
136
|
-
|
137
|
-
|
138
|
-
{% if _left contains 'class=' %}
|
139
|
-
{% assign _left = _left | replace: 'class="', 'class="lazyload '%}
|
140
|
-
{% else %}
|
141
|
-
{% assign _left = _left | append: ' class="lazyload"' %}
|
142
|
-
{% endif %}
|
131
|
+
<!-- add image placeholder -->
|
132
|
+
{% assign _left = _left | replace: 'src=', 'data-src=' | replace: ' lqip=', ' data-lqip="true" src=' %}
|
143
133
|
|
144
|
-
<!-- add image placeholder -->
|
145
|
-
{% if _lqip %}
|
146
|
-
{% assign _left = _left | replace: ' lqip=', ' data-lqip="true" src=' %}
|
147
134
|
{% else %}
|
148
|
-
{%
|
149
|
-
<!-- add SVG placehoder -->
|
150
|
-
{%- capture _svg -%}
|
151
|
-
src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 {{ _width }} {{ _height }}'%3E%3C/svg%3E"
|
152
|
-
{%- endcapture -%}
|
153
|
-
{% assign _left = _svg | append: ' ' | append: _left %}
|
154
|
-
{% assign _class = _class | append: ' shimmer' %}
|
155
|
-
{% endif %}
|
135
|
+
{% assign _class = _class | append: ' shimmer' %}
|
156
136
|
{% endif %}
|
157
137
|
|
158
|
-
<!--
|
159
|
-
{%
|
138
|
+
<!-- lazy-load images -->
|
139
|
+
{% if _lazyload %}
|
140
|
+
{% assign _left = _left | append: ' loading="lazy"' %}
|
141
|
+
{% endif %}
|
160
142
|
|
161
143
|
{% if page.layout == 'home' %}
|
162
144
|
<!-- create the image wrapper -->
|
163
|
-
{
|
164
|
-
|
165
|
-
{%- endcapture -%}
|
145
|
+
{% assign _wrapper_start = '<div class="preview-img ' | append: _class | append: '">' %}
|
146
|
+
|
166
147
|
{% assign _img_content = _img_content | append: _wrapper_start %}
|
167
148
|
{% assign _right = _right | prepend: '></div' %}
|
168
149
|
|
@@ -176,26 +157,30 @@
|
|
176
157
|
{% capture _class %}
|
177
158
|
class="img-link{% unless _lqip %} shimmer{% endunless %}"
|
178
159
|
{% endcapture %}
|
179
|
-
{% assign _img_content = _img_content | slice: 0, _size | append: _class | append: '>'
|
160
|
+
{% assign _img_content = _img_content | slice: 0, _size | append: _class | append: '>' %}
|
161
|
+
|
180
162
|
{% else %}
|
181
163
|
<!-- create the image wrapper -->
|
182
|
-
{
|
183
|
-
|
184
|
-
|
164
|
+
{% assign _wrapper_start = _final_src
|
165
|
+
| default: _src
|
166
|
+
| prepend: '<a href="'
|
167
|
+
| append: '" class="popup img-link '
|
168
|
+
| append: _class
|
169
|
+
| append: '">'
|
170
|
+
%}
|
171
|
+
|
185
172
|
{% assign _img_content = _img_content | append: _wrapper_start %}
|
186
|
-
{% assign _right =
|
173
|
+
{% assign _right = '></a' | append: _right %}
|
187
174
|
{% endif %}
|
188
175
|
{% endif %}
|
189
176
|
|
190
177
|
<!-- combine -->
|
191
|
-
{% assign _img_content = _img_content | append:
|
192
|
-
|
178
|
+
{% assign _img_content = _img_content | append: IMG_TAG | append: _left | append: _right %}
|
193
179
|
{% endfor %}
|
194
180
|
|
195
181
|
{% if _img_content %}
|
196
182
|
{% assign _content = _img_content %}
|
197
183
|
{% endif %}
|
198
|
-
|
199
184
|
{% endif %}
|
200
185
|
|
201
186
|
<!-- Add header for code snippets -->
|
@@ -205,13 +190,11 @@
|
|
205
190
|
{% assign _new_content = '' %}
|
206
191
|
|
207
192
|
{% for _snippet in _code_spippets %}
|
208
|
-
|
209
193
|
{% if forloop.last %}
|
210
194
|
{% assign _new_content = _new_content | append: _snippet %}
|
211
195
|
|
212
196
|
{% else %}
|
213
|
-
|
214
|
-
{% assign _left = _snippet | split: '><' | last%}
|
197
|
+
{% assign _left = _snippet | split: '><' | last %}
|
215
198
|
|
216
199
|
{% if _left contains 'file="' %}
|
217
200
|
{% assign _label_text = _left | split: 'file="' | last | split: '"' | first %}
|
@@ -226,21 +209,19 @@
|
|
226
209
|
<span data-label-text="{{ _label_text | strip }}"><i class="{{ _label_icon }}"></i></span>
|
227
210
|
{% endcapture %}
|
228
211
|
|
229
|
-
{% assign _new_content = _new_content
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
212
|
+
{% assign _new_content = _new_content
|
213
|
+
| append: _snippet
|
214
|
+
| append: '<div class="code-header">'
|
215
|
+
| append: _label
|
216
|
+
| append: '<button aria-label="copy" data-title-succeed="'
|
217
|
+
| append: site.data.locales[include.lang].post.button.copy_code.succeed
|
218
|
+
| append: '"><i class="far fa-clipboard"></i></button></div>'
|
219
|
+
| append: '<div class="highlight"><code>'
|
236
220
|
%}
|
237
|
-
|
238
221
|
{% endif %}
|
239
|
-
|
240
222
|
{% endfor %}
|
241
223
|
|
242
224
|
{% assign _content = _new_content %}
|
243
|
-
|
244
225
|
{% endif %}
|
245
226
|
|
246
227
|
<!-- Create heading anchors -->
|
@@ -249,11 +230,11 @@
|
|
249
230
|
{% assign _heading_content = _content %}
|
250
231
|
|
251
232
|
{% for level in heading_levels %}
|
252
|
-
{%
|
253
|
-
{%
|
233
|
+
{% assign mark_start = '<h' | append: level | append: ' id="' %}
|
234
|
+
{% assign mark_end = '</h' | append: level | append: '>' %}
|
254
235
|
|
255
236
|
{% if _heading_content contains mark_start %}
|
256
|
-
{% assign _new_content =
|
237
|
+
{% assign _new_content = null %}
|
257
238
|
{% assign heading_snippets = _heading_content | split: mark_start %}
|
258
239
|
|
259
240
|
{% for snippet in heading_snippets %}
|
@@ -263,20 +244,19 @@
|
|
263
244
|
{% endif %}
|
264
245
|
|
265
246
|
{% assign id = snippet | split: '"' | first %}
|
266
|
-
{%
|
247
|
+
{% assign anchor = '<a href="#'
|
248
|
+
| append: id
|
249
|
+
| append: '" class="anchor text-muted"><i class="fas fa-hashtag"></i></a>'
|
250
|
+
%}
|
267
251
|
|
268
252
|
{% assign left = snippet | split: mark_end | first %}
|
269
253
|
{% assign right = snippet | slice: left.size, snippet.size %}
|
270
254
|
{% assign left = left | replace_first: '">', '"><span class="me-2">' | append: '</span>' %}
|
271
255
|
|
272
|
-
{% assign _new_content = _new_content | append: mark_start
|
273
|
-
| append: left | append: anchor | append: right
|
274
|
-
%}
|
275
|
-
|
256
|
+
{% assign _new_content = _new_content | append: mark_start | append: left | append: anchor | append: right %}
|
276
257
|
{% endfor %}
|
277
258
|
|
278
259
|
{% assign _heading_content = _new_content %}
|
279
|
-
|
280
260
|
{% endif %}
|
281
261
|
{% endfor %}
|
282
262
|
|
@@ -78,9 +78,9 @@
|
|
78
78
|
<article class="col">
|
79
79
|
<a href="{{ post.url | relative_url }}" class="post-preview card h-100">
|
80
80
|
<div class="card-body">
|
81
|
-
{% include datetime.html date=post.date
|
81
|
+
{% include datetime.html date=post.date lang=include.lang %}
|
82
82
|
<h4 class="pt-0 my-2">{{ post.title }}</h4>
|
83
|
-
<div class="text-muted
|
83
|
+
<div class="text-muted">
|
84
84
|
<p>
|
85
85
|
{% include no-linenos.html content=post.content %}
|
86
86
|
{{ content | markdownify | strip_html | truncate: 200 | escape }}
|
data/_includes/sidebar.html
CHANGED
@@ -59,48 +59,46 @@
|
|
59
59
|
{% endif %}
|
60
60
|
{% endunless %}
|
61
61
|
|
62
|
-
|
63
|
-
{%
|
64
|
-
{%
|
65
|
-
{
|
66
|
-
{%- capture url -%}
|
62
|
+
{% for entry in site.data.contact %}
|
63
|
+
{% case entry.type %}
|
64
|
+
{% when 'github', 'twitter' %}
|
65
|
+
{%- capture url -%}
|
67
66
|
https://{{ entry.type }}.com/{{ site[entry.type].username }}
|
68
67
|
{%- endcapture -%}
|
69
|
-
|
70
|
-
|
71
|
-
|
68
|
+
{% when 'email' %}
|
69
|
+
{% assign email = site.social.email | split: '@' %}
|
70
|
+
{%- capture url -%}
|
72
71
|
javascript:location.href = 'mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@')
|
73
72
|
{%- endcapture -%}
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
73
|
+
{% when 'rss' %}
|
74
|
+
{% assign url = '/feed.xml' | relative_url %}
|
75
|
+
{% else %}
|
76
|
+
{% assign url = entry.url %}
|
77
|
+
{% endcase %}
|
79
78
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
79
|
+
{% if url %}
|
80
|
+
<a
|
81
|
+
href="{{ url }}"
|
82
|
+
aria-label="{{ entry.type }}"
|
83
|
+
{% assign link_types = '' %}
|
85
84
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
85
|
+
{% unless entry.noblank %}
|
86
|
+
target="_blank"
|
87
|
+
{% assign link_types = 'noopener noreferrer' %}
|
88
|
+
{% endunless %}
|
90
89
|
|
91
|
-
|
92
|
-
|
93
|
-
|
90
|
+
{% if entry.type == 'mastodon' %}
|
91
|
+
{% assign link_types = link_types | append: ' me' | strip %}
|
92
|
+
{% endif %}
|
94
93
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
</address>
|
94
|
+
{% unless link_types == empty %}
|
95
|
+
rel="{{ link_types }}"
|
96
|
+
{% endunless %}
|
97
|
+
>
|
98
|
+
<i class="{{ entry.icon }}"></i>
|
99
|
+
</a>
|
100
|
+
{% endif %}
|
101
|
+
{% endfor %}
|
104
102
|
</div>
|
105
103
|
<!-- .sidebar-bottom -->
|
106
104
|
</aside>
|
data/_includes/toc.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
{% endif %}
|
7
7
|
|
8
8
|
{% if enable_toc %}
|
9
|
-
<section id="toc-wrapper" class="ps-0 pe-4
|
9
|
+
<section id="toc-wrapper" class="ps-0 pe-4">
|
10
10
|
<h2 class="panel-heading ps-3 pt-2 mb-2">{{- site.data.locales[include.lang].panel.toc -}}</h2>
|
11
11
|
<nav id="toc"></nav>
|
12
12
|
</section>
|
data/_layouts/default.html
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
---
|
2
2
|
layout: compress
|
3
|
-
# Default layout
|
4
3
|
---
|
5
4
|
|
6
5
|
<!doctype html>
|
@@ -9,14 +8,8 @@ layout: compress
|
|
9
8
|
|
10
9
|
{% include lang.html %}
|
11
10
|
|
12
|
-
{%
|
13
|
-
{%
|
14
|
-
data-mode="{{ site.theme_mode }}"
|
15
|
-
{% endif %}
|
16
|
-
{% endcapture %}
|
17
|
-
|
18
|
-
{% if layout.tail_includes %}
|
19
|
-
{% assign has_tail = true %}
|
11
|
+
{% if site.theme_mode %}
|
12
|
+
{% capture prefer_mode %}data-mode="{{ site.theme_mode }}"{% endcapture %}
|
20
13
|
{% endif %}
|
21
14
|
|
22
15
|
<!-- `site.alt_lang` can specify a language different from the UI -->
|
@@ -27,19 +20,20 @@ layout: compress
|
|
27
20
|
{% include sidebar.html lang=lang %}
|
28
21
|
|
29
22
|
<div id="main-wrapper" class="d-flex justify-content-center">
|
30
|
-
<div class="container px-xxl-5">
|
23
|
+
<div class="container d-flex flex-column px-xxl-5">
|
31
24
|
{% include topbar.html lang=lang %}
|
32
25
|
|
33
|
-
<div class="row">
|
34
|
-
<main
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
26
|
+
<div class="row flex-grow-1">
|
27
|
+
<main aria-label="Main Content" class="col-12 col-lg-11 col-xl-9 px-md-4">
|
28
|
+
{% if layout.refactor or layout.layout == 'default' %}
|
29
|
+
{% include refactor-content.html content=content lang=lang %}
|
30
|
+
{% else %}
|
31
|
+
{{ content }}
|
32
|
+
{% endif %}
|
39
33
|
</main>
|
40
34
|
|
41
35
|
<!-- panel -->
|
42
|
-
<aside aria-label="Panel" id="panel-wrapper" class="col-xl-3 ps-2 text-muted">
|
36
|
+
<aside aria-label="Panel" id="panel-wrapper" class="col-xl-3 ps-2 mb-5 text-muted">
|
43
37
|
<div class="access">
|
44
38
|
{% include_cached update-list.html lang=lang %}
|
45
39
|
{% include_cached trending-tags.html lang=lang %}
|
@@ -55,12 +49,10 @@ layout: compress
|
|
55
49
|
<div class="row">
|
56
50
|
<!-- tail -->
|
57
51
|
<div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 px-md-4">
|
58
|
-
{%
|
59
|
-
{%
|
60
|
-
|
61
|
-
|
62
|
-
{% endfor %}
|
63
|
-
{% endif %}
|
52
|
+
{% for _include in layout.tail_includes %}
|
53
|
+
{% assign _include_path = _include | append: '.html' %}
|
54
|
+
{% include {{ _include_path }} lang=lang %}
|
55
|
+
{% endfor %}
|
64
56
|
|
65
57
|
{% include_cached footer.html lang=lang %}
|
66
58
|
</div>
|
data/_layouts/home.html
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
---
|
2
2
|
layout: default
|
3
|
+
refactor: true
|
3
4
|
---
|
4
5
|
|
5
6
|
{% include lang.html %}
|
@@ -39,15 +40,13 @@ layout: default
|
|
39
40
|
{% endfor %}
|
40
41
|
{% endif %}
|
41
42
|
|
42
|
-
|
43
|
+
<div id="post-list" class="flex-grow-1 px-xl-1">
|
43
44
|
{% for post in posts %}
|
44
|
-
<article class="card-wrapper">
|
45
|
-
<a href="{{ post.url | relative_url }}" class="
|
46
|
-
{%
|
47
|
-
{% if post.image.lqip %}
|
48
|
-
{% capture lqip %}lqip="{{ post.image.lqip }}"{% endcapture %}
|
49
|
-
{% endif %}
|
45
|
+
<article class="card-wrapper card">
|
46
|
+
<a href="{{ post.url | relative_url }}" class="post-preview row g-0 flex-md-row-reverse">
|
47
|
+
{% assign card_body_col = '12' %}
|
50
48
|
|
49
|
+
{% if post.image %}
|
51
50
|
{% assign src = post.image.path | default: post.image %}
|
52
51
|
{% unless src contains '//' %}
|
53
52
|
{% assign src = post.img_path | append: '/' | append: src | replace: '//', '/' %}
|
@@ -55,54 +54,62 @@ layout: default
|
|
55
54
|
|
56
55
|
{% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %}
|
57
56
|
|
58
|
-
|
59
|
-
{% endif %}
|
57
|
+
{% assign lqip = null %}
|
60
58
|
|
61
|
-
|
62
|
-
|
59
|
+
{% if post.image.lqip %}
|
60
|
+
{% capture lqip %}lqip="{{ post.image.lqip }}"{% endcapture %}
|
61
|
+
{% endif %}
|
63
62
|
|
64
|
-
<div class="
|
65
|
-
<
|
66
|
-
{% include no-linenos.html content=post.content %}
|
67
|
-
{{ content | markdownify | strip_html | truncate: 200 | escape }}
|
68
|
-
</p>
|
63
|
+
<div class="col-md-5">
|
64
|
+
<img src="{{ src }}" alt="{{ alt }}" {{ lqip }}>
|
69
65
|
</div>
|
70
66
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
{%- unless forloop.last -%},{%- endunless -%}
|
84
|
-
{% endfor %}
|
85
|
-
</span>
|
86
|
-
{% endif %}
|
67
|
+
{% assign card_body_col = '7' %}
|
68
|
+
{% endif %}
|
69
|
+
|
70
|
+
<div class="col-md-{{ card_body_col }}">
|
71
|
+
<div class="card-body d-flex flex-column">
|
72
|
+
<h1 class="card-title my-2 mt-md-0">{{ post.title }}</h1>
|
73
|
+
|
74
|
+
<div class="card-text content mt-0 mb-3">
|
75
|
+
<p>
|
76
|
+
{% include no-linenos.html content=post.content %}
|
77
|
+
{{ content | markdownify | strip_html | truncate: 200 | escape }}
|
78
|
+
</p>
|
87
79
|
</div>
|
88
80
|
|
89
|
-
|
90
|
-
<div class="
|
91
|
-
|
92
|
-
<
|
81
|
+
<div class="post-meta flex-grow-1 d-flex align-items-end">
|
82
|
+
<div class="me-auto">
|
83
|
+
<!-- posted date -->
|
84
|
+
<i class="far fa-calendar fa-fw me-1"></i>
|
85
|
+
{% include datetime.html date=post.date lang=lang %}
|
86
|
+
|
87
|
+
<!-- categories -->
|
88
|
+
{% if post.categories.size > 0 %}
|
89
|
+
<i class="far fa-folder-open fa-fw me-1"></i>
|
90
|
+
<span class="categories">
|
91
|
+
{% for category in post.categories %}
|
92
|
+
{{ category }}
|
93
|
+
{%- unless forloop.last -%},{%- endunless -%}
|
94
|
+
{% endfor %}
|
95
|
+
</span>
|
96
|
+
{% endif %}
|
93
97
|
</div>
|
94
|
-
|
98
|
+
|
99
|
+
{% if post.pin %}
|
100
|
+
<div class="pin ms-1">
|
101
|
+
<i class="fas fa-thumbtack fa-fw"></i>
|
102
|
+
<span>{{ site.data.locales[lang].post.pin_prompt }}</span>
|
103
|
+
</div>
|
104
|
+
{% endif %}
|
105
|
+
</div>
|
106
|
+
<!-- .post-meta -->
|
95
107
|
</div>
|
96
|
-
<!-- .
|
108
|
+
<!-- .card-body -->
|
97
109
|
</div>
|
98
|
-
<!-- .card-body -->
|
99
110
|
</a>
|
100
111
|
</article>
|
101
112
|
{% endfor %}
|
102
|
-
{% endcapture %}
|
103
|
-
|
104
|
-
<div id="post-list" class="flex-grow-1 pe-xl-2">
|
105
|
-
{% include refactor-content.html content=content lang=lang %}
|
106
113
|
</div>
|
107
114
|
<!-- #post-list -->
|
108
115
|
|
data/_layouts/page.html
CHANGED
@@ -2,13 +2,7 @@
|
|
2
2
|
layout: default
|
3
3
|
---
|
4
4
|
|
5
|
-
{%
|
6
|
-
{% if layout.refactor or page.layout == 'page' %}
|
7
|
-
{% include refactor-content.html content=content lang=lang %}
|
8
|
-
{% else %}
|
9
|
-
{{ content }}
|
10
|
-
{% endif %}
|
11
|
-
{% endcapture %}
|
5
|
+
{% include lang.html %}
|
12
6
|
|
13
7
|
<article class="px-1">
|
14
8
|
{% if page.layout == 'page' or page.collection == 'tabs' %}
|
@@ -18,9 +12,9 @@ layout: default
|
|
18
12
|
{{ title }}
|
19
13
|
</h1>
|
20
14
|
<div class="content">
|
21
|
-
{{
|
15
|
+
{{ content }}
|
22
16
|
</div>
|
23
17
|
{% else %}
|
24
|
-
{{
|
18
|
+
{{ content }}
|
25
19
|
{% endif %}
|
26
20
|
</article>
|