2023-08-02 20:49:04 +02:00
|
|
|
{% macro content(page, summary, show_only_description) %}
|
|
|
|
{%- if show_only_description %}
|
|
|
|
<div class="post-content">
|
|
|
|
{{ page.description | safe }}
|
|
|
|
</div>
|
|
|
|
{% elif summary and page.summary %}
|
2019-02-05 19:27:02 +01:00
|
|
|
<div class="post-content">
|
|
|
|
{{ page.summary | safe }}
|
|
|
|
</div>
|
|
|
|
<div>
|
2019-02-05 22:00:19 +01:00
|
|
|
<!-- ︎ -- force text style - some devices render this as emoji -->
|
2019-04-03 19:21:19 +02:00
|
|
|
<a class="read-more button" href="{{ page.permalink | safe }}">
|
2019-02-05 23:13:39 +01:00
|
|
|
<span class="button__text">Read more</span>
|
|
|
|
<span class="button__icon">↩︎</span>
|
|
|
|
</a>
|
2019-02-05 19:27:02 +01:00
|
|
|
</div>
|
|
|
|
{% else %}
|
2023-12-18 21:22:27 +01:00
|
|
|
{#- full content -#}
|
2019-02-05 19:27:02 +01:00
|
|
|
<div class="post-content">
|
|
|
|
{{ page.content | safe }}
|
|
|
|
</div>
|
|
|
|
{%- endif %}
|
|
|
|
{% endmacro content %}
|
|
|
|
|
|
|
|
|
|
|
|
{% macro date(page) %}
|
|
|
|
<span class="post-date">
|
|
|
|
{%- if page.date %}
|
|
|
|
{{ page.date | date(format="%Y-%m-%d") }}
|
|
|
|
{% endif -%}
|
|
|
|
</span>
|
|
|
|
{% endmacro post_date %}
|
|
|
|
|
|
|
|
|
|
|
|
{% macro earlier_later(page) %}
|
2024-05-04 04:20:58 +02:00
|
|
|
{%- if config.extra.enable_post_view_navigation %}
|
|
|
|
{%- if page.lower or page.higher %}
|
|
|
|
<div class="pagination">
|
|
|
|
<div class="pagination__title">
|
|
|
|
<span class="pagination__title-h">{{ config.extra.post_view_navigation_prompt }}</span>
|
|
|
|
<hr />
|
|
|
|
</div>
|
|
|
|
<div class="pagination__buttons">
|
|
|
|
{%- if page.higher %}
|
|
|
|
<span class="button previous">
|
|
|
|
<a href="{{ page.higher.permalink | safe }}">
|
|
|
|
<span class="button__icon">←</span>
|
|
|
|
<span class="button__text">{{ page.higher.title }}</span>
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
{% endif %}
|
|
|
|
{% if page.lower %}
|
|
|
|
<span class="button next">
|
|
|
|
<a href="{{ page.lower.permalink | safe }}">
|
|
|
|
<span class="button__text">{{ page.lower.title }}</span>
|
|
|
|
<span class="button__icon">→</span>
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
{% endif -%}
|
|
|
|
</div>
|
2019-02-05 19:27:02 +01:00
|
|
|
</div>
|
2024-05-04 04:20:58 +02:00
|
|
|
{% endif -%}
|
2019-02-05 19:27:02 +01:00
|
|
|
{% endif -%}
|
|
|
|
{% endmacro earlier_later %}
|
|
|
|
|
|
|
|
|
|
|
|
{% macro header(page) %}
|
2019-04-03 19:21:19 +02:00
|
|
|
<h1 class="post-title"><a href="{{ page.permalink | safe }}">{{ page.title }}</a></h1>
|
2019-02-05 19:27:02 +01:00
|
|
|
<div class="post-meta-inline">
|
|
|
|
{{ post_macros::date(page=page) }}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{ post_macros::tags(page=page) }}
|
|
|
|
{% endmacro header %}
|
|
|
|
|
|
|
|
|
|
|
|
{% macro list_posts(pages) %}
|
|
|
|
<ul>
|
|
|
|
{%- for page in pages %}
|
2019-03-02 12:49:42 +01:00
|
|
|
{%- if page.draft %}
|
|
|
|
{% continue %}
|
|
|
|
{% endif -%}
|
2019-02-05 19:27:02 +01:00
|
|
|
<li class="post-list">
|
2019-04-03 19:21:19 +02:00
|
|
|
<a href="{{ page.permalink | safe }}">
|
2019-02-05 19:27:02 +01:00
|
|
|
<span class="post-date">{{ page.date }}</span>
|
|
|
|
:: <span class="post-list-title">{{ page.title }}</span></a>
|
|
|
|
{{ post_macros::tags(page=page, short=true) }}
|
|
|
|
</li>
|
|
|
|
{% endfor -%}
|
|
|
|
</ul>
|
|
|
|
{% endmacro list_posts %}
|
|
|
|
|
|
|
|
|
|
|
|
{% macro tags(page, short=false) %}
|
|
|
|
{%- if page.taxonomies and page.taxonomies.tags %}
|
|
|
|
<span class="post-tags-inline">
|
|
|
|
{%- if short %}
|
|
|
|
::
|
|
|
|
{%- set sep = "," -%}
|
|
|
|
{% else %}
|
|
|
|
:: tags:
|
|
|
|
{%- set sep = " " -%}
|
|
|
|
{% endif -%}
|
2023-04-23 22:17:03 +02:00
|
|
|
{%- for tag in page.taxonomies.tags | sort | unique(case_sensitive=false) %}
|
2019-04-03 19:21:19 +02:00
|
|
|
<a class="post-tag" href="{{ get_taxonomy_url(kind='tags', name=tag) | safe }}">#{{ tag }}</a>
|
2019-02-05 19:27:02 +01:00
|
|
|
{%- if not loop.last %}{{ sep | safe }}{% endif -%}
|
|
|
|
{% endfor -%}
|
|
|
|
</span>
|
|
|
|
{% endif -%}
|
|
|
|
{% endmacro tags %}
|