2023-03-25 16:28:00 +08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<th:block xmlns:th="https://www.thymeleaf.org"
|
|
|
|
th:insert="~{common/layout :: layout (title = '分类 - ' + ${site.title}, canonical = @{/categories}, content = ~{::content}, isPost = false)}">
|
|
|
|
<th:block th:fragment="content" th:with="isEmpty = ${#lists.isEmpty(categories)}">
|
|
|
|
<div th:if="${isEmpty}" class="card card-empty">
|
2023-09-12 10:44:43 +08:00
|
|
|
<i class="ri-inbox-2-fill"></i>
|
2023-03-25 16:28:00 +08:00
|
|
|
还没有创建过分类,回<a th:href="${site.url}">主页</a>看看吧
|
|
|
|
</div>
|
|
|
|
<th:block th:unless="${isEmpty}">
|
|
|
|
<div class="card card-content">
|
|
|
|
<div class="card-tab">
|
|
|
|
<div>文章分类</div>
|
|
|
|
</div>
|
|
|
|
<ul class="menu-list">
|
|
|
|
<th:block th:replace="~{:: categories (${categories})}"/>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</th:block>
|
|
|
|
</th:block>
|
|
|
|
<th:block th:fragment="categories (categories)">
|
|
|
|
<li th:each="category : ${categories}">
|
|
|
|
<a class="level is-marginless" th:href="${category.status.permalink}">
|
|
|
|
<span class="level-item" th:text="${category.spec.displayName}"></span>
|
|
|
|
<span class="level-item tag" th:text="${category.status.postCount}"></span>
|
|
|
|
</a>
|
|
|
|
<ul th:if="${!#lists.isEmpty(category.children)}">
|
2023-05-05 10:27:06 +08:00
|
|
|
<th:block th:replace="~{:: categories (${category.children})}"/>
|
2023-03-25 16:28:00 +08:00
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</th:block>
|
|
|
|
</th:block>
|