|
1234567891011121314151617181920212223242526 |
- - var pageNumbers = [];
- - for (var x = 1; x <= pageCount; x++) {
- - pageNumbers.push(x);
- - }
-
- nav(aria-label="Page navigation")
- ul(class="pagination pagination-lg justify-content-center")
- li(class="page-item", class=(pageNumber == 1 ? "disabled" : false))
- a(class="page-link", href=(pageNumber == 1 ? "javascript:void(0)" : paginationUrlFunction(pageNumber - 1)), aria-label="Previous")
- span(aria-hidden="true") «
- each x, xIndex in pageNumbers
- if (x >= (pageNumber - 4) && x <= (pageNumber + 4) || xIndex == 0 || xIndex == (pageNumbers.length - 1))
- li(class="page-item", class=(x == pageNumber ? "active" : false))
- a(class="page-link", href=(paginationUrlFunction(x))) #{x}
-
- if (x == 1 && pageNumber > 6)
- li(class="page-item disabled")
- a(class="page-link", href="javascript:void(0)") ...
-
- else if (x == (pageCount - 1) && pageNumber < (pageCount - 5))
- li(class="page-item disabled")
- a(class="page-link", href="javascript:void(0)") ...
-
- li(class="page-item", class=(pageNumber == pageCount ? "disabled" : false))
- a(class="page-link", href=(pageNumber == pageCount ? "javascript:void(0)" : paginationUrlFunction(pageNumber + 1)), aria-label="Next")
- span(aria-hidden="true") »
|