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 +++++++++++++++++++++++++++++++++++++++++++++----------- static/style.css | 7 +++++++ 2 files changed, 54 insertions(+), 11 deletions(-) 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 diff --git a/static/style.css b/static/style.css index 08ec9ef..7cc782f 100644 --- a/static/style.css +++ b/static/style.css @@ -497,6 +497,13 @@ a.box:hover { vertical-align: middle; } +.pagination { + display: flex; + gap: 16px; + flex-direction: row; + justify-content: space-around; +} + /** --------------------------------- SOMETHING FROM TAILWINDCSS -- cgit v1.2.3