Add Article List pagination

main
Georg Krause 2019-05-16 14:01:33 +02:00
parent 89df2acac0
commit 1b3ffca867
2 changed files with 14 additions and 0 deletions

View File

@ -26,6 +26,9 @@
</section>
</article>
{% endfor %}
{% if articles_page.has_other_pages() %}
{% include 'pagination.html' %}
{% endif %}
</div>
</div>
</div>

View File

@ -0,0 +1,11 @@
{% if DEFAULT_PAGINATION %}
<p class="paginator is-center">
{% if articles_page.has_previous() %}
<a href="{{ SITEURL }}/{{ articles_previous_page.url }}">&laquo;</a>
{% endif %}
Page {{ articles_page.number }} | {{ articles_paginator.num_pages }}
{% if articles_page.has_next() %}
<a href="{{ SITEURL }}/{{ articles_next_page.url }}">&raquo;</a>
{% endif %}
</p>
{% endif %}