style: refactor layout and replace fixed spacing with font-relative units

This commit is contained in:
Erzbir
2025-08-05 14:50:52 +08:00
parent 8e3cd1ae8d
commit 6e0c6973f2
15 changed files with 287 additions and 233 deletions
+17 -24
View File
@@ -14,32 +14,25 @@
<h1 class="post-title">
<a data-pjax th:text="${post.spec.title}" th:href="@{${post.status.permalink}}">Post Title</a>
</h1>
<div class="post-meta">
<span class="post-date" th:text="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}">
Publish Time
</span>
<span
class="post-author"
th:with="contributor = ${post.contributors[0]}"
th:text="${contributor.displayName}"
>Author</span
>
</div>
<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>
<section class="post-meta">
<span class="post-date"
th:text="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}">Publish Time</span>
<span class="post-author"
th:with="contributor = ${post.contributors[0]}"
th:text="${contributor.displayName}">Author</span>
</section>
<section 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>
</section>
</header>
<section class="post-content">
<p th:text="${post.status.excerpt}">Post Excerpt...</p>
<section class="post-excerpt">
<span th:text="${post.status.excerpt}">Post Excerpt...</span>
</section>
<section>
<a data-pjax class="read-more button inline" th:href="@{${post.status.permalink}}">[Read more]</a>
</section>
+20 -12
View File
@@ -53,18 +53,26 @@
</head>
<body>
<section class="center container">
<header class="header">
<th:block th:replace="~{modules/header :: header(isHome = true)}"/>
</header>
<main>
<div class="content">
<th:block th:replace="${content}"/>
<div class="page">
<div class="main-wrapper">
<div class="layout-wrapper">
<aside class="sidebar-left">
</aside>
<main class="center container">
<header class="header">
<th:block th:replace="~{modules/header :: header(isHome = true)}"/>
</header>
<div class="content">
<th:block th:replace="${content}"/>
</div>
</main>
<aside class="sidebar-right">
</aside>
</div>
</main>
</section>
<footer class="footer">
<th:block th:replace="~{modules/footer}"/>
</footer>
</div>
<footer class="footer">
<th:block th:replace="~{modules/footer}"/>
</footer>
</div>
</body>
</html>