mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-16 03:09:41 +08:00
定义主题为plus版,发行1.0.0版本
This commit is contained in:
parent
f0cf467bd2
commit
aec1cea48d
@ -1,7 +1,9 @@
|
|||||||
<div xmlns:th="https://www.thymeleaf.org" xmlns:tj="http://www.w3.org/1999/html"
|
<div xmlns:th="https://www.thymeleaf.org" xmlns:tj="http://www.w3.org/1999/html"
|
||||||
th:fragment="pagination (data, path)"
|
th:fragment="pagination (data, path)"
|
||||||
th:if="${data.totalPages > 1}"
|
th:if="${data.totalPages > 1}"
|
||||||
class="card card-transparent">
|
class="card card-transparent"
|
||||||
|
th:with="urlParamStr = ${#strings.substringAfter(data.prevUrl,'?')},
|
||||||
|
urlParams = ${urlParamStr == null ? '' : ('?' + urlParamStr)}">
|
||||||
<nav class="pagination" role="navigation" aria-label="pagination">
|
<nav class="pagination" role="navigation" aria-label="pagination">
|
||||||
<a th:href="${data.prevUrl}"
|
<a th:href="${data.prevUrl}"
|
||||||
th:class="'pagination-previous' + ${data.hasPrevious()?'':' is-invisible is-hidden-mobile'}">上一页</a>
|
th:class="'pagination-previous' + ${data.hasPrevious()?'':' is-invisible is-hidden-mobile'}">上一页</a>
|
||||||
@ -13,24 +15,24 @@
|
|||||||
<li th:each="index : ${#numbers.sequence(1, data.totalPages)}">
|
<li th:each="index : ${#numbers.sequence(1, data.totalPages)}">
|
||||||
<a
|
<a
|
||||||
th:class="'pagination-link' + ${data.page == index ? ' is-current': ''}"
|
th:class="'pagination-link' + ${data.page == index ? ' is-current': ''}"
|
||||||
th:href="@{${path+'/page/'} + ${index}}" th:text="${index}"></a>
|
th:href="@{${path+'/page/'} + ${index} + ${urlParams}}" th:text="${index}"></a>
|
||||||
</li>
|
</li>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:unless="${data.totalPages <= 9}"
|
<th:block th:unless="${data.totalPages <= 9}"
|
||||||
th:with="start = ${(data.page > 5) ? data.page - 2 : 1},
|
th:with="start = ${(data.page > 5) ? data.page - 2 : 1},
|
||||||
end = ${start + ((data.page > 5) ? ((data.page < data.totalPages - 4) ? 4 : 6) : ((data.page < data.totalPages - 4) ? 6 : 8))}">
|
end = ${start + ((data.page > 5) ? ((data.page < data.totalPages - 4) ? 4 : 6) : ((data.page < data.totalPages - 4) ? 6 : 8))}">
|
||||||
<th:block th:if="${data.page > 5}">
|
<th:block th:if="${data.page > 5}">
|
||||||
<li><a class="pagination-link" th:href="@{${path+'/page/1'}}" th:text="1"></a></li>
|
<li><a class="pagination-link" th:href="@{${path+'/page/1' + urlParams}}" th:text="1"></a></li>
|
||||||
<li><span class="pagination-ellipsis">…</span></li>
|
<li><span class="pagination-ellipsis">…</span></li>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
|
||||||
<li th:each="index : ${#numbers.sequence((end > data.totalPages) ? start - end + data.totalPages : start, (end > data.totalPages) ? data.totalPages : end)}"><a
|
<li th:each="index : ${#numbers.sequence((end > data.totalPages) ? start - end + data.totalPages : start, (end > data.totalPages) ? data.totalPages : end)}"><a
|
||||||
th:class="'pagination-link' + ${data.page == index ? ' is-current': ''}"
|
th:class="'pagination-link' + ${data.page == index ? ' is-current': ''}"
|
||||||
th:href="@{${path+'/page/'} + ${index}}" th:text="${index}"></a></li>
|
th:href="@{${path+'/page/'} + ${index} + ${urlParams}}" th:text="${index}"></a></li>
|
||||||
|
|
||||||
<th:block th:if="${data.page < data.totalPages - 4}">
|
<th:block th:if="${data.page < data.totalPages - 4}">
|
||||||
<li><span class="pagination-ellipsis">…</span></li>
|
<li><span class="pagination-ellipsis">…</span></li>
|
||||||
<li><a class="pagination-link" th:href="@{${path+'/page/'} + ${data.totalPages}}" th:text="${data.totalPages}"></a></li>
|
<li><a class="pagination-link" th:href="@{${path+'/page/'} + ${data.totalPages} + ${urlParams}}" th:text="${data.totalPages}"></a></li>
|
||||||
</th:block>
|
</th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<th:block xmlns:th="https://www.thymeleaf.org"
|
<th:block xmlns:th="https://www.thymeleaf.org"
|
||||||
th:insert="~{common/layout :: layout (title = ${title} + ' - ' + ${site.title}, canonical = @{/links}, content = ~{::content}, isPost = false)}"
|
th:insert="~{common/layout :: layout (title = ${title} + ' - ' + ${site.title}, canonical = @{/photos}, content = ~{::content}, isPost = false)}"
|
||||||
th:with="isPhotos = true">
|
th:with="isPhotos = true">
|
||||||
<th:block th:fragment="content">
|
<th:block th:fragment="content">
|
||||||
<div class="card card-content photos">
|
<div class="card card-content photos">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user