From 78ccc7e7db5fca5a1ff9bb63ef64b015f3afb1f3 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Wed, 10 Dec 2025 15:09:47 +0500 Subject: feat: new pagination --- lib/partials.php | 58 +++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 11 deletions(-) (limited to 'lib/partials.php') diff --git a/lib/partials.php b/lib/partials.php index 2d6cd44..12aa23d 100644 --- a/lib/partials.php +++ b/lib/partials.php @@ -162,23 +162,59 @@ function html_navigation_search() function html_pagination(int $total_pages, int $current_page, string $redirect) { + if ($total_pages < 1) { + return; + } + if (str_contains($redirect, "?")) { $redirect .= "&p="; } else { $redirect .= "?p="; } - if ($total_pages > 1) { - echo '' ?> - '; } \ No newline at end of file -- cgit v1.2.3