added frontend and made it usable

This commit is contained in:
Hendrik Behme committed 2026-08-15 14:50:42 +02:00
1 parent 96408f00d8
commit b9b15152bc
50 files changed
+7974 -1

No files matched your search

+24
View File
@@ -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 %}