summaryrefslogtreecommitdiff
path: root/templates/macros
diff options
context:
space:
mode:
authorjoak <joak@nospace.at>2020-08-17 11:55:24 +0200
committerjoak <joak@nospace.at>2020-08-17 11:55:24 +0200
commitf60e9ccd5b046101903a79bf6afa0cf87fdd956c (patch)
treedb29d0f55a1bc3347b63341551fa05308554101d /templates/macros
init
Diffstat (limited to 'templates/macros')
-rw-r--r--templates/macros/pagination.html15
1 files changed, 15 insertions, 0 deletions
diff --git a/templates/macros/pagination.html b/templates/macros/pagination.html
new file mode 100644
index 0000000..077cc5a
--- /dev/null
+++ b/templates/macros/pagination.html
@@ -0,0 +1,15 @@
+{% macro render_pagination(pagination) %}
+ <div class="pagination">
+ {% if pagination.has_prev %}
+ <a href="{{ pagination.prev|url }}">&laquo; Previous</a>
+ {% else %}
+ <span class="disabled">&laquo; Previous</span>
+ {% endif %}
+ | {{ pagination.page }} |
+ {% if pagination.has_next %}
+ <a href="{{ pagination.next|url }}">Next &raquo;</a>
+ {% else %}
+ <span class="disabled">Next &raquo;</span>
+ {% endif %}
+ </div>
+{% endmacro %}