Files
halo-theme-pix/templates/macro/home-blog.html
T
2026-03-10 17:17:32 +08:00

44 lines
2.3 KiB
HTML

<th:block th:fragment="home-blog(_posts,path)">
<div class="normal_list">
<div class="normal_list_inner" uk-height-viewport="offset-top: true">
<div class="posts_cat_nav">
<ul id="cat_nav_items">
<li><a th:data="|${path}?preview-theme=theme-pix|" class="active">全部<span></span></a>
</li>
<li th:if="${theme.config.post.post_nav == 'category'}" th:each="categoryItem,iStat : ${categoryFinder.listAll()}">
<a th:data="|${categoryItem.status.permalink}?preview-theme=theme-pix|"
class="">[[${categoryItem.spec.displayName}]]<span></span></a>
</li>
<li th:if="${theme.config.post.post_nav == 'custom_category'}"
th:each="category : ${theme.config.post.nav_category}">
<th:block th:with="categoryItem = ${categoryFinder.getByName(category)}">
<a th:if="${categoryItem!=null}"
th:data="|${categoryItem.status.permalink}?preview-theme=theme-pix|"
class="">[[${categoryItem.spec.displayName}]]<span></span>
</a>
</th:block>
</li>
</ul>
</div>
<div id="post_item" class="norpost_list " th:with='postItems=${_posts.items}'
th:classappend="${theme.config.post.post_list_type == 'grid' ? 'uk-grid-small uk-grid' : ''}">
<th:block th:replace="~{'macro/tpl/content-post'}"></th:block>
</div>
<th:block th:if="${_posts.totalPages>1}">
<div id="pagination">
<div class="post-paging" th:if="${_posts.hasNext()}"
th:with="_page = ${_posts.page+1},_path = ${path == '/archives' ? path+'?preview-theme=theme-pix&page='+_page : path +'page/'+_page+'?preview-theme=theme-pix' }">
<a th:data="${_path}" th:text="${theme.config.base_set.site_page}"></a>
</div>
</div>
</th:block>
<div id="comment_form_reset">
</div>
</div>
</div>
</th:block>