diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2016-06-10 20:32:29 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2016-06-10 20:32:29 +0200 |
| commit | 994452c91ee9d1f6eb4aa6bc293e64a09f55c4b9 (patch) | |
| tree | e8adb1c3d4b7bb98c81a81152be061de1eaea11e /templates/index.html | |
| parent | 5dcefd3ffc2cc30a723fc31b2637eafb35e6468f (diff) | |
| download | jokevote-994452c91ee9d1f6eb4aa6bc293e64a09f55c4b9.tar.gz jokevote-994452c91ee9d1f6eb4aa6bc293e64a09f55c4b9.zip | |
fix last page being blank
Diffstat (limited to 'templates/index.html')
| -rw-r--r-- | templates/index.html | 2 |
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> |
