mirror of
https://github.com/sorenpeter/timeline.git
synced 2026-03-11 12:42:17 +00:00
PR for review
This commit is contained in:
parent
6e46dd04ae
commit
9a9a1bca9a
3 changed files with 8 additions and 8 deletions
|
|
@ -359,7 +359,7 @@ article small a:hover {
|
||||||
min-width: 33%;
|
min-width: 33%;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav.pagnation {
|
nav.pagination {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 0.5rem 0;
|
padding: 0.5rem 0;
|
||||||
|
|
@ -406,18 +406,18 @@ nav.pagnation {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.pagnation {
|
.pagination {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin: 1rem;
|
margin: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pagnation a {
|
.pagination a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
background-color: var(--accent-bg);
|
background-color: var(--accent-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.pagnation strong {
|
.pagination strong {
|
||||||
padding: 0 1rem;
|
padding: 0 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ $maxTwts = $config['twts_per_page'] ?? 50; // Fallback number if twts_per_page n
|
||||||
|
|
||||||
$totalTwts = count($twts);
|
$totalTwts = count($twts);
|
||||||
|
|
||||||
if ( ($maxTwts >= $totalTwts) || ($paginateTwts == false) ) {
|
if ( ($maxTwts >= $totalTwts) || ($paginateTwts === false) ) {
|
||||||
// echo "Only " . $totalTwts . " so no need for pagnation. (max: ". $maxTwts . ")<br>";
|
// echo "Only " . $totalTwts . " so no need for pagnation. (max: ". $maxTwts . ")<br>";
|
||||||
$paginateTwts = false;
|
$paginateTwts = false;
|
||||||
|
|
||||||
|
|
@ -20,7 +20,7 @@ if ( ($maxTwts >= $totalTwts) || ($paginateTwts == false) ) {
|
||||||
$startingTwt = (($currentPage - 1) * $maxTwts);
|
$startingTwt = (($currentPage - 1) * $maxTwts);
|
||||||
$twts = array_slice($twts, $startingTwt, $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'];
|
$pageURL = $_SERVER['REQUEST_URI'];
|
||||||
//echo $pageURL."<hr>";
|
//echo $pageURL."<hr>";
|
||||||
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include_once 'partials/search.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) { ?>
|
if ($paginateTwts) { ?>
|
||||||
|
|
||||||
<div class="pagnation">
|
<div class="pagination">
|
||||||
<?php if ($currentPage> 1) { ?>
|
<?php if ($currentPage> 1) { ?>
|
||||||
<a href="<?= $pageURL . $currentPage- 1 ?>"><i class="fa fa-chevron-left" aria-hidden="true"></i> Previous</a>
|
<a href="<?= $pageURL . $currentPage- 1 ?>"><i class="fa fa-chevron-left" aria-hidden="true"></i> Previous</a>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue