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.

44 lines
1.3 KiB

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