Add "pagination"

Items per page are just handled by hard offset instead of pages. That's
all we really need

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2023-08-06 00:17:45 -07:00
parent 3f5bb7959a
commit 4439e14b6b
5 changed files with 45 additions and 8 deletions

View File

@@ -15,6 +15,14 @@
<input type="submit" value="Search" />
</form>
</div>
{# pagination #}
{% if query['offset'] != 0 %}
<a href="{{prev_page}}">Prev</a>
{% endif %}
|
{% if posts|length == config.HTTP_RESULTS_PER_PAGE %}
<a href="{{next_page}}">Next</a>
{% endif %}
<table id="bans-table">
<thead>
<tr>
@@ -66,4 +74,11 @@
{% endfor %}
</table>
{# pagination #}
{% if query['offset'] != 0 %}
<a href="{{prev_page}}">Prev</a>
{% endif %}
|
{% if posts|length == config.HTTP_RESULTS_PER_PAGE %}
<a href="{{next_page}}">Next</a>
{% endif %}
{% endblock main %}