refactor: extract pagination fragments
This commit is contained in:
+7
-14
@@ -33,19 +33,12 @@
|
||||
</th:block>
|
||||
</div>
|
||||
</article>
|
||||
<nav class="pagination" th:if="${archives.hasPrevious() || archives.hasNext()}">
|
||||
<div class="pagination-buttons">
|
||||
<span th:if="${archives.hasPrevious()}">
|
||||
<a data-pjax th:href="@{${archives.prevUrl}}" class="button prev inline">
|
||||
<span class="button-text" th:text="'< ' + #{page.pagination.prev}">< Prev</span>
|
||||
</a>
|
||||
</span>
|
||||
<span th:if="${archives.hasNext()}">
|
||||
<a data-pjax th:href="@{${archives.nextUrl}}" class="button inline next">
|
||||
<span class="button-text" th:text="#{page.pagination.next} + ' >'">Next ></span>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</nav>
|
||||
<th:block th:replace="~{modules/pagination :: page(
|
||||
hasPrevious=${archives.hasPrevious()},
|
||||
previousUrl=@{${archives.prevUrl}},
|
||||
hasNext=${archives.hasNext()},
|
||||
nextUrl=@{${archives.nextUrl}},
|
||||
previousClass=''
|
||||
)}"/>
|
||||
</th:block>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user