summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-02-06 13:16:47 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2017-02-06 13:16:47 +0100
commit67e8b1ff4b98ddd016a0f23e6589428d88026929 (patch)
tree7846d367a93decb9bf674b6fa0d94fa56e7d1fb8
parent362ed9111f5fd7962d58d3ad8cdbc60e50822547 (diff)
downloadjokevote-67e8b1ff4b98ddd016a0f23e6589428d88026929.tar.gz
jokevote-67e8b1ff4b98ddd016a0f23e6589428d88026929.zip
fix navigator loop errorHEADmaster
-rw-r--r--templates/index.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/index.html b/templates/index.html
index 137f3e9..3e8b914 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -186,7 +186,7 @@
{% for page in range((jokes|length/perpage)|round(0, 'ceil')|int) %}
<li{% if currentpage==loop.index0 %} class="active"{% endif %}><a href="/page/{{ loop.index0 }}{{ query() }}">{{ loop.index }}</a></li>
{% endfor %}
- <li{% if currentpage==loop.length-1 %} class="disabled"{% endif %}><a href="/page/{{ currentpage+1 }}{{ query() }}"><i class="material-icons">chevron_right</i></a></li>
+ <li{% if currentpage==((jokes|length/perpage)|round(0, 'ceil')|int)-1 %} class="disabled"{% endif %}><a href="/page/{{ currentpage+1 }}{{ query() }}"><i class="material-icons">chevron_right</i></a></li>
</ul>
</div> <!-- /pagination -->
{% endif %}