web/_layouts/post.html

144 lines
4.1 KiB
HTML
Raw Normal View History

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