From 39bad42f9c473c3d35aef948ce57dc7b3a43785e Mon Sep 17 00:00:00 2001 From: Jon Seager Date: Tue, 3 Feb 2026 12:17:07 +0000 Subject: [PATCH] feat(mobile): add infinite scroll and hide pagination on mobile Add IntersectionObserver-based infinite scroll for mobile viewports that fetches next pages as the user scrolls. Uses MutationObserver to re-attach after DOM replacements. Hide pagination controls on screens narrower than 768px. --- templates/base.html | 76 +++++++++++++++++++++++++++++++++++ templates/partials/table.html | 2 +- templates/styles.css | 4 ++ 3 files changed, 81 insertions(+), 1 deletion(-) diff --git a/templates/base.html b/templates/base.html index a523062..a6fea88 100644 --- a/templates/base.html +++ b/templates/base.html @@ -11,6 +11,82 @@ src="https://cdn.jsdelivr.net/gh/starfederation/datastar@1.0.0-RC.6/bundles/datastar.js" > {% block head %}{% endblock %} +
diff --git a/templates/partials/table.html b/templates/partials/table.html index de0b1ff..ba7b857 100644 --- a/templates/partials/table.html +++ b/templates/partials/table.html @@ -14,7 +14,7 @@ {% macro pagination_header(items, navigator, target_selector) %}
Showing {{ items.start_index() }}–{{ items.end_index() }} of {{ items.total }} diff --git a/templates/styles.css b/templates/styles.css index bd91bbb..e81e635 100644 --- a/templates/styles.css +++ b/templates/styles.css @@ -147,6 +147,10 @@ a { .responsive-table td.mobile-hidden { display: none; } + + .pagination-controls { + display: none; + } } /* Desktop: alternating cards with central line */