From 6c5d814a99edfdabb51564b46bbc0309e8d3414a Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Tue, 21 Mar 2023 23:12:47 +0100 Subject: [PATCH] PageIndexWidget: hide page numbers on smaller screens --- public/css/default.css | 26 ++++++++++++++++++++++++++ templates/PageIndexWidget.php | 4 ++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/public/css/default.css b/public/css/default.css index 93e7c58..5f61392 100644 --- a/public/css/default.css +++ b/public/css/default.css @@ -46,6 +46,32 @@ a:hover { border-color: #a40d0d; } +@media (max-width: 767px) { + .pagination { + box-shadow: none; + 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 { + box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); + display: inline-block; + position: absolute; + } + .pagination > :first-child { + left: 0; + } + .pagination > :last-child { + right: 0; + } +} + .btn { font-family: 'Coda', sans-serif; } diff --git a/templates/PageIndexWidget.php b/templates/PageIndexWidget.php index a10070e..4168db8 100644 --- a/templates/PageIndexWidget.php +++ b/templates/PageIndexWidget.php @@ -45,10 +45,10 @@ class PageIndexWidget extends Template if (!is_array($page)) echo ' -
  • ...
  • '; +
  • ...
  • '; else echo ' -
  • ', +
  • ', '', $page['index'], '
  • '; }