Don't insert an empty div on the index when there's no pages

main
Thomas Sileo 2022-11-30 20:11:20 +01:00
parent 436d5ccf1b
commit a68b3e7318
1 changed files with 10 additions and 8 deletions

View File

@ -39,15 +39,17 @@
{% endfor %} {% endfor %}
</div> </div>
<div class="box"> {% if has_previous_page or has_next_page %}
{% if has_previous_page %} <div class="box">
<a href="{{ url_for("index") }}?page={{ current_page - 1 }}">Previous</a> {% if has_previous_page %}
{% endif %} <a href="{{ url_for("index") }}?page={{ current_page - 1 }}">Previous</a>
{% endif %}
{% if has_next_page %} {% if has_next_page %}
<a href="{{ url_for("index") }}?page={{ current_page + 1 }}">Next</a> <a href="{{ url_for("index") }}?page={{ current_page + 1 }}">Next</a>
{% endif %} {% endif %}
</div> </div>
{% endif %}
{% else %} {% else %}
<div class="empty-state"> <div class="empty-state">