From f143b2ddcf8cddb6fb4c80c142eb6a7885ab303a Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Mon, 20 Nov 2023 22:27:57 +0100 Subject: [PATCH] PageIndexWidget: show first applicable wildcard link in responsive mode --- public/css/default.css | 5 ++++- templates/PageIndexWidget.php | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/public/css/default.css b/public/css/default.css index a0c2ccb..fc9988a 100644 --- a/public/css/default.css +++ b/public/css/default.css @@ -92,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 c20baac..70cbd65 100644 --- a/templates/PageIndexWidget.php +++ b/templates/PageIndexWidget.php @@ -47,9 +47,13 @@ class PageIndexWidget extends Template if (!is_array($page)) { + $first_wildcard = $num_wildcards === 0; $num_wildcards++; echo ' -
  • ...
  • '; +
  • ...
  • '; } else echo '