feat: boost pagination and sorting links with htmx

This commit is contained in:
fromme committed 2026-10-16 10:39:47 +02:00
1 parent 493a43d952
commit 13e5b6c3af
8 files changed
+37 -11

No files matched your search

+2 -2
View File
@@ -8,7 +8,7 @@
<select name="limit"
class="text-sm py-1 border-gray-300"
hx-get="{{ path(route, query|merge({(pageParameterName): 1})) }}"
hx-replace-url="{{ path(route, query|merge({(pageParameterName): 1})) }}"
hx-replace-url="true"
hx-target="body">
<option value="10"{% if numItemsPerPage == 10 %} selected{% endif %}>10 pro Seite</option>
<option value="20"{% if numItemsPerPage == 20 %} selected{% endif %}>20 pro Seite</option>
@@ -16,7 +16,7 @@
</select>
</div>
<div>
<nav class="relative z-0 inline-flex">
<nav class="relative z-0 inline-flex" hx-boost="true">
{% if pageCount > 1 %}
{% if first is defined and current != first %}
<a href="{{ path(route, query|merge({(pageParameterName): first})) }}" class="relative inline-flex items-center px-2 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium hover:bg-secondary hover:text-white">