From 4d9219586fb230095f97320e12a6cd95b39da5e7 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sat, 2 Dec 2023 01:38:07 +0100 Subject: [PATCH] PageIndexWidget: display current page on smartphones, too --- controllers/ViewPeople.php | 2 +- controllers/ViewPhotoAlbum.php | 2 +- controllers/ViewTimeline.php | 2 +- public/css/default.css | 22 +++++----------------- 4 files changed, 8 insertions(+), 20 deletions(-) diff --git a/controllers/ViewPeople.php b/controllers/ViewPeople.php index eeca876e..ee00b3bf 100644 --- a/controllers/ViewPeople.php +++ b/controllers/ViewPeople.php @@ -52,7 +52,7 @@ class ViewPeople extends HTMLController 'start' => $start, 'base_url' => BASEURL . '/people/', 'page_slug' => 'page/%PAGE%/', - 'index_class' => 'pagination-lg mt-5 justify-content-center', + 'index_class' => 'pagination-lg mt-5 justify-content-around justify-content-lg-center', ]); $this->page->adopt(new PageIndexWidget($pagination)); diff --git a/controllers/ViewPhotoAlbum.php b/controllers/ViewPhotoAlbum.php index 9f7c07eb..6524c86b 100644 --- a/controllers/ViewPhotoAlbum.php +++ b/controllers/ViewPhotoAlbum.php @@ -91,7 +91,7 @@ class ViewPhotoAlbum extends HTMLController 'start' => (isset($_GET['page']) ? $_GET['page'] - 1 : 0) * self::PER_PAGE, 'base_url' => BASEURL . '/' . (isset($_GET['tag']) ? $_GET['tag'] . '/' : ''), 'page_slug' => 'page/%PAGE%/', - 'index_class' => 'pagination-lg justify-content-center', + 'index_class' => 'pagination-lg justify-content-around justify-content-lg-center', ]); $this->page->adopt(new PageIndexWidget($index)); } diff --git a/controllers/ViewTimeline.php b/controllers/ViewTimeline.php index 72dfd763..d5dd9d39 100644 --- a/controllers/ViewTimeline.php +++ b/controllers/ViewTimeline.php @@ -46,7 +46,7 @@ class ViewTimeline extends HTMLController 'start' => (isset($_GET['page']) ? $_GET['page'] - 1 : 0) * self::PER_PAGE, 'base_url' => BASEURL . '/timeline/', 'page_slug' => 'page/%PAGE%/', - 'index_class' => 'pagination-lg justify-content-center', + 'index_class' => 'pagination-lg justify-content-around justify-content-lg-center', ]); $this->page->adopt(new PageIndexWidget($index)); } diff --git a/public/css/default.css b/public/css/default.css index fc9988a5..c119c9dc 100644 --- a/public/css/default.css +++ b/public/css/default.css @@ -81,29 +81,17 @@ a:hover { } @media (max-width: 767px) { - .pagination { - height: 52px; - display: block; - position: relative; - } .pagination .page-number, .pagination .page-padding { display: none; } .pagination .page-link { border-radius: var(--bs-pagination-border-radius) !important; } - .pagination > :first-child, .pagination > :last-child, .pagination .first-wildcard { - display: inline-block; - position: absolute; - } - .pagination > :first-child { - left: 0; - } - .pagination > .first-wildcard { - left: 48%; - } - .pagination > :last-child { - right: 0; + .pagination > :first-child, + .pagination > :last-child, + .pagination .first-wildcard, + .pagination .page-number.active { + display: inline-flex; } }