新增页码跳转;修复异常;优化效果
This commit is contained in:
@@ -70,14 +70,32 @@
|
||||
<!-- 分页 -->
|
||||
<th:block th:if="${photoPage.hasPrevious()} or ${photoPage.hasNext()}">
|
||||
<div id="p_pagination">
|
||||
<div class="post-paging" th:if="${photoPage.hasNext()}"
|
||||
<div class="post-paging"
|
||||
th:with="_page = ${photoPage.page+1}">
|
||||
<a th:if="${#strings.isEmpty(tag)}"
|
||||
<a th:if="${photoPage.hasNext() and #strings.isEmpty(tag)}"
|
||||
th:data="@{/photos(page=${_page})}"
|
||||
th:text="${theme.config.base_set.site_page}"></a>
|
||||
<a th:unless="${#strings.isEmpty(tag)}"
|
||||
<a th:if="${photoPage.hasNext() and not #strings.isEmpty(tag)}"
|
||||
th:data="@{/photos(tag=${tag},page=${_page})}"
|
||||
th:text="${theme.config.base_set.site_page}"></a>
|
||||
<form class="page-jump-form" method="get" action="/photos">
|
||||
<span class="page-jump-label">转到</span>
|
||||
<input th:if="${not #strings.isEmpty(tag)}" type="hidden" name="tag" th:value="${tag}" />
|
||||
<span class="page-jump-input-wrap">
|
||||
<button class="page-jump-step page-jump-step-down" type="button"
|
||||
title="减少页码" aria-label="减少页码"><i class="ri-subtract-line"
|
||||
aria-hidden="true"></i></button>
|
||||
<input class="page-jump-input" type="number" name="page" min="1"
|
||||
th:max="${photoPage.totalPages}" th:value="${photoPage.page}"
|
||||
inputmode="numeric" aria-label="页码" autocomplete="off" required />
|
||||
<button class="page-jump-step page-jump-step-up" type="button"
|
||||
title="增加页码" aria-label="增加页码"><i class="ri-add-line"
|
||||
aria-hidden="true"></i></button>
|
||||
</span>
|
||||
<span class="page-jump-total">/ [[${photoPage.totalPages}]]</span>
|
||||
<button class="page-jump-submit" type="submit" title="跳转到指定页"
|
||||
aria-label="跳转到指定页"><i class="ri-arrow-right-line"></i></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</th:block>
|
||||
|
||||
Reference in New Issue
Block a user