halo-theme-dream2.0-plus
Version:
16 lines • 803 B
HTML
<div xmlns:th="https://www.thymeleaf.org"
th:fragment="widget (sidebar, index)"
th:data-index="${index}"
th:data-position="${sidebar.position}"
th:class="'card widget ' + ${sidebar.hide}">
<div class="card-title" th:if="${!#strings.isEmpty(sidebar.title) && null != sidebar.icon_new &&!#strings.isEmpty(sidebar.icon_new.value)}"
th:with="iconContent = ${#strings.defaultString(sidebar.icon_new?.value, '')},
iconSvg = ${#strings.startsWith(iconContent, '<svg')}">
<i class="card-title-label"
th:unless="${iconSvg}"
th:classappend="${iconContent}"></i>
<th:block th:if="${iconSvg}" th:utext="${iconContent}"></th:block>
<span th:text="${sidebar.title}"></span>
</div>
[(${sidebar.content})]
</div>