22 lines
973 B
HTML
22 lines
973 B
HTML
<ul class="wi-post-feed" role="list">
|
|
<li th:each="post : ${posts.items}" class="wi-post-feed__item">
|
|
<a class="wi-post-feed__link" th:href="@{${post.status.permalink}}">
|
|
<div class="wi-post-feed__image-wrap" th:unless="${#strings.isEmpty(post.spec.cover)}">
|
|
<img
|
|
class="wi-post-feed__image"
|
|
th:src="${post.spec.cover}"
|
|
th:srcset="|${thumbnail.gen(post.spec.cover, 's')} 400w,
|
|
${thumbnail.gen(post.spec.cover, 'm')} 800w,
|
|
${thumbnail.gen(post.spec.cover, 'l')} 1200w|"
|
|
sizes="(max-width: 768px) 100vw, 400px"
|
|
/>
|
|
</div>
|
|
<div class="wi-post-feed__body">
|
|
<p class="wi-post-feed__date" th:text="${#dates.format(post.spec.publishTime, 'yyyy-MM-dd')}"></p>
|
|
<h2 class="wi-post-feed__title" th:text="${post.spec.title}"></h2>
|
|
<p class="wi-post-feed__excerpt" th:text="${post.status.excerpt}"></p>
|
|
</div>
|
|
</a>
|
|
</li>
|
|
</ul>
|