Files
theme-earth/templates/modules/category-tree.html
Ryan Wang ed652815b9 refactor: improve ui (#153)
优化整体的 UI 和布局。

```release-note
None
```
2024-07-08 09:05:23 +00:00

20 lines
986 B
HTML

<ul th:fragment="next (categories)" class="my-3 ml-3 space-y-1 border-l pl-2 dark:border-slate-700">
<li th:fragment="single (categories)" th:each="category : ${categories}">
<a
th:href="@{${category.status.permalink}}"
th:title="${category.spec.displayName}"
class="group flex items-center justify-between rounded px-2 py-1 transition-all hover:bg-gray-100 dark:hover:bg-slate-700"
>
<span class="text-sm opacity-80 dark:text-slate-50" th:text="${category.spec.displayName}"> </span>
<span
class="rounded bg-gray-100 px-1 py-0.5 text-xs tabular-nums opacity-70 group-hover:bg-white dark:bg-slate-600 dark:text-slate-50 dark:group-hover:bg-slate-500"
th:text="${category.status.visiblePostCount}"
>
</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>