Merge pull request #661 from anaggh/master

Fix pagination in blogx and alternative
This commit is contained in:
Diego Najar 2018-03-09 09:27:55 +01:00 committed by GitHub
commit 321225c6b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 31 additions and 39 deletions

View File

@ -169,7 +169,7 @@ class Theme {
public static function jquery($cdn=false) public static function jquery($cdn=false)
{ {
if ($cdn) { if ($cdn) {
return '<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>'; return '<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT" crossorigin="anonymous"></script>';
} }
return '<script src="'.DOMAIN_CORE_JS.'jquery.min.js'.'"></script>'.PHP_EOL; return '<script src="'.DOMAIN_CORE_JS.'jquery.min.js'.'"></script>'.PHP_EOL;
} }

View File

@ -28,7 +28,7 @@
<!-- Javascript --> <!-- Javascript -->
<?php <?php
echo Theme::js('js/jquery.min.js'); echo Theme::jquery();
echo Theme::js('js/bootstrap.min.js'); echo Theme::js('js/bootstrap.min.js');
?> ?>

File diff suppressed because one or more lines are too long

View File

@ -45,28 +45,26 @@
<!-- Pagination --> <!-- Pagination -->
<?php if (Paginator::amountOfPages()>1): ?> <?php if (Paginator::amountOfPages()>1): ?>
<div class="paginator"> <nav class="paginator" aria-label="Page navigation">
<nav aria-label="Page navigation"> <ul class="pagination flex-wrap justify-content-center">
<ul class="pagination justify-content-center">
<!-- Previuos button --> <!-- Previous button -->
<li class="page-item <?php if (Paginator::showNext()); echo 'disabled' ?>"> <li class="page-item <?php if (!Paginator::showPrev()) echo 'disabled' ?>">
<a class="page-link" href="<?php echo Paginator::prevPageUrl(); ?>" tabindex="-1">Previous</a> <a class="page-link" href="<?php echo Paginator::prevPageUrl() ?>" tabindex="-1">Previous</a>
</li> </li>
<!-- List of pages --> <!-- List of pages -->
<?php for ($i = 1; $i <= Paginator::amountOfPages(); $i++): ?> <?php for ($i = 1; $i <= Paginator::amountOfPages(); $i++): ?>
<li class="page-item <?php if ($i==Paginator::currentPage()); echo 'active' ?>"> <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> <a class="page-link" href="<?php echo Paginator::numberUrl($i) ?>"><?php echo $i ?></a>
</li> </li>
<?php endfor ?> <?php endfor ?>
<!-- Next button --> <!-- 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> <a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>">Next</a>
</li> </li>
</ul> </ul>
</nav> </nav>
</div>
<?php endif ?> <?php endif ?>

View File

@ -46,7 +46,7 @@
<!-- Javascript --> <!-- Javascript -->
<?php <?php
echo Theme::js('js/jquery.min.js'); echo Theme::jquery();
echo Theme::js('js/bootstrap.min.js'); echo Theme::js('js/bootstrap.min.js');
?> ?>

File diff suppressed because one or more lines are too long

View File

@ -35,10 +35,10 @@
<!-- Pagination --> <!-- Pagination -->
<?php if (Paginator::amountOfPages()>1): ?> <?php if (Paginator::amountOfPages()>1): ?>
<nav class="my-4" aria-label="Page navigation"> <nav class="my-4" aria-label="Page navigation">
<ul class="pagination"> <ul class="pagination flex-wrap">
<!-- Previuos button --> <!-- Previous button -->
<li class="page-item <?php if (Paginator::showNext()) echo 'disabled' ?>"> <li class="page-item <?php if (!Paginator::showPrev()) echo 'disabled' ?>">
<a class="page-link" href="<?php echo Paginator::prevPageUrl() ?>" tabindex="-1">Previous</a> <a class="page-link" href="<?php echo Paginator::prevPageUrl() ?>" tabindex="-1">Previous</a>
</li> </li>
@ -50,7 +50,7 @@
<?php endfor ?> <?php endfor ?>
<!-- Next button --> <!-- 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> <a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>">Next</a>
</li> </li>

View File

@ -38,7 +38,7 @@
<!-- Javascript --> <!-- Javascript -->
<?php <?php
echo Theme::js('js/jquery.min.js'); echo Theme::jquery();
echo Theme::js('js/bootstrap.min.js'); echo Theme::js('js/bootstrap.min.js');
echo Theme::js('js/highlight.min.js'); echo Theme::js('js/highlight.min.js');
?> ?>

File diff suppressed because one or more lines are too long