diff --git a/views/page.ejs b/views/page.ejs index 9bc485d..2edfdfa 100644 --- a/views/page.ejs +++ b/views/page.ejs @@ -18,26 +18,33 @@ omitLeft = omitRight = true; } } %> + + <% if (paginate.currPage !== 1) { %> <%= 1 %> + <% } %> + <% if (omitLeft) { %>
...
- <% - } - for (let i = paginate.currPage - leftCnt; i < paginate.currPage; i++) { %> + <% } %> + + <% for (let i = paginate.currPage - leftCnt; i < paginate.currPage; i++) { %> <%= i %> - <% - } - %> + <% } %> + <%= paginate.currPage %> + <% for (let i = paginate.currPage + 1; i <= paginate.currPage + rightCnt; i++) { %> <%= i %> - <% - } - if (omitRight) { - %> + <% } %> + + <% if (omitRight) { %>
...
<% } %> + + <% if (paginate.currPage !== paginate.pageCnt) { %> <%= paginate.pageCnt %> + <% } %> + href="<%= syzoj.utils.makeUrl(req, Object.assign(req.query, { page: paginate.currPage + 1 })) %>" <% } %>id="page_next">