|
1 | 1 | --- |
2 | | -layout: page |
| 2 | +layout: default |
3 | 3 | refactor: true |
4 | 4 | panel_includes: |
5 | 5 | - toc |
|
11 | 11 |
|
12 | 12 | {% include lang.html %} |
13 | 13 |
|
14 | | -<header> |
15 | | - <h1 data-toc-skip>{{ page.title }}</h1> |
| 14 | +<article class="px-1"> |
| 15 | + <header> |
| 16 | + <h1 data-toc-skip>{{ page.title }}</h1> |
16 | 17 |
|
17 | | - <div class="post-meta text-muted"> |
18 | | - <!-- published date --> |
19 | | - <span> |
20 | | - {{ site.data.locales[lang].post.posted }} |
21 | | - {% include datetime.html date=page.date tooltip=true lang=lang %} |
22 | | - </span> |
23 | | - |
24 | | - <!-- lastmod date --> |
25 | | - {% if page.last_modified_at and page.last_modified_at != page.date %} |
| 18 | + <div class="post-meta text-muted"> |
| 19 | + <!-- published date --> |
26 | 20 | <span> |
27 | | - {{ site.data.locales[lang].post.updated }} |
28 | | - {% include datetime.html date=page.last_modified_at tooltip=true lang=lang %} |
| 21 | + {{ site.data.locales[lang].post.posted }} |
| 22 | + {% include datetime.html date=page.date tooltip=true lang=lang %} |
29 | 23 | </span> |
30 | | - {% endif %} |
31 | 24 |
|
32 | | - {% if page.image %} |
33 | | - {% capture src %}src="{{ page.image.path | default: page.image }}"{% endcapture %} |
34 | | - {% capture class %}class="preview-img{% if page.image.no_bg %}{{ ' no-bg' }}{% endif %}"{% endcapture %} |
35 | | - {% capture alt %}alt="{{ page.image.alt | xml_escape | default: "Preview Image" }}"{% endcapture %} |
36 | | - |
37 | | - {% capture lqip %} |
38 | | - {% if page.image.lqip %} |
39 | | - lqip="{{ page.image.lqip }}" |
| 25 | + <!-- lastmod date --> |
| 26 | + {% if page.last_modified_at and page.last_modified_at != page.date %} |
| 27 | + <span> |
| 28 | + {{ site.data.locales[lang].post.updated }} |
| 29 | + {% include datetime.html date=page.last_modified_at tooltip=true lang=lang %} |
| 30 | + </span> |
40 | 31 | {% endif %} |
41 | | - {% endcapture %} |
42 | 32 |
|
43 | | - <div class="mt-3 mb-3"> |
44 | | - <img {{ src }} {{ class }} {{ alt }} w="1200" h="630" {{ lqip | strip }}> |
45 | | - {%- if page.image.alt -%} |
46 | | - <figcaption class="text-center pt-2 pb-2">{{ page.image.alt }}</figcaption> |
47 | | - {%- endif -%} |
48 | | - </div> |
49 | | - {% endif %} |
| 33 | + {% if page.image %} |
| 34 | + {% capture src %}src="{{ page.image.path | default: page.image }}"{% endcapture %} |
| 35 | + {% capture class %}class="preview-img{% if page.image.no_bg %}{{ ' no-bg' }}{% endif %}"{% endcapture %} |
| 36 | + {% capture alt %}alt="{{ page.image.alt | xml_escape | default: "Preview Image" }}"{% endcapture %} |
50 | 37 |
|
51 | | - <div class="d-flex justify-content-between"> |
52 | | - <!-- author(s) --> |
53 | | - <span> |
54 | | - {% if page.author %} |
55 | | - {% assign authors = page.author %} |
56 | | - {% elsif page.authors %} |
57 | | - {% assign authors = page.authors %} |
| 38 | + {% if page.image.lqip %} |
| 39 | + {%- capture lqip -%}lqip="{{ page.image.lqip }}"{%- endcapture -%} |
58 | 40 | {% endif %} |
59 | 41 |
|
60 | | - {{ site.data.locales[lang].post.written_by }} |
| 42 | + <div class="mt-3 mb-3"> |
| 43 | + <img {{ src }} {{ class }} {{ alt }} w="1200" h="630" {{ lqip }}> |
| 44 | + {%- if page.image.alt -%} |
| 45 | + <figcaption class="text-center pt-2 pb-2">{{ page.image.alt }}</figcaption> |
| 46 | + {%- endif -%} |
| 47 | + </div> |
| 48 | + {% endif %} |
61 | 49 |
|
62 | | - <em> |
63 | | - {% if authors %} |
64 | | - {% for author in authors %} |
65 | | - <a href="{{ site.data.authors[author].url }}">{{ site.data.authors[author].name }}</a> |
66 | | - {% unless forloop.last %}{{ '</em>, <em>' }}{% endunless %} |
67 | | - {% endfor %} |
68 | | - {% else %} |
69 | | - <a href="{{ site.social.links[0] }}">{{ site.social.name }}</a> |
| 50 | + <div class="d-flex justify-content-between"> |
| 51 | + <!-- author(s) --> |
| 52 | + <span> |
| 53 | + {% if page.author %} |
| 54 | + {% assign authors = page.author %} |
| 55 | + {% elsif page.authors %} |
| 56 | + {% assign authors = page.authors %} |
70 | 57 | {% endif %} |
71 | | - </em> |
72 | | - </span> |
73 | 58 |
|
74 | | - <!-- read time --> |
75 | | - {% include read-time.html content=content prompt=true lang=lang %} |
| 59 | + {{ site.data.locales[lang].post.written_by }} |
| 60 | + |
| 61 | + <em> |
| 62 | + {% if authors %} |
| 63 | + {% for author in authors %} |
| 64 | + <a href="{{ site.data.authors[author].url }}">{{ site.data.authors[author].name }}</a> |
| 65 | + {% unless forloop.last %}{{ '</em>, <em>' }}{% endunless %} |
| 66 | + {% endfor %} |
| 67 | + {% else %} |
| 68 | + <a href="{{ site.social.links[0] }}">{{ site.social.name }}</a> |
| 69 | + {% endif %} |
| 70 | + </em> |
| 71 | + </span> |
| 72 | + |
| 73 | + <!-- read time --> |
| 74 | + {% include read-time.html content=content prompt=true lang=lang %} |
| 75 | + </div> |
| 76 | + <!-- .d-flex --> |
76 | 77 | </div> |
77 | | - <!-- .d-flex --> |
| 78 | + <!-- .post-meta --> |
| 79 | + </header> |
| 80 | + |
| 81 | + <div class="content"> |
| 82 | + {{ content }} |
78 | 83 | </div> |
79 | | - <!-- .post-meta --> |
80 | | -</header> |
81 | | - |
82 | | -<div class="content"> |
83 | | - {{ content }} |
84 | | -</div> |
85 | | - |
86 | | -<div class="post-tail-wrapper text-muted"> |
87 | | - <!-- categories --> |
88 | | - {% if page.categories.size > 0 %} |
89 | | - <div class="post-meta mb-3"> |
90 | | - <i class="far fa-folder-open fa-fw me-1"></i> |
91 | | - {% for category in page.categories %} |
92 | | - <a href="{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/">{{ category }}</a> |
93 | | - {%- unless forloop.last -%},{%- endunless -%} |
94 | | - {% endfor %} |
95 | | - </div> |
96 | | - {% endif %} |
97 | | - |
98 | | - <!-- tags --> |
99 | | - {% if page.tags.size > 0 %} |
100 | | - <div class="post-tags"> |
101 | | - <i class="fa fa-tags fa-fw me-1"></i> |
102 | | - {% for tag in page.tags %} |
103 | | - <a |
104 | | - href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/" |
105 | | - class="post-tag no-text-decoration" |
106 | | - > |
107 | | - {{- tag -}} |
108 | | - </a> |
109 | | - {% endfor %} |
110 | | - </div> |
111 | | - {% endif %} |
112 | | - |
113 | | - <div |
114 | | - class=" |
115 | | - post-tail-bottom |
116 | | - d-flex justify-content-between align-items-center mt-5 pb-2 |
117 | | - " |
118 | | - > |
119 | | - <div class="license-wrapper"> |
120 | | - {% if site.data.locales[lang].copyright.license.template %} |
121 | | - {% capture _replacement %} |
| 84 | + |
| 85 | + <div class="post-tail-wrapper text-muted"> |
| 86 | + <!-- categories --> |
| 87 | + {% if page.categories.size > 0 %} |
| 88 | + <div class="post-meta mb-3"> |
| 89 | + <i class="far fa-folder-open fa-fw me-1"></i> |
| 90 | + {% for category in page.categories %} |
| 91 | + <a href="{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/">{{ category }}</a> |
| 92 | + {%- unless forloop.last -%},{%- endunless -%} |
| 93 | + {% endfor %} |
| 94 | + </div> |
| 95 | + {% endif %} |
| 96 | + |
| 97 | + <!-- tags --> |
| 98 | + {% if page.tags.size > 0 %} |
| 99 | + <div class="post-tags"> |
| 100 | + <i class="fa fa-tags fa-fw me-1"></i> |
| 101 | + {% for tag in page.tags %} |
| 102 | + <a |
| 103 | + href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/" |
| 104 | + class="post-tag no-text-decoration" |
| 105 | + > |
| 106 | + {{- tag -}} |
| 107 | + </a> |
| 108 | + {% endfor %} |
| 109 | + </div> |
| 110 | + {% endif %} |
| 111 | + |
| 112 | + <div |
| 113 | + class=" |
| 114 | + post-tail-bottom |
| 115 | + d-flex justify-content-between align-items-center mt-5 pb-2 |
| 116 | + " |
| 117 | + > |
| 118 | + <div class="license-wrapper"> |
| 119 | + {% if site.data.locales[lang].copyright.license.template %} |
| 120 | + {% capture _replacement %} |
122 | 121 | <a href="{{ site.data.locales[lang].copyright.license.link }}"> |
123 | 122 | {{ site.data.locales[lang].copyright.license.name }} |
124 | 123 | </a> |
125 | 124 | {% endcapture %} |
126 | 125 |
|
127 | | - {{ site.data.locales[lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }} |
128 | | - {% endif %} |
129 | | - </div> |
| 126 | + {{ site.data.locales[lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }} |
| 127 | + {% endif %} |
| 128 | + </div> |
130 | 129 |
|
131 | | - {% include post-sharing.html lang=lang %} |
| 130 | + {% include post-sharing.html lang=lang %} |
| 131 | + </div> |
| 132 | + <!-- .post-tail-bottom --> |
132 | 133 | </div> |
133 | | - <!-- .post-tail-bottom --> |
134 | | -</div> |
135 | | -<!-- div.post-tail-wrapper --> |
| 134 | + <!-- div.post-tail-wrapper --> |
| 135 | +</article> |
0 commit comments