summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2016-06-10 20:32:29 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2016-06-10 20:32:29 +0200
commit994452c91ee9d1f6eb4aa6bc293e64a09f55c4b9 (patch)
treee8adb1c3d4b7bb98c81a81152be061de1eaea11e /templates
parent5dcefd3ffc2cc30a723fc31b2637eafb35e6468f (diff)
downloadjokevote-994452c91ee9d1f6eb4aa6bc293e64a09f55c4b9.tar.gz
jokevote-994452c91ee9d1f6eb4aa6bc293e64a09f55c4b9.zip
fix last page being blank
Diffstat (limited to 'templates')
-rw-r--r--templates/index.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/index.html b/templates/index.html
index 9e0b41b..dc75288 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -112,7 +112,7 @@
<div class="section center">
<ul class="pagination">
<li{% if currentpage==0 %} class="disabled"{% endif %}><a href="/page/{{ currentpage-1 }}"><i class="material-icons">chevron_left</i></a></li>
- {% for page in range(jokes|length//perpage+1) %}
+ {% for page in range((jokes|length/perpage)|round(0, 'ceil')|int) %}
<li{% if currentpage==loop.index0 %} class="active"{% endif %}><a href="/page/{{ loop.index0 }}">{{ loop.index }}</a></li>
{% endfor %}
<li{% if currentpage==loop.length-1 %} class="disabled"{% endif %}><a href="/page/{{ currentpage+1 }}"><i class="material-icons">chevron_right</i></a></li>