refactor(alpine): restructure components and remove unused utilities for better modularity and maintainability
这个提交包含在:
+57
-55
@@ -1,66 +1,68 @@
|
||||
<!DOCTYPE html>
|
||||
<html
|
||||
xmlns:th="https://www.thymeleaf.org"
|
||||
th:replace="~{modules/layout :: html(title = |#{page.archives.title} - ${site.title}|, header = null, content = ~{::content}, footer = null)}"
|
||||
th:replace="~{modules/layout :: html(title = |#{page.archives.title} - ${site.title}|, pageType = 'archive', terminalUserName = ${archives != null and archives.items != null and !#lists.isEmpty(archives.items) and archives.items[0].months != null and !#lists.isEmpty(archives.items[0].months) and archives.items[0].months[0].posts != null and !#lists.isEmpty(archives.items[0].months[0].posts) and archives.items[0].months[0].posts[0].owner != null and !#strings.isEmpty(archives.items[0].months[0].posts[0].owner.name) ? archives.items[0].months[0].posts[0].owner.name : 'admin'}, content = ~{::content})}"
|
||||
>
|
||||
<th:block th:fragment="content">
|
||||
<div class="content">
|
||||
<div class="post">
|
||||
<h1 class="post-title" th:text="文章归档">文章归档</h1>
|
||||
<th:block th:each="archive : ${archives.items}">
|
||||
<ul>
|
||||
<th:block th:each="month : ${archive.months}">
|
||||
<li class="post-list" th:each="post : ${month.posts}">
|
||||
<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="${tag.status.permalink}"
|
||||
th:title="${tag.spec.displayName}"
|
||||
th:text="'#'+${tag.spec.displayName}"
|
||||
class="post-tag"
|
||||
>#Tag
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</th:block>
|
||||
</ul>
|
||||
</th:block>
|
||||
<section class="devcm-terminal-window devcm-archive-hero">
|
||||
<div class="devcm-window-titlebar">
|
||||
<span class="devcm-window-dot"></span>
|
||||
<span class="devcm-window-dot"></span>
|
||||
<span class="devcm-window-dot"></span>
|
||||
</div>
|
||||
<div class="pagination" th:if="${archives.hasPrevious() || archives.hasNext()}">
|
||||
<div class="pagination__buttons">
|
||||
<span class="button previous" th:if="${archives.hasPrevious()}">
|
||||
<a th:href="@{${archives.prevUrl}}">
|
||||
<span class="button__icon">< </span>
|
||||
<span class="button__text">上一页</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class="button next" th:if="${archives.hasNext()}">
|
||||
<a th:href="@{${archives.nextUrl}}">
|
||||
<span class="button__text">下一页</span>
|
||||
<span class="button__icon"> ></span>
|
||||
</a>
|
||||
</span>
|
||||
<div class="devcm-hero">
|
||||
<div class="devcm-hero__copy">
|
||||
<div class="devcm-prompt-line">
|
||||
<span th:text="|${terminalUser}@devcm:~$|">admin@devcm:~$</span>
|
||||
<span th:text="#{devcm.archive.command}">archive --view posts</span>
|
||||
</div>
|
||||
<h1 class="devcm-hero__title" th:text="#{devcm.archive.title}">Archives</h1>
|
||||
<p class="devcm-hero__desc" th:text="#{devcm.archive.description}">Browse content by publish date.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="devcm-archive-table">
|
||||
<div class="devcm-archive-table__title" th:text="#{devcm.archive.tableTitle}">Archive list</div>
|
||||
<div class="devcm-archive-row devcm-archive-row--header">
|
||||
<span th:text="#{devcm.archive.columnTitle}">Title</span>
|
||||
<span th:text="#{devcm.archive.columnTags}">Tags</span>
|
||||
<span th:text="#{devcm.archive.columnDate}">Date</span>
|
||||
</div>
|
||||
<th:block th:each="archive : ${archives.items}">
|
||||
<th:block th:each="month : ${archive.months}">
|
||||
<div class="devcm-archive-row devcm-archive-row--month">
|
||||
<span>
|
||||
<span th:text="#{devcm.archive.group}">Archive group</span>
|
||||
(<span th:text="${#lists.size(month.posts)}">0</span>)
|
||||
</span>
|
||||
</div>
|
||||
<a class="devcm-archive-row" th:each="post : ${month.posts}" th:href="${post.status.permalink}">
|
||||
<span th:text="${post.spec.title}">文章标题</span>
|
||||
<span>
|
||||
<b th:each="tag : ${post.tags}" th:text="'#' + ${tag.spec.displayName} + ' '">#tag</b>
|
||||
</span>
|
||||
<span th:text="${#dates.format(post.spec.publishTime,'MM-dd')}">01-01</span>
|
||||
</a>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</section>
|
||||
|
||||
<div class="pagination" th:if="${archives.hasPrevious() || archives.hasNext()}">
|
||||
<div class="pagination__buttons">
|
||||
<span class="button previous" th:if="${archives.hasPrevious()}">
|
||||
<a th:href="@{${archives.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="${archives.hasNext()}">
|
||||
<a th:href="@{${archives.nextUrl}}">
|
||||
<span class="button__text" th:text="#{devcm.pagination.next}">Next</span>
|
||||
<span class="button__icon"> ></span>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</th:block>
|
||||
</html>
|
||||
|
||||
在新议题中引用
屏蔽一个用户