refactor: extract pagination fragments
This commit is contained in:
+3
-18
@@ -25,24 +25,9 @@
|
||||
<button id="toc-toggle" class="toc-toggle" th:attr="aria-label=#{toc.hide}"></button>
|
||||
<div id="toc-content" class="toc-content"></div>
|
||||
</nav>
|
||||
<nav class="pagination">
|
||||
<div class="pagination-title">
|
||||
<span class="pagination-title-h" th:text="#{page.post.pagination}">READ OTHER POSTS</span>
|
||||
<hr/>
|
||||
</div>
|
||||
<div class="pagination-buttons" th:with="postCursor=${postFinder.cursor(post.metadata?.name)}">
|
||||
<span th:if="${postCursor.hasPrevious()}">
|
||||
<a data-pjax th:href="@{${postCursor.previous?.status?.permalink}}" class="button prev inline">
|
||||
<span class="button-text" th:text="|< ${postCursor.previous?.spec?.title}|">prevPost</span>
|
||||
</a>
|
||||
</span>
|
||||
<span th:if="${postCursor.hasNext()}">
|
||||
<a data-pjax th:href="@{${postCursor.next?.status?.permalink}}" class="button next inline">
|
||||
<span class="button-text" th:text="|${postCursor.next?.spec?.title} >|">nextPost</span>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</nav>
|
||||
<th:block th:replace="~{modules/pagination :: post(
|
||||
cursor=${postFinder.cursor(post.metadata?.name)}
|
||||
)}"/>
|
||||
<th:block
|
||||
th:replace="~{modules/comment :: comment(group = 'content.halo.run', kind = 'Post', name = ${post.metadata.name})}"
|
||||
th:if="${haloCommentEnabled}"/>
|
||||
|
||||
Reference in New Issue
Block a user