added frontend and made it usable
This commit is contained in:
1 parent
96408f00d8
commit
b9b15152bc
50 files changed
+7974
-1
No files matched your search
@@ -0,0 +1,24 @@
|
||||
{#
|
||||
Compact pager: first / previous / current / next / last — deliberately
|
||||
not a full list of page numbers, since result sets here can run into
|
||||
the hundreds of pages.
|
||||
|
||||
Params:
|
||||
currentPage, totalPages: integers
|
||||
routeName: the route to link back to
|
||||
routeParams: all params to preserve *except* `page` (e.g. category,
|
||||
q, when, lat, lon, range)
|
||||
#}
|
||||
{% if totalPages > 1 %}
|
||||
<nav class="pager" aria-label="Pagination">
|
||||
{% if currentPage > 1 %}
|
||||
<a href="{{ path(routeName, routeParams|merge({page: 1})) }}" aria-label="First page">« First</a>
|
||||
<a href="{{ path(routeName, routeParams|merge({page: currentPage - 1})) }}" aria-label="Previous page">‹ Prev</a>
|
||||
{% endif %}
|
||||
<span class="is-active">Page {{ currentPage }} of {{ totalPages }}</span>
|
||||
{% if currentPage < totalPages %}
|
||||
<a href="{{ path(routeName, routeParams|merge({page: currentPage + 1})) }}" aria-label="Next page">Next ›</a>
|
||||
<a href="{{ path(routeName, routeParams|merge({page: totalPages})) }}" aria-label="Last page">Last »</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
{% endif %}
|
||||
Reference in new issue
Block a user