Files
halo-theme-whitespace/src/modules/category-tree.html
T
nxxy335 8e6dccbd09 feat: 插件适配页面与系统完善(v0.1.0)
- 修复 /categories、/tags 因变量为 List 误用 .items 导致的 500
- 新增 layout.html 布局契约,消除插件页面 fallback 警告
- 适配 plugin-moments / plugin-photos / plugin-links(含友链申请表单与 RSS 订阅页)
- 适配 halo-weread-plugin(书架页)、留言板单页模板
- 适配 plugin-extra-api 的代码高亮与暗色样式
- 修复暗黑模式评论区不可见(补充 color-scheme 与兜底样式)
- 更新元数据:作者暖心向阳335、版本 0.1.0、requires >=2.26.0
2026-09-28 16:50:09 +08:00

23 lines
765 B
HTML

<th:block th:fragment="category-tree(cats)">
<ul class="category-tree">
<li class="category-tree-item" th:each="cat : ${cats}">
<a th:href="@{${cat.status.permalink}}" class="category-tree-link">
<span class="category-tree-name" th:text="${cat.spec.displayName}">Category</span>
<span
class="category-tree-count"
th:text="${cat.postCount}"
th:if="${cat.postCount != null and cat.postCount > 0}"
>0</span
>
</a>
<th:block
th:if="${cat.children != null and !#lists.isEmpty(cat.children)}"
>
<th:block
th:replace="~{modules/category-tree :: category-tree(cats=${cat.children})}"
></th:block>
</th:block>
</li>
</ul>
</th:block>