aboutsummaryrefslogtreecommitdiff
path: root/templates/macros
diff options
context:
space:
mode:
Diffstat (limited to 'templates/macros')
-rw-r--r--templates/macros/paging.html16
1 files changed, 5 insertions, 11 deletions
diff --git a/templates/macros/paging.html b/templates/macros/paging.html
index 59ba617..840e8f4 100644
--- a/templates/macros/paging.html
+++ b/templates/macros/paging.html
@@ -1,10 +1,4 @@
-{% macro paging(url, page, max_page) %}
- {% if url is containing("?") %}
- {% set sign = "&" %}
- {% else %}
- {% set sign = "?" %}
- {% endif %}
-
+{% macro view(url, page, max_page) %}
<div class="g-Paging">
{% if page > 1 %}
<a
@@ -15,7 +9,7 @@
</a>
<a
class="g-Paging__Link g-Paging__Link--Active"
- href="{{ url }}{{ sign }}page={{ page - 1 }}"
+ href="{{ url | with_param("page", page - 1) }}"
>
</a>
@@ -33,13 +27,13 @@
{% if page < max_page %}
<a
class="g-Paging__Link g-Paging__Link--Active"
- href="{{ url }}{{ sign }}page={{ page + 1 }}"
+ href="{{ url | with_param("page", page + 1) }}"
>
</a>
<a
class="g-Paging__Link g-Paging__Link--Active"
- href="{{ url }}{{ sign }}page={{ max_page }}"
+ href="{{ url | with_param("page", max_page) }}"
>
❭❭
</a>
@@ -52,4 +46,4 @@
</span>
{% endif %}
</div>
-{% endmacro paging %}
+{% endmacro %}