web/_includes/post-nav.html

35 lines
981 B
HTML
Raw Permalink Normal View History

<!-- Navigation buttons at the bottom of the post. -->
<nav class="post-navigation d-flex justify-content-between" aria-label="Post Navigation">
{% assign previous = site.data.locales[include.lang].post.button.previous %}
{% assign next = site.data.locales[include.lang].post.button.next %}
{% if page.previous.url %}
<a
href="{{ site.baseurl }}{{ page.previous.url }}"
class="btn btn-outline-primary"
aria-label="{{ previous }}"
>
<p>{{ page.previous.title }}</p>
</a>
{% else %}
<div class="btn btn-outline-primary disabled" aria-label="{{ previous }}">
<p>-</p>
</div>
{% endif %}
{% if page.next.url %}
<a
href="{{ site.baseurl }}{{page.next.url}}"
class="btn btn-outline-primary"
aria-label="{{ next }}"
>
<p>{{ page.next.title }}</p>
</a>
{% else %}
<div class="btn btn-outline-primary disabled" aria-label="{{ next }}">
<p>-</p>
</div>
{% endif %}
</nav>