45 lines
2.0 KiB
HTML
45 lines
2.0 KiB
HTML
<th:block th:fragment="home-moment(_moments,tags,path)" th:with="_path = ${#strings.isEmpty(path) ? '/moments' : path}">
|
|
|
|
<div class="blog_list">
|
|
<div class="blog_list_inner" uk-height-viewport="offset-top: true">
|
|
<div class="moment_cat_nav">
|
|
<ul id="cat_nav_items">
|
|
<li><a th:data="@{${_path}}" class="" th:classappend="${#lists.isEmpty(param.tag) ? 'active' : ''}"
|
|
><span>全部</span></a>
|
|
</li>
|
|
<li th:each="tag,iStat : ${tags}">
|
|
<a th:data="@{${_path}(tag=${tag.name})}" class=""
|
|
th:classappend="${#lists.contains(param.tag, tag.name) ? 'active' : ''}"
|
|
><span>[[${tag.name}]]</span></a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div id="post_item" class="moment_list">
|
|
|
|
<th:block th:replace="~{macro/tpl/content-moment :: content-moment(${_moments.items})}"></th:block>
|
|
|
|
<th:block th:if="${#lists.isEmpty(_moments.items)}">
|
|
<th:block th:replace="~{macro/tpl/content-none}"/>
|
|
</th:block>
|
|
|
|
</div>
|
|
<th:block th:if="${_moments.totalPages>1}">
|
|
<div id="t_pagination">
|
|
<div class="post-paging" th:if="${_moments.hasNext()}"
|
|
th:with="tag = ${#lists.isEmpty(param.tag) ? null : param.tag[0]},_page = ${_moments.page+1}">
|
|
<a th:if="${#strings.isEmpty(tag)}"
|
|
th:data="@{${_path}(page=${_page})}"
|
|
th:text="${theme.config.base_set.site_page}"></a>
|
|
<a th:unless="${#strings.isEmpty(tag)}"
|
|
th:data="@{${_path}(tag=${tag},page=${_page})}"
|
|
th:text="${theme.config.base_set.site_page}"></a>
|
|
</div>
|
|
</div>
|
|
</th:block>
|
|
|
|
<div id="comment_form_reset"></div>
|
|
</div>
|
|
</div>
|
|
</th:block>
|