<th:block th:if="${not #strings.isEmpty(post.spec.cover)}">
    <div class="cover">
        <img class="lazy entered" th:src="${post.spec.cover}" th:data-src="${post.spec.cover}">
        <div class="cover-info" position="bottom">
            <div class="title" th:text="${post.spec.title}"></div>
            <div class="cap" th:if="${!post.spec.excerpt.autoGenerate}" th:text="${post.spec.excerpt.raw}"></div>
        </div>
    </div>
</th:block>
<th:block th:unless="${not #strings.isEmpty(post.spec.cover)}"