Personal blog written from scratch using Node.js, Bootstrap, and MySQL. https://jrtechs.net
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.

52 lines
1.8 KiB

  1. {if pagination}
  2. <div class="row justify-content-center w-100">
  3. <div class="col-md-6 col-12">
  4. <nav aria-label="...">
  5. <ul class="pagination">
  6. {if pagination.previous}
  7. <li class="page-item">
  8. <a class="page-link" href="{pagination.previous.url}">
  9. Previous
  10. </a>
  11. </li>
  12. {else}
  13. <li class="page-item disabled">
  14. <span class="page-link">
  15. Previous
  16. </span>
  17. </li>
  18. {/if}
  19. {for page in pagination.pages}
  20. {if page.isCurrent}
  21. <li class="page-item active">
  22. <span class="page-link">
  23. {page.number}
  24. <span class="sr-only">(current)</span>
  25. </span>
  26. </li>
  27. {else}
  28. <li class="page-item">
  29. <a class="page-link" href="{page.url}">
  30. {page.number}
  31. </a>
  32. </li>
  33. {/if}
  34. {/for}
  35. {if pagination.next}
  36. <li class="page-item">
  37. <a class="page-link" href="{pagination.next.url}">
  38. Next
  39. </a>
  40. </li>
  41. {else}
  42. <li class="page-item disabled">
  43. <span class="page-link">
  44. Next
  45. </span>
  46. </li>
  47. {/if}
  48. </ul>
  49. </nav>
  50. </div>
  51. </div>
  52. {/if}