web/_includes/post-nav.html

34 lines
877 B
HTML
Raw Normal View History

<!--
Navigation buttons at the bottom of the post.
v2.1
https://github.com/cotes2020/jekyll-theme-chirpy
© 2020 Cotes Chung
MIT License
-->
<div class="post-navigation d-flex justify-content-between">
{% if page.previous.url %}
<a href="{{ site.baseurl }}{{ page.previous.url }}" class="btn btn-outline-primary"
prompt="{{ site.data.label.post.button.previous | default: 'previous' }}">
<p>{{ page.previous.title }}</p>
</a>
{% else %}
<span class="btn btn-outline-primary disabled">
<p>-</p>
</span>
{% endif %}
{% if page.next.url %}
<a href="{{ site.baseurl }}{{page.next.url}}" class="btn btn-outline-primary"
prompt="{{ site.data.label.post.button.next | default: 'next' }}">
<p>{{ page.next.title }}</p>
</a>
{% else %}
<span class="btn btn-outline-primary disabled">
<p>-</p>
</span>
{% endif %}
</div>