Skip to content

Commit

Permalink
fix: pagination should use post count instead of page count
Browse files Browse the repository at this point in the history
  • Loading branch information
eaCe committed Feb 2, 2024
1 parent 6ea582c commit e1f74c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fragments/neues/pagination.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</svg>
</a>
<?php else: ?>
<a class="page-link d-inline-flex align-items-center h-100" href="<?= $prevPage === $currentPage ? '#' : '?page=' . $prevPage ?>">
<a class="page-link d-inline-flex align-items-center h-100" href="<?= $prevPage === $currentPage ? '#' : '?page=' . $pager->getRowsPerPage() * $prevPage ?>">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/>
</svg>
Expand All @@ -51,7 +51,7 @@
</a>
<?php else: ?>
<a class="page-link <?= $currentPage === $i ? 'active' : '' ?>"
href="?page=<?= $page ?>">
href="?page=<?= $pager->getRowsPerPage() * $page ?>">
<?= $page + 1 ?>
</a>
<?php endif ?>
Expand All @@ -61,7 +61,7 @@
<!-- Next -->
<li class="page-item <?= $nextPage === $currentPage ? 'disabled' : '' ?>">
<a class="page-link d-inline-flex align-items-center h-100"
href="<?= $nextPage === $currentPage ? '#' : '?page=' . $nextPage ?>">
href="<?= $nextPage === $currentPage ? '#' : '?page=' . $pager->getRowsPerPage() * $nextPage ?>">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/>
</svg>
Expand Down

0 comments on commit e1f74c3

Please sign in to comment.