优化阅读体验、前台编辑、播放器等
This commit is contained in:
+21
-11
@@ -8,7 +8,11 @@
|
||||
|
||||
<th:block th:replace="~{modules/header}" />
|
||||
|
||||
<div id="pjax-container">
|
||||
<div id="pjax-container" th:with="
|
||||
page = ${#lists.isEmpty(param.page) ? 1 : param.page[0]},
|
||||
tag = ${#lists.isEmpty(param.tag) ? null : param.tag[0]},
|
||||
friendPage = ${#strings.isEmpty(tag) ? (#lists.isEmpty(param.page) ? friends : friendFinder.list(page, friends.size)) : friendFinder.list({'page': page, 'size': friends.size, 'author': tag})}
|
||||
">
|
||||
|
||||
<div class="blog_list">
|
||||
<div class="blog_list_inner" uk-height-viewport="offset-top: true">
|
||||
@@ -19,15 +23,15 @@
|
||||
<li>
|
||||
<!-- 全部按钮 -->
|
||||
<a th:attr="data-href=@{/friends}"
|
||||
th:classappend="${#lists.isEmpty(param.author) ? 'active' : ''}" class="cat-link">
|
||||
th:classappend="${#strings.isEmpty(tag) ? 'active' : ''}" class="cat-link">
|
||||
全部<span></span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- 遍历所有作者 -->
|
||||
<th:block th:each="author : ${authors}">
|
||||
<li>
|
||||
<a th:attr="data-href=@{|/friends?author=${author}|}"
|
||||
th:classappend="${#strings.equals(param.author, author) ? 'active' : ''}"
|
||||
<a th:attr="data-href=@{/friends(tag=${author})}"
|
||||
th:classappend="${#strings.equals(tag, author) ? 'active' : ''}"
|
||||
th:text="${author}" class="cat-link">
|
||||
<span></span>
|
||||
</a>
|
||||
@@ -38,7 +42,7 @@
|
||||
|
||||
<div id="post_item" class="moment_list">
|
||||
|
||||
<div th:each="postInfo, iterstat: ${friends.items}" th:id="${'post-'+postInfo.metadata.name}"
|
||||
<div th:each="postInfo, iterstat: ${friendPage.items}" th:id="${'post-'+postInfo.metadata.name}"
|
||||
class="loop_content p_item moment_item uk-animation-slide-bottom-small"
|
||||
th:if="${postInfo.spec != null and not #strings.isEmpty(postInfo.spec.description)}"
|
||||
th:with="spec = ${postInfo.spec}">
|
||||
@@ -102,18 +106,24 @@
|
||||
</div>
|
||||
|
||||
<!-- 空数据 -->
|
||||
<th:block th:if="${#lists.isEmpty(friends.items)}">
|
||||
<th:block th:if="${#lists.isEmpty(friendPage.items)}">
|
||||
<th:block th:replace="~{macro/tpl/content-none}" />
|
||||
</th:block>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 分页:必须保持在 blog_list_inner 里面 -->
|
||||
<th:block th:if="${friends.totalPages>1}">
|
||||
<th:block th:if="${friendPage.totalPages>1}">
|
||||
<div id="t_pagination">
|
||||
<div class="post-paging" th:if="${friends.hasNext()}">
|
||||
<!-- 直接使用后端生成的完整 nextUrl -->
|
||||
<a th:data="${friends.nextUrl}" th:text="${theme.config.base_set.site_page}">
|
||||
<div class="post-paging" th:if="${friendPage.hasNext()}"
|
||||
th:with="_page = ${friendPage.page+1}">
|
||||
<a th:if="${#strings.isEmpty(tag)}"
|
||||
th:data="@{/friends(page=${_page})}"
|
||||
th:text="${theme.config.base_set.site_page}">
|
||||
</a>
|
||||
<a th:unless="${#strings.isEmpty(tag)}"
|
||||
th:data="@{/friends(tag=${tag},page=${_page})}"
|
||||
th:text="${theme.config.base_set.site_page}">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -131,4 +141,4 @@
|
||||
</div>
|
||||
</th:block>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user