Skip to content

Commit

Permalink
Merge pull request #62 from shy-share/main
Browse files Browse the repository at this point in the history
修复 侧边栏配置的“分类”和“标签”模块
  • Loading branch information
sunheyi6 authored Jan 20, 2023
2 parents c69fc3a + 546f6d2 commit 96db873
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions templates/modules/widgets/aside/categories.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<!-- 目录 -->
<div class="card-widget card-categories" th:fragment="categories"
th:with="categories = ${categoryFinder.listAll()}, categoryQuantity = ${#conversions.convert(theme.config.sidebar.categoryQuantity, 'java.lang.Integer')}">
${categoryFinder.list(1, categoryQuantity)}>
<div class="item-headline"><i class="iconfont icon-folder-open"></i><span>分类</span></div>
<div class="aside-list">
<ul class="card-category-list">
<li class="card-category-list-item" th:each="category,iterStat : ${categories}">
<a class="card-category-list-link" th:href="@{${category.status.permalink}}"
th:if="${categoryQuantity >= 0 && iterStat.index < categoryQuantity}">
th:if="${categoryQuantity >= 0 && iterStat.index < categoryQuantity || categoryQuantity < 0}">
<span class="card-category-list-name" th:text="${category.spec.displayName}"
th:title="${category.spec.displayName}"></span>
<span class="card-category-list-count" th:text="${category.status.postCount}"></span>
Expand All @@ -20,4 +20,4 @@
</div>
</div>

</html>
</html>
4 changes: 2 additions & 2 deletions templates/modules/widgets/aside/tags.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="card-tag-cloud">
<a style="font-size:1em;color:#d3d3d3" th:each="tag,iterStat : ${tags}"
th:href="@{${tag.status.permalink}}"
th:if="${tagQuantity >= 0 && iterStat.index < tagQuantity}"
th:if="${tagQuantity >= 0 && iterStat.index < tagQuantity || categoryQuantity < 0}"
th:title="${tag.spec.displayName}">
<!-- 角标 -->
[[${tag.spec.displayName}]]<sup th:text="${tag.status.postCount}"></sup>
Expand All @@ -20,4 +20,4 @@
</th:block>


</html>
</html>

0 comments on commit 96db873

Please sign in to comment.