diff --git a/public/css/default.css b/public/css/default.css index e0815849..fc9988a5 100644 --- a/public/css/default.css +++ b/public/css/default.css @@ -74,6 +74,10 @@ a:hover { .pagination .page-item { box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3); + white-space: nowrap; +} +.pagination .wildcard { + cursor: pointer; } @media (max-width: 767px) { @@ -88,13 +92,16 @@ a:hover { .pagination .page-link { 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; position: absolute; } .pagination > :first-child { left: 0; } + .pagination > .first-wildcard { + left: 48%; + } .pagination > :last-child { right: 0; } diff --git a/templates/PageIndexWidget.php b/templates/PageIndexWidget.php index 8e004907..70cbd654 100644 --- a/templates/PageIndexWidget.php +++ b/templates/PageIndexWidget.php @@ -11,6 +11,8 @@ class PageIndexWidget extends Template private $index; private string $class; + private static $unique_index_count = 0; + public function __construct(PageIndex $index) { $this->index = $index; @@ -37,14 +39,22 @@ class PageIndexWidget extends Template '', '« previous'; + $num_wildcards = 0; foreach ($page_index as $key => $page) { if (!is_numeric($key)) continue; if (!is_array($page)) + { + $first_wildcard = $num_wildcards === 0; + $num_wildcards++; echo ' -