選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

35 行
1.1KB

  1. extends layout
  2. block content
  3. h1(class="h2") Blocks
  4. hr
  5. if (blocks)
  6. nav(aria-label="Page navigation")
  7. ul(class="pagination justify-content-center")
  8. li(class="page-item", class=(sort == "asc" ? "active" : false))
  9. a(class="page-link", href=(sort == "asc" ? "javascript:void(0)" : "/blocks?limit=" + limit + "&offset=0" + "&sort=asc"))
  10. span(aria-hidden="true") Oldest blocks first
  11. li(class="page-item", class=(sort == "desc" ? "active" : false))
  12. a(class="page-link", href=(sort == "desc" ? "javascript:void(0)" : "/blocks?limit=" + limit + "&offset=0" + "&sort=desc"))
  13. span(aria-hidden="true") Newest blocks first
  14. include includes/blocks-list.pug
  15. hr
  16. if (blockCount > limit)
  17. - var pageNumber = offset / limit + 1;
  18. - var pageCount = Math.floor(blockCount / limit);
  19. - if (pageCount * limit < blockCount) {
  20. - pageCount++;
  21. - }
  22. - var paginationUrlFunction = function(x) {
  23. - return paginationBaseUrl + "?limit=" + limit + "&offset=" + ((x - 1) * limit + "&sort=" + sort);
  24. - }
  25. hr
  26. include includes/pagination.pug
  27. else
  28. p No blocks found