Files
halo-theme-pix/templates/modules/widgets/aside/hot_cat.html
T
2026-03-10 17:17:32 +08:00

22 lines
1.4 KiB
HTML

<section class="widget hot_cat">
<div class="wid_title" th:text="${theme.config.sidebar.hot_cat.title}">专题推荐</div>
<ul class="items cats_show">
<th:block th:each="categoryName,iterStat : ${theme.config.sidebar.hot_cat.widget_cat_select}">
<th:block th:with="category = ${categoryFinder.getByName(categoryName)}">
<li th:if="${category!=null}">
<a th:href="@{${category.status.permalink}}" >
<div class="cat_img"
th:with="cover_img=${#strings.contains(theme.config.post.category_banner,'http') ? ((#strings.contains(theme.config.post.category_banner,'?') ? theme.config.post.category_banner : theme.config.post.category_banner+'?')+','+category.metadata.name): theme.config.post.category_banner}">
<img class="round8"
th:data-src="${#strings.isEmpty(category.spec.cover) ? cover_img : thumbnail.gen(category.spec.cover, 's')}"
width="50" height="50" alt="" uk-img >
</div>
<div class="cat_name">
<h2>[[${category.spec.displayName}]]</h2>
</div>
</a>
</li>
</th:block>
</th:block>
</ul>
</section>