Fix pagination in blogx and alternative
This commit is contained in:
parent
1c2bd6497f
commit
ed15866770
|
@ -45,28 +45,26 @@
|
|||
|
||||
<!-- Pagination -->
|
||||
<?php if (Paginator::amountOfPages()>1): ?>
|
||||
<div class="paginator">
|
||||
<nav aria-label="Page navigation">
|
||||
<ul class="pagination justify-content-center">
|
||||
<nav class="paginator" aria-label="Page navigation">
|
||||
<ul class="pagination flex-wrap justify-content-center">
|
||||
|
||||
<!-- Previuos button -->
|
||||
<li class="page-item <?php if (Paginator::showNext()); echo 'disabled' ?>">
|
||||
<a class="page-link" href="<?php echo Paginator::prevPageUrl(); ?>" tabindex="-1">Previous</a>
|
||||
<!-- Previous button -->
|
||||
<li class="page-item <?php if (!Paginator::showPrev()) echo 'disabled' ?>">
|
||||
<a class="page-link" href="<?php echo Paginator::prevPageUrl() ?>" tabindex="-1">Previous</a>
|
||||
</li>
|
||||
|
||||
<!-- List of pages -->
|
||||
<?php for ($i = 1; $i <= Paginator::amountOfPages(); $i++): ?>
|
||||
<li class="page-item <?php if ($i==Paginator::currentPage()); echo 'active' ?>">
|
||||
<a class="page-link" href="<?php echo Paginator::numberUrl($i); ?>"><?php echo $i ?></a>
|
||||
<li class="page-item <?php if ($i==Paginator::currentPage()) echo 'active' ?>">
|
||||
<a class="page-link" href="<?php echo Paginator::numberUrl($i) ?>"><?php echo $i ?></a>
|
||||
</li>
|
||||
<?php endfor ?>
|
||||
|
||||
<!-- Next button -->
|
||||
<li class="page-item <?php if (Paginator::showPrev()); echo 'disabled' ?>">
|
||||
<a class="page-link" href="<?php echo Paginator::nextPageUrl(); ?>">Next</a>
|
||||
<li class="page-item <?php if (!Paginator::showNext()) echo 'disabled' ?>">
|
||||
<a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>">Next</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
|
|
|
@ -35,10 +35,10 @@
|
|||
<!-- Pagination -->
|
||||
<?php if (Paginator::amountOfPages()>1): ?>
|
||||
<nav class="my-4" aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
<ul class="pagination flex-wrap">
|
||||
|
||||
<!-- Previuos button -->
|
||||
<li class="page-item <?php if (Paginator::showNext()) echo 'disabled' ?>">
|
||||
<!-- Previous button -->
|
||||
<li class="page-item <?php if (!Paginator::showPrev()) echo 'disabled' ?>">
|
||||
<a class="page-link" href="<?php echo Paginator::prevPageUrl() ?>" tabindex="-1">Previous</a>
|
||||
</li>
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
|||
<?php endfor ?>
|
||||
|
||||
<!-- Next button -->
|
||||
<li class="page-item <?php if (Paginator::showPrev()) echo 'disabled' ?>">
|
||||
<li class="page-item <?php if (!Paginator::showNext()) echo 'disabled' ?>">
|
||||
<a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>">Next</a>
|
||||
</li>
|
||||
|
||||
|
|
Loading…
Reference in New Issue