UNPKG

halo-theme-dream2.0-plus

Version:

梦之城,童话梦境,动漫类型博客主题。

23 lines (22 loc) 1.39 kB
<div xmlns:th="https://www.thymeleaf.org" th:fragment="widget (sidebar)" th:class="'card widget tags ' + ${sidebar.hide}" th:with="num = ${#strings.isEmpty(theme.config.sidebar.tags_num)? 18 : T(java.lang.Integer).parseInt(theme.config.sidebar.tags_num)}, tags = ${tagFinder.list(1,num)}, isEmpty = ${#lists.isEmpty(tags)}, enableTagsColor = ${theme.config.sidebar.enable_tag_color}"> <div class="card-title"> <i th:class="${#strings.defaultString(sidebar.icon, 'ri-price-tag-3-line') + ' card-title-label'}"></i><span th:text="${#strings.defaultString(sidebar.title, '标签')}"></span> <a th:if="${theme.config.sidebar.tags_more}" class="card-more" th:href="@{/tags}" aria-label="更多" title="更多">更多<i class="ri-arrow-right-double-line"></i></a> </div> <div th:if="${isEmpty}" class="card-empty">暂无标签</div> <div th:unless="${isEmpty}" class="card-content"> <a th:aria-label="${tag.spec.displayName}" th:title="${tag.spec.displayName}" th:each="tag : ${tags}" th:href="@{${tag.status.permalink}}" th:text="${tag.spec.displayName}" th:style="${(enableTagsColor && tag.spec.color != '#ffffff')? 'color: ' + tag.spec.color +'; border-color: ' + tag.spec.color +'; background: ' + tag.spec.color +'20;' : ''}"></a> </div> </div>