Only show post pagination if there are previous or next posts
This commit is contained in:
parent
4548f70ee5
commit
58662946cd
1 changed files with 14 additions and 12 deletions
|
@ -1,12 +1,14 @@
|
||||||
<nav class="pagination">
|
{% if page.previous or page.next %}
|
||||||
{% if page.previous %}
|
<nav class="pagination">
|
||||||
<a href="{{ base_path }}{{ page.previous.url }}" class="pagination--pager" title="{{ page.previous.title | markdownify | strip_html }}">{{ site.data.ui-text[site.locale].pagination_previous }}</a>
|
{% if page.previous %}
|
||||||
{% else %}
|
<a href="{{ base_path }}{{ page.previous.url }}" class="pagination--pager" title="{{ page.previous.title | markdownify | strip_html }}">{{ site.data.ui-text[site.locale].pagination_previous }}</a>
|
||||||
<a href="#" class="pagination--pager disabled">{{ site.data.ui-text[site.locale].pagination_previous }}</a>
|
{% else %}
|
||||||
{% endif %}
|
<a href="#" class="pagination--pager disabled">{{ site.data.ui-text[site.locale].pagination_previous }}</a>
|
||||||
{% if page.next %}
|
{% endif %}
|
||||||
<a href="{{ base_path }}{{ page.next.url }}" class="pagination--pager" title="{{ page.next.title | markdownify | strip_html }}">{{ site.data.ui-text[site.locale].pagination_next }}</a>
|
{% if page.next %}
|
||||||
{% else %}
|
<a href="{{ base_path }}{{ page.next.url }}" class="pagination--pager" title="{{ page.next.title | markdownify | strip_html }}">{{ site.data.ui-text[site.locale].pagination_next }}</a>
|
||||||
<a href="#" class="pagination--pager disabled">{{ site.data.ui-text[site.locale].pagination_next }}</a>
|
{% else %}
|
||||||
{% endif %}
|
<a href="#" class="pagination--pager disabled">{{ site.data.ui-text[site.locale].pagination_next }}</a>
|
||||||
</nav>
|
{% endif %}
|
||||||
|
</nav>
|
||||||
|
{% endif %}
|
Loading…
Reference in a new issue