feat: custom time format
This commit is contained in:
+22
-5
@@ -17,12 +17,29 @@
|
||||
<ul>
|
||||
<th:block th:each="month : ${archive.months}">
|
||||
<li class="post-list" th:each="post : ${month.posts}">
|
||||
<a data-pjax th:href="@{${post.status.permalink}}">
|
||||
<time th:text="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}">Publish Time</time>
|
||||
<span> :: </span>
|
||||
<span class="post-list-title" th:text="${post.spec.title}">Post Title</span>
|
||||
</a>
|
||||
<div class="post-meta">
|
||||
<time class="post-time"
|
||||
th:text="${#dates.format(post.spec.publishTime, '__${theme.config.style.time_style == 'custom' ?
|
||||
theme.config.style.custom_time_style : theme.config.style.time_style}__')}">
|
||||
Publish
|
||||
Time
|
||||
</time>
|
||||
<a data-pjax th:href="@{${post.status.permalink}}">
|
||||
<span class="post-list-title" th:text="${post.spec.title}">Post Title</span>
|
||||
</a>
|
||||
<span class="post-tags">
|
||||
<span class="post-tag" th:each="tag : ${post.tags}">
|
||||
<a data-pjax
|
||||
th:href="@{${tag.status.permalink}}"
|
||||
th:title="${tag.spec.displayName}"
|
||||
th:text="'#'+${tag.spec.displayName}"
|
||||
>#Tag</a>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
</th:block>
|
||||
</ul>
|
||||
</th:block>
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
</h1>
|
||||
<div class="post-meta">
|
||||
<time class="post-date"
|
||||
th:text="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}">Publish Time</time>
|
||||
th:text="${#dates.format(post.spec.publishTime, '__${theme.config.style.time_style == 'custom' ?
|
||||
theme.config.style.custom_time_style : theme.config.style.time_style}__')}">Publish Time</time>
|
||||
<span class="post-author"
|
||||
th:with="contributor = ${post.contributors[0]}"
|
||||
th:text="${contributor.displayName}">Author</span>
|
||||
|
||||
+3
-2
@@ -8,8 +8,9 @@
|
||||
<header>
|
||||
<h1 class="post-title" th:text="${post.spec.title}">Post Title</h1>
|
||||
<div class="post-meta">
|
||||
<time class="post-date"
|
||||
th:text="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}">Publish Time
|
||||
<time class="post-time"
|
||||
th:text="${#dates.format(post.spec.publishTime, '__${theme.config.style.time_style == 'custom' ?
|
||||
theme.config.style.custom_time_style : theme.config.style.time_style}__')}">Publish Time
|
||||
</time>
|
||||
<span class="post-author" th:text="${post.owner.displayName}">Author</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user