2019-09-30 20:38:41 +08:00
|
|
|
---
|
|
|
|
layout: default
|
|
|
|
# The posts' layout
|
|
|
|
---
|
|
|
|
|
2019-11-28 03:58:31 +08:00
|
|
|
<div class="row">
|
2019-09-30 20:38:41 +08:00
|
|
|
|
2019-12-31 23:17:27 +08:00
|
|
|
<div id="post-wrapper" class="col-12 col-lg-11 col-xl-8">
|
2020-02-22 07:16:58 +08:00
|
|
|
|
2019-11-28 01:59:01 +08:00
|
|
|
<div class="post pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4">
|
2020-02-22 07:16:58 +08:00
|
|
|
|
2019-09-30 20:38:41 +08:00
|
|
|
<h1 data-toc-skip>{{ page.title }}</h1>
|
2020-02-22 07:16:58 +08:00
|
|
|
|
2019-09-30 20:38:41 +08:00
|
|
|
<div class="post-meta text-muted d-flex flex-column">
|
2020-04-07 02:11:50 +08:00
|
|
|
<!-- Published date and author -->
|
2019-09-30 20:38:41 +08:00
|
|
|
<div>
|
2021-03-03 18:32:06 +08:00
|
|
|
<span class="semi-bold">
|
2021-03-20 22:37:10 +08:00
|
|
|
{{ page.author | default: site.social.name }}
|
2020-04-07 02:11:50 +08:00
|
|
|
</span>
|
2021-07-21 01:01:09 +08:00
|
|
|
{% capture _preposition %}{{ site.data.locales[site.lang].post.published | default: 'on' }}{% endcapture %}
|
|
|
|
{% include timeago.html date=page.date tooltip=true preposition=_preposition %}
|
2020-04-07 02:11:50 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
2020-12-17 15:17:21 +08:00
|
|
|
<!-- lastmod -->
|
|
|
|
{% if page.last_modified_at %}
|
|
|
|
<span>
|
2021-07-21 01:01:09 +08:00
|
|
|
{{ site.data.locales[site.lang].post.updated | default: 'Updated' }}
|
|
|
|
{% include timeago.html date=page.last_modified_at class="lastmod" tooltip=true %}
|
2020-12-17 15:17:21 +08:00
|
|
|
</span>
|
|
|
|
{% endif %}
|
2019-11-25 20:56:50 +08:00
|
|
|
|
2020-12-17 15:17:21 +08:00
|
|
|
<!-- read time -->
|
2021-07-21 01:01:09 +08:00
|
|
|
{% include read-time.html content=content prompt=true %}
|
2020-12-17 15:17:21 +08:00
|
|
|
|
|
|
|
<!-- page views -->
|
2021-04-06 14:05:55 +08:00
|
|
|
{% if site.google_analytics.pv.proxy_endpoint or site.google_analytics.pv.cache_path %}
|
2021-07-21 01:01:09 +08:00
|
|
|
<span id="pv" class="pageviews">
|
|
|
|
<i class="fas fa-spinner fa-spin fa-fw"></i>
|
|
|
|
</span>
|
|
|
|
{{ site.data.locales[site.lang].post.pageview_measure | default: "views" }}
|
2020-12-17 15:17:21 +08:00
|
|
|
{% endif %}
|
|
|
|
|
2019-09-30 20:38:41 +08:00
|
|
|
</div>
|
2019-11-25 20:56:50 +08:00
|
|
|
|
2019-09-30 20:38:41 +08:00
|
|
|
</div> <!-- .post-meta -->
|
|
|
|
|
|
|
|
<div class="post-content">
|
2020-09-20 17:58:52 +08:00
|
|
|
|
2021-01-29 19:10:39 +02:00
|
|
|
{% if page.image.src %}
|
2021-06-30 19:08:42 +08:00
|
|
|
<img src="{{ page.image.src }}"
|
|
|
|
class="preview-img"
|
|
|
|
alt="{{ page.image.alt | default: "Preview Image" }}"
|
|
|
|
{% if page.image.width %}width="{{ page.image.width }}"{% endif %}
|
|
|
|
{% if page.image.height %}height="{{ page.image.height }}"{% endif %}>
|
2019-12-24 01:36:49 +08:00
|
|
|
{% endif %}
|
2020-08-21 22:45:12 +08:00
|
|
|
|
2021-01-09 22:30:31 +08:00
|
|
|
{{ content }}
|
|
|
|
|
2019-11-24 17:38:41 +08:00
|
|
|
</div>
|
2019-09-30 20:38:41 +08:00
|
|
|
|
2020-02-17 03:01:48 +08:00
|
|
|
<div class="post-tail-wrapper text-muted">
|
|
|
|
|
2020-04-07 02:11:50 +08:00
|
|
|
<!-- categories -->
|
|
|
|
{% if page.categories.size > 0 %}
|
2021-07-21 01:01:09 +08:00
|
|
|
|
2020-04-07 02:11:50 +08:00
|
|
|
<div class="post-meta mb-3">
|
|
|
|
<i class="far fa-folder-open fa-fw mr-1"></i>
|
|
|
|
{% for category in page.categories %}
|
2020-12-11 23:05:36 +08:00
|
|
|
<a href='{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/'>{{ category }}</a>
|
2020-04-07 02:11:50 +08:00
|
|
|
{%- unless forloop.last -%}, {%- endunless -%}
|
|
|
|
{% endfor %}
|
2020-02-17 23:44:10 +08:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2020-04-07 02:11:50 +08:00
|
|
|
<!-- tags -->
|
2019-09-30 20:38:41 +08:00
|
|
|
{% if page.tags.size > 0 %}
|
2020-04-07 02:11:50 +08:00
|
|
|
<div class="post-tags">
|
|
|
|
<i class="fa fa-tags fa-fw mr-1"></i>
|
2019-09-30 20:38:41 +08:00
|
|
|
{% for tag in page.tags %}
|
2020-12-11 23:05:36 +08:00
|
|
|
<a href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/"
|
2019-09-30 20:38:41 +08:00
|
|
|
class="post-tag no-text-decoration" >
|
|
|
|
{{- tag -}}
|
2019-11-29 00:04:01 +08:00
|
|
|
</a>
|
2019-09-30 20:38:41 +08:00
|
|
|
{% endfor %}
|
2019-11-25 20:56:50 +08:00
|
|
|
</div>
|
2019-09-30 20:38:41 +08:00
|
|
|
{% endif %}
|
2020-02-17 03:01:48 +08:00
|
|
|
|
|
|
|
<div class="post-tail-bottom
|
2020-07-30 04:58:05 +08:00
|
|
|
d-flex justify-content-between align-items-center mt-3 pt-5 pb-2">
|
2020-02-17 03:01:48 +08:00
|
|
|
<div class="license-wrapper">
|
2021-07-21 01:01:09 +08:00
|
|
|
{% if site.data.locales[site.lang].copyright.license.template %}
|
|
|
|
{% capture _replacement %}
|
|
|
|
<a href="{{ site.data.locales[site.lang].copyright.license.link }}">
|
|
|
|
{{ site.data.locales[site.lang].copyright.license.name }}
|
|
|
|
</a>
|
|
|
|
{% endcapture %}
|
|
|
|
{{ site.data.locales[site.lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }}
|
|
|
|
{% else %}
|
|
|
|
<span class="text-muted small">{{ site.outdated }}</span>
|
2020-02-17 03:01:48 +08:00
|
|
|
{% endif %}
|
2021-07-21 01:01:09 +08:00
|
|
|
</div>
|
2020-02-17 03:01:48 +08:00
|
|
|
|
|
|
|
{% include post-sharing.html %}
|
|
|
|
|
|
|
|
</div><!-- .post-tail-bottom -->
|
|
|
|
|
2019-11-25 20:56:50 +08:00
|
|
|
</div><!-- div.post-tail -->
|
2019-09-30 20:38:41 +08:00
|
|
|
|
2019-11-27 17:08:54 +08:00
|
|
|
</div> <!-- .post -->
|
2020-02-17 03:01:48 +08:00
|
|
|
|
2020-07-30 04:58:05 +08:00
|
|
|
|
2019-12-31 23:17:27 +08:00
|
|
|
</div> <!-- #post-wrapper -->
|
2019-11-27 17:08:54 +08:00
|
|
|
|
2020-12-28 00:14:10 +08:00
|
|
|
{% assign enable_toc = false %}
|
|
|
|
|
|
|
|
{% if site.toc and page.toc %}
|
|
|
|
{% if content contains '<h2' or content contains '<h3' %}
|
|
|
|
{% assign enable_toc = true %}
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% include panel.html toc=enable_toc %}
|
2019-11-27 17:08:54 +08:00
|
|
|
|
|
|
|
</div> <!-- .row -->
|
|
|
|
|
2019-11-28 03:58:31 +08:00
|
|
|
<div class="row">
|
2020-07-30 04:58:05 +08:00
|
|
|
<div class="col-12 col-lg-11 col-xl-8">
|
|
|
|
<div id="post-extend-wrapper" class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4">
|
2020-02-17 03:01:48 +08:00
|
|
|
|
2020-07-30 04:58:05 +08:00
|
|
|
{% include related-posts.html %}
|
2019-09-30 20:38:41 +08:00
|
|
|
|
2020-07-30 04:58:05 +08:00
|
|
|
{% include post-nav.html %}
|
2019-11-27 17:08:54 +08:00
|
|
|
|
2020-07-30 04:58:05 +08:00
|
|
|
{% if site.disqus.comments and page.comments %}
|
|
|
|
{% include disqus.html %}
|
|
|
|
{% endif %}
|
2020-02-17 23:44:10 +08:00
|
|
|
|
2020-07-30 04:58:05 +08:00
|
|
|
</div> <!-- #post-extend-wrapper -->
|
2019-11-27 17:08:54 +08:00
|
|
|
|
2020-07-30 04:58:05 +08:00
|
|
|
</div> <!-- .col-* -->
|
2019-09-30 20:38:41 +08:00
|
|
|
|
2019-11-25 20:56:50 +08:00
|
|
|
</div> <!-- .row -->
|