PR for review

This commit is contained in:
sørenpeter 2025-01-31 21:21:38 +01:00
parent 6e46dd04ae
commit 9a9a1bca9a
3 changed files with 8 additions and 8 deletions

View file

@ -359,7 +359,7 @@ article small a:hover {
min-width: 33%;
}
nav.pagnation {
nav.pagination {
display: flex;
justify-content: center;
padding: 0.5rem 0;
@ -406,18 +406,18 @@ nav.pagnation {
}
.pagnation {
.pagination {
display: flex;
justify-content: center;
margin: 1rem;
}
.pagnation a {
.pagination a {
text-decoration: none;
background-color: var(--accent-bg);
}
.pagnation strong {
.pagination strong {
padding: 0 1rem;
}

View file

@ -4,7 +4,7 @@ $maxTwts = $config['twts_per_page'] ?? 50; // Fallback number if twts_per_page n
$totalTwts = count($twts);
if ( ($maxTwts >= $totalTwts) || ($paginateTwts == false) ) {
if ( ($maxTwts >= $totalTwts) || ($paginateTwts === false) ) {
// echo "Only " . $totalTwts . " so no need for pagnation. (max: ". $maxTwts . ")<br>";
$paginateTwts = false;
@ -20,7 +20,7 @@ if ( ($maxTwts >= $totalTwts) || ($paginateTwts == false) ) {
$startingTwt = (($currentPage - 1) * $maxTwts);
$twts = array_slice($twts, $startingTwt, $maxTwts);
// Fingure out base URL for prev/next links
// Figure out base URL for prev/next links
$pageURL = $_SERVER['REQUEST_URI'];
//echo $pageURL."<hr>";

View file

@ -9,7 +9,7 @@
<?php
include_once 'partials/search.php';
include_once 'partials/pagnation.php';
include_once 'partials/pagination.php';
?>
@ -58,7 +58,7 @@ include_once 'partials/pagnation.php';
if ($paginateTwts) { ?>
<div class="pagnation">
<div class="pagination">
<?php if ($currentPage> 1) { ?>
<a href="<?= $pageURL . $currentPage- 1 ?>"><i class="fa fa-chevron-left" aria-hidden="true"></i> Previous</a>
<?php } else { ?>