mirror of
https://github.com/pawroman/zola-theme-terminimal
synced 2024-11-25 05:50:17 +00:00
Merge pull request #61 from rukai/fix_post_view_navigation
Fix postview navigation
This commit is contained in:
commit
74521c02b5
1 changed files with 26 additions and 24 deletions
|
@ -33,31 +33,33 @@
|
|||
|
||||
|
||||
{% macro earlier_later(page) %}
|
||||
{%- if config.extra.enable_post_view_navigation and 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 />
|
||||
{%- 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>
|
||||
</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>
|
||||
</div>
|
||||
{% endif -%}
|
||||
{% endif -%}
|
||||
{% endmacro earlier_later %}
|
||||
|
||||
|
|
Loading…
Reference in a new issue