ニジカもんすたぁ!! トップ・ページ https://nizika.monster
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

43 lines
1.5 KiB

  1. <div class="my-3">
  2. <nav class="d-flex justify-content-center" aria-label="...">
  3. <ul class="pagination">
  4. <?php if ($page > 1): ?>
  5. <li class="page-item">
  6. <a class="page-link" href="?p=1">|&lt;</a>
  7. </li>
  8. <?php else: ?>
  9. <li class="page-item disabled">
  10. <span class="page-link">|&lt;</span>
  11. </li>
  12. <?php endif ?>
  13. <?php for ($i = max (min ($page + 5, $pages_max) - 10, 1); $i < $page; ++$i): ?>
  14. <li class="page-item">
  15. <a class="page-link" href="?p=<?= $i ?>"> <?= $i ?></a>
  16. </li>
  17. <?php endfor ?>
  18. <li class="page-item active" aria-current="page">
  19. <span class="page-link"><?= $page ?></span>
  20. </li>
  21. <?php for ($i = $page + 1; $i <= min (max ($page - 5, 1) + 10, $pages_max); ++$i): ?>
  22. <li class="pages-item">
  23. <a class="page-link" href="?p=<?= $i ?>"> <?= $i ?></a>
  24. </li>
  25. <?php endfor ?>
  26. <?php if ($page < $pages_max): ?>
  27. <li class="page-item">
  28. <a class="page-link" href="?p=<?= $pages_max ?>">&gt;|</a>
  29. </li>
  30. <?php else: ?>
  31. <li class="page-item disabled">
  32. <span class="page-link">&gt;|</span>
  33. </li>
  34. <?php endif ?>
  35. </ul>
  36. </nav>
  37. </div>