Make pagination padding clickable again #40

Merged
Roflin merged 3 commits from page-wildcards into master 2023-11-22 16:03:48 +01:00
2 changed files with 9 additions and 2 deletions
Showing only changes of commit f143b2ddcf - Show all commits

View File

@ -92,13 +92,16 @@ a:hover {
.pagination .page-link { .pagination .page-link {
border-radius: var(--bs-pagination-border-radius) !important; border-radius: var(--bs-pagination-border-radius) !important;
} }
.pagination > :first-child, .pagination > :last-child { .pagination > :first-child, .pagination > :last-child, .pagination .first-wildcard {
display: inline-block; display: inline-block;
position: absolute; position: absolute;
} }
.pagination > :first-child { .pagination > :first-child {
left: 0; left: 0;
} }
.pagination > .first-wildcard {
left: 48%;
}
.pagination > :last-child { .pagination > :last-child {
right: 0; right: 0;
} }

View File

@ -47,9 +47,13 @@ class PageIndexWidget extends Template
if (!is_array($page)) if (!is_array($page))
{ {
$first_wildcard = $num_wildcards === 0;
$num_wildcards++; $num_wildcards++;
echo ' echo '
<li class="page-item page-padding wildcard" onclick="javascript:promptGoToPage(', self::$unique_index_count, ')"><a class="page-link">...</a></li>'; <li class="page-item page-padding wildcard',
$first_wildcard ? ' first-wildcard' : '',
'" onclick="javascript:promptGoToPage(',
self::$unique_index_count, ')"><a class="page-link">...</a></li>';
} }
else else
echo ' echo '