PageIndexWidget: display current page on smartphones, too

This commit is contained in:
Aaron van Geffen 2023-12-02 01:38:07 +01:00
parent efb35cfd6a
commit 4d9219586f
4 changed files with 8 additions and 20 deletions

View File

@ -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));

View File

@ -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));
}

View File

@ -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));
}

View File

@ -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;
}
}