krata/_layouts/post.html

153 lines
3.9 KiB
HTML
Raw Normal View History

2019-09-30 14:38:41 +02:00
---
2021-12-01 14:48:57 +01:00
layout: page
2021-12-13 14:55:19 +01:00
refactor: true
panel_includes:
2021-12-01 14:48:57 +01:00
- toc
tail_includes:
- related-posts
- post-nav
2021-12-10 14:12:52 +01:00
- comments
2019-09-30 14:38:41 +02:00
---
{% include lang.html %}
2021-12-01 14:48:57 +01:00
<h1 data-toc-skip>{{ page.title }}</h1>
<div class="post-meta text-muted">
<!-- published date -->
<span>
{{ site.data.locales[lang].post.posted }}
{% include datetime.html date=page.date tooltip=true %}
</span>
<!-- lastmod date -->
{% if page.last_modified_at %}
<span>
{{ site.data.locales[lang].post.updated }}
{% include datetime.html date=page.last_modified_at tooltip=true %}
</span>
2021-12-04 19:29:40 +01:00
{% endif %}
{% if page.image.path %}
{% capture bg %}
{% unless page.image.no_bg %}{{ 'bg' }}{% endunless %}
{% endcapture %}
<div class="mt-3 mb-3">
<img src="{{ page.image.path }}" class="preview-img {{ bg | strip }}"
alt="{{ page.image.alt | default: "Preview Image" }}"
{% if page.image.width %}
width="{{ page.image.width }}"
{% elsif page.image.w %}
width="{{ page.image.w }}"
{% endif %}
{% if page.image.height %}
height="{{ page.image.height }}"
{% elsif page.image.h %}
height="{{ page.image.h }}"
{% endif %}>
{% if page.image.alt %}
<figcaption class="text-center pt-2 pb-2">{{ page.image.alt }}</figcaption>
{% endif %}
</div>
{% endif %}
2021-12-01 14:48:57 +01:00
<div class="d-flex justify-content-between">
<!-- author(s) -->
<span>
{% if page.author %}
{% assign authors = page.author %}
{% elsif page.authors %}
{% assign authors = page.authors %}
{% endif %}
2021-12-01 14:48:57 +01:00
{{ site.data.locales[lang].post.written_by }}
<em>
{% if authors %}
{% for author in authors %}
<a href="{{ site.data.authors[author].url }}">{{ site.data.authors[author].name }}</a>
{% unless forloop.last %}</em>, <em>{% endunless %}
{% endfor %}
{% else %}
<a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>
{% endif %}
</em>
</span>
2021-12-01 14:48:57 +01:00
<div>
<!-- page views -->
{% if site.google_analytics.pv.proxy_endpoint or site.google_analytics.pv.cache_path %}
<span>
<em id="pv" class="pageviews">
<i class="fas fa-spinner fa-spin fa-fw"></i>
</em>
{{ site.data.locales[lang].post.pageview_measure }}
2021-12-01 14:48:57 +01:00
</span>
{% endif %}
<!-- read time -->
{% include read-time.html content=content prompt=true %}
</div>
2021-12-01 14:48:57 +01:00
</div> <!-- .d-flex -->
2021-12-01 14:48:57 +01:00
</div> <!-- .post-meta -->
<div class="post-content">
{{ content }}
</div>
2019-11-27 10:08:54 +01:00
2021-12-01 14:48:57 +01:00
<div class="post-tail-wrapper text-muted">
2021-12-01 14:48:57 +01:00
<!-- categories -->
{% if page.categories.size > 0 %}
<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>
{%- unless forloop.last -%}, {%- endunless -%}
{% endfor %}
</div>
{% endif %}
<!-- tags -->
{% if page.tags.size > 0 %}
<div class="post-tags">
<i class="fa fa-tags fa-fw mr-1"></i>
{% for tag in page.tags %}
<a href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/"
class="post-tag no-text-decoration" >
{{- tag -}}
</a>
{% endfor %}
</div>
{% endif %}
2019-09-30 14:38:41 +02:00
2021-12-01 14:48:57 +01:00
<div class="post-tail-bottom
d-flex justify-content-between align-items-center mt-3 pt-5 pb-2">
<div class="license-wrapper">
2019-11-27 10:08:54 +01:00
2021-12-01 14:48:57 +01:00
{% if site.data.locales[lang].copyright.license.template %}
{% capture _replacement %}
<a href="{{ site.data.locales[lang].copyright.license.link }}">
{{ site.data.locales[lang].copyright.license.name }}
</a>
{% endcapture %}
{{ site.data.locales[lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }}
{% endif %}
</div>
2021-12-01 14:48:57 +01:00
{% include post-sharing.html %}
2019-11-27 10:08:54 +01:00
2021-12-01 14:48:57 +01:00
</div><!-- .post-tail-bottom -->
2019-09-30 14:38:41 +02:00
2021-12-01 14:48:57 +01:00
</div><!-- div.post-tail-wrapper -->