优化导航栏、分享海报等显示效果;优化代码及性能
This commit is contained in:
+9
-16
@@ -9,9 +9,8 @@
|
||||
<th:block th:replace="~{modules/header}" />
|
||||
|
||||
<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})}
|
||||
selectedTag = ${#lists.isEmpty(param.tag) ? null : param.tag[0]},
|
||||
friendPage = ${friends}
|
||||
">
|
||||
|
||||
<div class="blog_list">
|
||||
@@ -23,16 +22,16 @@
|
||||
<li>
|
||||
<!-- 全部按钮 -->
|
||||
<a th:attr="data-href=@{/friends}"
|
||||
th:classappend="${#strings.isEmpty(tag) ? 'active' : ''}" class="cat-link">
|
||||
th:classappend="${#strings.isEmpty(selectedTag) ? 'active' : ''}" class="cat-link">
|
||||
全部<span></span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- 遍历所有作者 -->
|
||||
<th:block th:each="author : ${authors}">
|
||||
<th:block th:each="authorLink : ${authors}">
|
||||
<li>
|
||||
<a th:attr="data-href=@{/friends(tag=${author})}"
|
||||
th:classappend="${#strings.equals(tag, author) ? 'active' : ''}"
|
||||
th:text="${author}" class="cat-link">
|
||||
<a th:attr="data-href=@{/friends(tag=${authorLink.spec.displayName})}"
|
||||
th:classappend="${#strings.equals(selectedTag, authorLink.spec.displayName) ? 'active' : ''}"
|
||||
th:text="${authorLink.spec.displayName}" class="cat-link">
|
||||
<span></span>
|
||||
</a>
|
||||
</li>
|
||||
@@ -115,14 +114,8 @@
|
||||
<!-- 分页:必须保持在 blog_list_inner 里面 -->
|
||||
<th:block th:if="${friendPage.totalPages>1}">
|
||||
<div id="t_pagination">
|
||||
<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})}"
|
||||
<div class="post-paging" th:if="${friendPage.hasNext()}">
|
||||
<a th:data="${friendPage.nextUrl}"
|
||||
th:text="${theme.config.base_set.site_page}">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user