update:优化文章列表

This commit is contained in:
jiewenhuang 2023-10-14 21:52:24 +08:00
parent a619a670d2
commit 44af64cbbd
1 changed files with 2 additions and 1 deletions

View File

@ -2,7 +2,8 @@
<html lang="en" xmlns:th="https://www.thymeleaf.org">
<th:block th:fragment="post_item">
<li th:class="'joe_list__item default ' + ${htmlType == 'index' ? 'animated wow' : ''} + ${htmlType == 'index' ? ' data-wow-delay=&quot;0.' + iteration.index + 's&quot;' : ''}" th:style="'animation-delay: '+${'0.'+iteration.index}+'s;'"> <th:block th:if="${theme.config.home.enable_post_thumbnail}">
<a th:href="${post.status.permalink}" class="thumbnail" th:title="${post.spec.title}" target="_blank" rel="noopener noreferrer">
<a th:href="${post.status.permalink}" class="thumbnail" th:title="${post.spec.title}" target="_blank" rel="noopener noreferrer"
th:if="${#strings.trim(post.spec.cover) != ''} or ${not #lists.isEmpty(theme.config.home.post_thumbnail)} or ${not #lists.isEmpty(theme.config.basic.random_img_api_url)}">
<th:block th:with="postCover = ${#lists.isEmpty(theme.config.home.post_thumbnail)? theme.config.basic.random_img_api_url+'?pageid='+post.metadata.name : theme.config.home.post_thumbnail}">
<img width="100%" height="100%" class="lazyload" th:data-src="${post.spec.cover ?: postCover}" th:src="${theme.config.home.lazyload_thumbnail}" th:alt="${post.spec.title}">
</th:block>