2023-03-23 18:25:48 +08:00
|
|
|
<div xmlns:th="https://www.thymeleaf.org"
|
|
|
|
th:fragment="widget (hide)"
|
|
|
|
th:class="'card widget tagcloud ' + ${hide}"
|
2023-03-25 16:28:00 +08:00
|
|
|
th:with="num = ${#strings.isEmpty(theme.config.sidebar.tags_num)? 32 : T(java.lang.Integer).parseInt(theme.config.sidebar.tags_num)},
|
2023-03-24 20:25:04 +08:00
|
|
|
tags = ${tagFinder.list(1,num)},
|
|
|
|
isEmpty = ${#lists.isEmpty(tags)},
|
|
|
|
enableTagsColor = ${theme.config.sidebar.enable_tag_color}">
|
2023-03-23 18:25:48 +08:00
|
|
|
|
|
|
|
<div class="card-title">
|
2023-09-12 10:44:43 +08:00
|
|
|
<i class="ri-cloud-line card-title-label"></i><span>标签云</span>
|
2024-02-05 10:47:54 +08:00
|
|
|
<a th:if="${theme.config.sidebar.tagcloud_more}" class="card-more" th:href="@{/tags}">更多<i class="ri-arrow-right-double-line"></i></a>
|
2023-03-23 18:25:48 +08:00
|
|
|
</div>
|
|
|
|
<div th:if="${isEmpty}" class="card-empty">暂无标签</div>
|
|
|
|
<div th:unless="${isEmpty}" class="card-content">
|
|
|
|
<a
|
|
|
|
th:each="tag : ${tags}"
|
|
|
|
th:href="@{${tag.status.permalink}}"
|
2023-03-24 20:25:04 +08:00
|
|
|
th:text="${tag.spec.displayName}"
|
|
|
|
th:with="size = ${#strings.length(tag.spec.displayName) + #strings.length(tag.spec.slug) + tag.postCount}"
|
2023-12-06 19:36:18 +08:00
|
|
|
th:style="'font-size: ' + ${size < 14 ? 14 : size > 32 ? 32 : size} + 'px;' + ${(enableTagsColor && tag.spec.color != '#ffffff')? 'color: ' + tag.spec.color +';' : ''}"></a>
|
2023-03-23 18:25:48 +08:00
|
|
|
</div>
|
2024-01-29 17:43:04 +08:00
|
|
|
</div>
|