文件
halo-theme/theme-terminal/templates/post.html
T

56 行
2.1 KiB
HTML

<!DOCTYPE html>
<html
xmlns:th="https://www.thymeleaf.org"
th:replace="~{modules/layout :: html(header = null, content = ~{::content}, footer = null)}"
>
<th:block th:fragment="content">
<div class="post">
<h1 class="post-title" th:text="${post.spec.title}">Post Title</h1>
<div class="post-meta">
<span class="post-date" th:text="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}"> publishTime </span>
<span class="post-author" th:text="${':: '+post.owner.displayName}">:: Author</span>
</div>
<span class="post-tags-inline" th:each="tag : ${post.tags}">
<a
th:href="${tag.status.permalink}"
th:title="${tag.spec.displayName}"
th:text="'#'+${tag.spec.displayName}"
class="post-tag"
>#Tag</a
>
</span>
<div class="post-content">
<div th:utext="${post.content.content}">Post Content</div>
</div>
</div>
<div class="comment-wrap" th:if="${haloCommentEnabled}">
<h2>评论</h2>
<halo:comment
group="content.halo.run"
kind="Post"
th:attr="name=${post.metadata.name}"
/>
</div>
<div class="pagination">
<div class="pagination__title">
<span class="pagination__title-h">其他文章</span>
<hr />
</div>
<div class="pagination__buttons" th:with="postCursor=${postFinder.cursor(post.metadata?.name)}">
<span th:if="${postCursor.hasPrevious()}" class="button previous">
<a th:href="${postCursor.previous?.status?.permalink}">
<span class="button__icon"><&nbsp;</span>
<span class="button__text" th:text="${postCursor.previous?.spec?.title}">prevPost</span>
</a>
</span>
<span th:if="${postCursor.hasNext()}" class="button next">
<a th:href="${postCursor.next?.status?.permalink}">
<span class="button__text" th:text="${postCursor.next?.spec?.title}">nextPost</span>
<span class="button__icon">&nbsp;></span>
</a>
</span>
</div>
</div>
</th:block>
</html>