make page list smaller to fit on smal devices

This commit is contained in:
Uwe Steinmann 2021-05-06 21:15:48 +02:00
parent ce84a8d9c8
commit 37192040e7

View File

@ -932,7 +932,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
function pageList($pageNumber, $totalPages, $baseURI, $params) { /* {{{ */
$maxpages = 25; // skip pages when more than this is shown
$range = 5; // pages left and right of current page
$range = 2; // pages left and right of current page
if (!is_numeric($pageNumber) || !is_numeric($totalPages) || $totalPages<2) {
return;
}
@ -948,8 +948,8 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
$first=false;
}
echo "<nav aria-label=\"pagination pagination-small\">";
echo "<ul class=\"pagination\">";
echo "<nav aria-label=\"pagination\">";
echo "<ul class=\"pagination pagination-sm\">";
if($totalPages <= $maxpages) {
for ($i = 1; $i <= $totalPages; $i++) {
echo "<li class=\"page-item".($i == $pageNumber ? ' active' : "" )."\"><a class=\"page-link\" href=\"".$resultsURI.($first ? "?" : "&")."pg=".$i."\">".$i."</a></li>";