refactor(alpine): restructure components and remove unused utilities for better modularity and maintainability
这个提交包含在:
+43
-60
@@ -1,70 +1,53 @@
|
||||
<!DOCTYPE html>
|
||||
<html
|
||||
xmlns:th="https://www.thymeleaf.org"
|
||||
th:replace="~{modules/layout :: html(title = |#{page.tag.title(${tag.spec.displayName})} - ${site.title}|, header = null, content = ~{::content}, footer = null)}"
|
||||
th:replace="~{modules/layout :: html(title = |#{page.tag.title(${tag.spec.displayName})} - ${site.title}|, pageType = 'tag', terminalUserName = ${posts != null and posts.items != null and !#lists.isEmpty(posts.items) and posts.items[0].owner != null and !#strings.isEmpty(posts.items[0].owner.name) ? posts.items[0].owner.name : 'admin'}, content = ~{::content})}"
|
||||
>
|
||||
<th:block th:fragment="content">
|
||||
<div class="content">
|
||||
<div class="post">
|
||||
<h1
|
||||
class="post-title"
|
||||
th:text="'标签:'+${tag.spec.displayName}+' ('+${tag.status.visiblePostCount?:0}+' 篇文章)'"
|
||||
>
|
||||
标签:标签名 (n 篇文章)
|
||||
</h1>
|
||||
|
||||
<a href="/tags"> 所有标签 </a>
|
||||
|
||||
<ul>
|
||||
<li class="post-list" th:each="post : ${posts.items}">
|
||||
<a th:href="${post.status.permalink}">
|
||||
<span class="post-date" th:text="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}"
|
||||
>发布时间</span
|
||||
>
|
||||
<span class="post-separator">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</span>
|
||||
<span class="post-list-title" th:text="${post.spec.title}">文章标题</span></a>
|
||||
<span class="post-tags-inline">
|
||||
<span class="post-separator">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</span>
|
||||
<span th:each="tag : ${post.tags}">
|
||||
<a
|
||||
th:href="@{${post.status.permalink}}"
|
||||
th:title="${tag.spec.displayName}"
|
||||
th:text="'#'+${tag.spec.displayName}"
|
||||
class="post-tag"
|
||||
>#Tag
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pagination" th:if="${posts.hasPrevious() || posts.hasNext()}">
|
||||
<div class="pagination__buttons">
|
||||
<span class="button previous" th:if="${posts.hasPrevious()}">
|
||||
<a th:href="@{${posts.prevUrl}}">
|
||||
<span class="button__icon"><</span>
|
||||
<span class="button__text">上一页</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class="button next" th:if="${posts.hasNext()}">
|
||||
<a th:href="@{${posts.nextUrl}}">
|
||||
<span class="button__text">下一页</span>
|
||||
<span class="button__icon">></span>
|
||||
</a>
|
||||
</span>
|
||||
<section class="devcm-editor-window">
|
||||
<div class="devcm-editor-tabs">
|
||||
<div class="devcm-editor-tab devcm-editor-tab--active">
|
||||
<span th:text="'#' + ${tag.spec.displayName} + '.md'">tag.md</span>
|
||||
<a
|
||||
class="devcm-editor-tab__close"
|
||||
href="/tags"
|
||||
th:aria-label="#{devcm.action.closeTagTab}"
|
||||
th:title="#{devcm.action.closeTagTab}"
|
||||
>×</a
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="devcm-editor-body">
|
||||
<h1 class="devcm-page-title">
|
||||
<span th:text="#{devcm.taxonomy.tagTitle(${tag.spec.displayName})}">Tag</span>
|
||||
<small
|
||||
th:text="#{devcm.taxonomy.postCount(${tag.status.visiblePostCount != null ? tag.status.visiblePostCount : 0})}"
|
||||
>(0 posts)</small
|
||||
>
|
||||
</h1>
|
||||
<div class="devcm-post-stack">
|
||||
<th:block th:each="post,iterStat : ${posts.items}">
|
||||
<th:block th:replace="~{modules/post-card :: post-card(post=${post}, featured=${iterStat.index == 0})}" />
|
||||
</th:block>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="pagination" th:if="${posts.hasPrevious() || posts.hasNext()}">
|
||||
<div class="pagination__buttons">
|
||||
<span class="button previous" th:if="${posts.hasPrevious()}">
|
||||
<a th:href="@{${posts.prevUrl}}">
|
||||
<span class="button__icon"><</span>
|
||||
<span class="button__text" th:text="#{devcm.pagination.previous}">Previous</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class="button next" th:if="${posts.hasNext()}">
|
||||
<a th:href="@{${posts.nextUrl}}">
|
||||
<span class="button__text" th:text="#{devcm.pagination.next}">Next</span>
|
||||
<span class="button__icon">></span>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</th:block>
|
||||
</html>
|
||||
|
||||
在新议题中引用
屏蔽一个用户