add category-tree
This commit is contained in:
parent
42de5a6d96
commit
0865e2de16
26
templates/categories.html
Normal file
26
templates/categories.html
Normal file
@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="https://www.thymeleaf.org" lang="zh-CN">
|
||||
|
||||
<th:block th:replace="~{modules/import}" />
|
||||
<body>
|
||||
<th:block th:replace="~{modules/header::goPage('home')}" />
|
||||
<main>
|
||||
|
||||
|
||||
<div class="main-content">
|
||||
|
||||
<li th:replace="~{modules/category-tree :: single(categories=${categories})}" />
|
||||
|
||||
</div>
|
||||
</main>
|
||||
<!-- ======= Footer ======= -->
|
||||
<th:block th:replace="~{modules/footer}" />
|
||||
<!-- End Footer -->
|
||||
<script th:src="@{/assets/js/script.js?v={version}(version=${theme.spec.version})}"></script>
|
||||
<script type="module"
|
||||
src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/ionicons/5.5.2/ionicons/ionicons.esm.js"></script>
|
||||
<script nomodule
|
||||
src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/ionicons/5.5.2/ioniconshttps://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/ionicons/5.5.2/ionicons/ionicons.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
11
templates/modules/category-tree.html
Normal file
11
templates/modules/category-tree.html
Normal file
@ -0,0 +1,11 @@
|
||||
<ul class="category-list" th:fragment="next (categories)">
|
||||
<li class="category-item" th:fragment="single (categories)" th:each="category : ${categories}">
|
||||
<a class="category-link" th:href="@{${category.status.permalink}}">
|
||||
<span class="category-name" th:text="${category.spec.displayName}"> </span>
|
||||
</a>
|
||||
<th:block th:if="${not #lists.isEmpty(category.children)}">
|
||||
<th:block th:replace="~{modules/category-tree :: next (categories=${category.children})}"></th:block>
|
||||
</th:block>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user