Skip to content

Commit

Permalink
Merge pull request #61 from rukai/fix_post_view_navigation
Browse files Browse the repository at this point in the history
Fix postview navigation
  • Loading branch information
pawroman authored Jun 5, 2024
2 parents 0ced778 + cf114ec commit 74521c0
Showing 1 changed file with 26 additions and 24 deletions.
50 changes: 26 additions & 24 deletions templates/macros/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>&nbsp;
<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>&nbsp;
<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>&nbsp;
<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>&nbsp;
<span class="button__icon"></span>
</a>
</span>
{% endif -%}
</div>
</div>
{% endif -%}
{% endif -%}
{% endmacro earlier_later %}

Expand Down

0 comments on commit 74521c0

Please sign in to comment.