style: refactor layout
This commit is contained in:
@@ -9,5 +9,5 @@ page.pagination.prev=Prev
|
||||
page.pagination.next=Next
|
||||
page.post.more=READ MORE
|
||||
page.post.pagination=READ MORE POSTS
|
||||
page.post.comment=Comment
|
||||
page.post.comment=Comments
|
||||
page.error.back=Back to home page
|
||||
+1
-1
@@ -9,5 +9,5 @@ page.pagination.prev=Prev
|
||||
page.pagination.next=Next
|
||||
page.post.more=READ MORE
|
||||
page.post.pagination=READ MORE POSTS
|
||||
page.post.comment=Comment
|
||||
page.post.comment=Comments
|
||||
page.error.back=Back to home page
|
||||
+1
-1
@@ -9,5 +9,5 @@ page.pagination.prev=Anterior
|
||||
page.pagination.next=Siguiente
|
||||
page.post.more=LEER MÁS
|
||||
page.post.pagination=LEER MÁS PUBLICACIONES
|
||||
page.post.comment=Comentario
|
||||
page.post.comment=Comentarios
|
||||
page.error.back=Volver a la página principal
|
||||
+4
-21
@@ -67,34 +67,18 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
.page {
|
||||
margin: 0 auto;
|
||||
.wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh
|
||||
}
|
||||
|
||||
.main-wrapper {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.layout-wrapper {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.sidebar-left,
|
||||
.sidebar-right {
|
||||
width: 20%;
|
||||
flex-shrink: 0;
|
||||
padding: calc(var(--font-theme-size) * 1.25);
|
||||
}
|
||||
|
||||
.center.container {
|
||||
flex: 1;
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: calc(var(--font-theme-size) * 2.5);
|
||||
@@ -103,7 +87,6 @@ body {
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
@@ -116,7 +99,7 @@ body {
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.center.container {
|
||||
.container {
|
||||
padding: calc(var(--font-theme-size) * 1.25);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
<header>
|
||||
<h1 class="post-title" th:text="#{page.archives.title}">Archives</h1>
|
||||
</header>
|
||||
<section>
|
||||
<div>
|
||||
<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 data-pjax th:href="@{${post.status.permalink}}">
|
||||
<span th:text="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}">Publish Time</span>
|
||||
<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>
|
||||
@@ -22,9 +22,9 @@
|
||||
</th:block>
|
||||
</ul>
|
||||
</th:block>
|
||||
</section>
|
||||
</div>
|
||||
</article>
|
||||
<div class="pagination" th:if="${archives.hasPrevious() || archives.hasNext()}">
|
||||
<nav class="pagination" th:if="${archives.hasPrevious() || archives.hasNext()}">
|
||||
<div class="pagination__buttons">
|
||||
<span th:if="${archives.hasPrevious()}">
|
||||
<a data-pjax th:href="@{${archives.prevUrl}}" class="button prev inline">
|
||||
@@ -38,6 +38,6 @@
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</th:block>
|
||||
</html>
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
<header>
|
||||
<h1 class="post-title" th:text="#{page.categories.title}">Categories</h1>
|
||||
</header>
|
||||
<section class="post-content">
|
||||
<div class="post-content">
|
||||
<ul>
|
||||
<li th:replace="~{modules/category-tree :: single(categories=${categories})}"></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</article>
|
||||
</th:block>
|
||||
</html>
|
||||
|
||||
+16
-16
@@ -11,7 +11,7 @@
|
||||
Category: Category name [n]
|
||||
</h1>
|
||||
</header>
|
||||
<section class="post-content">
|
||||
<div class="post-content">
|
||||
<ul>
|
||||
<li class="post-list" th:each="post : ${posts.items}">
|
||||
<a data-pjax th:href="@{${post.status.permalink}}">
|
||||
@@ -21,21 +21,21 @@
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</article>
|
||||
<section class="pagination" th:if="${posts.hasPrevious() || posts.hasNext()}">
|
||||
<div class="pagination__buttons" th:with="postCursor=${postFinder.cursor(post.metadata?.name)}">
|
||||
<span th:if="${postCursor.hasPrevious()}">
|
||||
<a data-pjax th:href="@{${postCursor.previous?.status?.permalink}}" class="button prev inline">
|
||||
<span class="button__text" th:text="|< ${postCursor.previous?.spec?.title}|">prevPost</span>
|
||||
</a>
|
||||
</span>
|
||||
<span th:if="${postCursor.hasNext()}">
|
||||
<a data-pjax th:href="@{${postCursor.next?.status?.permalink}}" class="button next inline">
|
||||
<span class="button__text" th:text="|${postCursor.next?.spec?.title} >|">nextPost</span>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</section>
|
||||
</article>
|
||||
<nav class="pagination" th:if="${posts.hasPrevious() || posts.hasNext()}">
|
||||
<div class="pagination__buttons">
|
||||
<span th:if="${posts.hasPrevious()}">
|
||||
<a data-pjax th:href="@{${posts.prevUrl}}" class="button inline prev">
|
||||
<span class="button__text" th:text="'< ' + #{page.pagination.prev}">< Prev</span>
|
||||
</a>
|
||||
</span>
|
||||
<span th:if="${posts.hasNext()}">
|
||||
<a data-pjax th:href="@{${posts.nextUrl}}" class="button inline next">
|
||||
<span class="button__text" th:text="#{page.pagination.next} + ' >'">Next ></span>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</nav>
|
||||
</th:block>
|
||||
</html>
|
||||
|
||||
+12
-12
@@ -14,31 +14,31 @@
|
||||
<h1 class="post-title">
|
||||
<a data-pjax th:text="${post.spec.title}" th:href="@{${post.status.permalink}}">Post Title</a>
|
||||
</h1>
|
||||
<section class="post-meta">
|
||||
<span class="post-date"
|
||||
th:text="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}">Publish Time</span>
|
||||
<div class="post-meta">
|
||||
<time class="post-date"
|
||||
th:text="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}">Publish Time</time>
|
||||
<span class="post-author"
|
||||
th:with="contributor = ${post.contributors[0]}"
|
||||
th:text="${contributor.displayName}">Author</span>
|
||||
</section>
|
||||
<section class="post-tags">
|
||||
</div>
|
||||
<div 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>
|
||||
</div>
|
||||
</header>
|
||||
<section class="post-excerpt">
|
||||
<div class="post-excerpt">
|
||||
<span th:text="${post.status.excerpt}">Post Excerpt...</span>
|
||||
</section>
|
||||
<section>
|
||||
</div>
|
||||
<div>
|
||||
<a data-pjax class="read-more button inline" th:href="@{${post.status.permalink}}" th:text="#{page.post.more} + ' >'">READ MORE ></a>
|
||||
</section>
|
||||
</div>
|
||||
</article>
|
||||
</section>
|
||||
<section class="pagination" th:if="${posts.hasPrevious() || posts.hasNext()}">
|
||||
<nav class="pagination" th:if="${posts.hasPrevious() || posts.hasNext()}">
|
||||
<div class="pagination__buttons">
|
||||
<span th:if="${posts.hasPrevious()}">
|
||||
<a data-pjax th:href="@{${posts.prevUrl}}" class="button inline prev">
|
||||
@@ -51,6 +51,6 @@
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</section>
|
||||
</nav>
|
||||
</th:block>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<th:block th:fragment="comment(group, kind, name)">
|
||||
<section class="comment" th:attr="name=${name},kind=${kind},group=${group}">
|
||||
<h2 th:text="#{page.post.comment}">Comments</h2>
|
||||
<halo:comment th:attr="name=${name},kind=${kind},group=${group}"/>
|
||||
</section>
|
||||
</th:block>
|
||||
@@ -1,6 +1,6 @@
|
||||
<th:block th:fragment="footer">
|
||||
<div class="footer-inner">
|
||||
<section class="footer-copyright-engine">
|
||||
<div class="footer-copyright-engine">
|
||||
<span>Powered by </span>
|
||||
<span>
|
||||
<a target="_blank" href="http://www.halo.run">Halo</a>
|
||||
@@ -8,8 +8,8 @@
|
||||
<span> :: </span>
|
||||
<span>Theme </span>
|
||||
<a target="_blank" href="https://github.com/Erzbir/halo-theme-terminal">Terminal</a>
|
||||
</section>
|
||||
<section class="footer-copyright-site">
|
||||
</div>
|
||||
<div class="footer-copyright-site">
|
||||
<div class="footer-user">
|
||||
<span>© </span>
|
||||
<span th:text="${#dates.year(#dates.createNow())}">2025</span>
|
||||
@@ -31,7 +31,7 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<halo:footer/>
|
||||
</th:block>
|
||||
|
||||
@@ -77,29 +77,27 @@
|
||||
|
||||
<body>
|
||||
<div class="page">
|
||||
<header>
|
||||
<div id="header-slot"></div>
|
||||
<header role="banner">
|
||||
<div id="header-slot" aria-hidden="true"></div>
|
||||
</header>
|
||||
<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>
|
||||
<div class="wrapper">
|
||||
<aside class="sidebar-left">
|
||||
</aside>
|
||||
<main class="container" role="main">
|
||||
<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>
|
||||
<footer class="footer">
|
||||
<div id="footer-slot-fist"></div>
|
||||
<footer class="footer" role="contentinfo">
|
||||
<div id="footer-slot-fist" aria-hidden="true"></div>
|
||||
<th:block th:replace="~{modules/footer}"/>
|
||||
<div id="footer-slot-last"></div>
|
||||
<div id="footer-slot-last" aria-hidden="true"></div>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -11,15 +11,15 @@
|
||||
th:attr="x-data=|{name:'${moment.metadata.name}',showComment:false}|">
|
||||
<header>
|
||||
<div class="post-meta">
|
||||
<span class="post-date" th:text="${#dates.format(moment.spec.releaseTime,'yyyy-MM-dd')}">
|
||||
Moment CreateTime
|
||||
</span>
|
||||
<time class="post-date" th:text="${#dates.format(moment.spec.releaseTime,'yyyy-MM-dd')}">
|
||||
Moment CreateTime
|
||||
</time>
|
||||
<span class="post-author" th:with="owner = ${moment.owner}" th:text="${owner.displayName}">
|
||||
Author
|
||||
</span>
|
||||
</div>
|
||||
</header>
|
||||
<section class="post-content" th:utext="${content.html}">Moment Content...</section>
|
||||
<div class="post-content" th:utext="${content.html}">Moment Content...</div>
|
||||
<th:block th:with="medium=${moment.spec.content.medium}">
|
||||
<div
|
||||
th:unless="${#lists.isEmpty(moments)}"
|
||||
@@ -32,7 +32,7 @@
|
||||
th:if="${#strings.equals(media.type,'PHOTO')}"
|
||||
class="transform-gpu rounded-lg object-cover"
|
||||
th:src="${media.url}"
|
||||
/>
|
||||
alt="photo"/>
|
||||
</a>
|
||||
<div th:if="${#strings.equals(media.type,'VIDEO')}">
|
||||
<video controls th:src="${media.url}"></video>
|
||||
@@ -41,7 +41,7 @@
|
||||
</div>
|
||||
</th:block>
|
||||
</article>
|
||||
<section class="pagination" th:if="${moments.hasPrevious() || moments.hasNext()}">
|
||||
<nav class="pagination" th:if="${moments.hasPrevious() || moments.hasNext()}">
|
||||
<div class="pagination__buttons">
|
||||
<span th:if="${moments.hasPrevious()}">
|
||||
<a data-pjax th:href="@{${moments.prevUrl}}" class="button inline prev">
|
||||
@@ -54,6 +54,6 @@
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</section>
|
||||
</nav>
|
||||
</th:block>
|
||||
</html>
|
||||
|
||||
+5
-6
@@ -8,13 +8,12 @@
|
||||
<header>
|
||||
<h1 class="post-title" th:text="${singlePage.spec.title}">Post Title</h1>
|
||||
</header>
|
||||
<section class="post-content">
|
||||
<div class="post-content">
|
||||
<div th:utext="${singlePage.content.content}">Post Content</div>
|
||||
</section>
|
||||
</div>
|
||||
</article>
|
||||
<section class="comment" th:if="${haloCommentEnabled}">
|
||||
<h2>Comments</h2>
|
||||
<halo:comment group="content.halo.run" kind="SinglePage" th:attr="name=${singlePage.metadata.name}"/>
|
||||
</section>
|
||||
<th:block
|
||||
th:replace="~{modules/comment :: comment(group = 'content.halo.run', kind = 'SinglePage', name = ${singlePage.metadata.name})}"
|
||||
th:if="${haloCommentEnabled}"/>
|
||||
</th:block>
|
||||
</html>
|
||||
|
||||
+16
-17
@@ -8,20 +8,20 @@
|
||||
<header>
|
||||
<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')}">Publish Time</span>
|
||||
<time class="post-date"
|
||||
th:text="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}">Publish Time
|
||||
</time>
|
||||
<span class="post-author" th:text="${post.owner.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>
|
||||
<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>
|
||||
</header>
|
||||
<section class="post-content">
|
||||
<div th:utext="${post.content.content}" id="content">Post Content</div>
|
||||
@@ -31,7 +31,7 @@
|
||||
<button id="toc-toggle" class="toc-toggle" aria-label="Hide Table of Contents"></button>
|
||||
<div id="toc-content" class="toc-content"></div>
|
||||
</nav>
|
||||
<section class="pagination">
|
||||
<nav class="pagination">
|
||||
<div class="pagination__title">
|
||||
<span class="pagination__title-h" th:text="#{page.post.pagination}">READ OTHER POSTS</span>
|
||||
<hr/>
|
||||
@@ -48,10 +48,9 @@
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</section>
|
||||
<section class="comment" th:if="${haloCommentEnabled}">
|
||||
<h2 th:text="#{page.post.comment}">Comments</h2>
|
||||
<halo:comment group="content.halo.run" kind="Post" th:attr="name=${post.metadata.name}"/>
|
||||
</section>
|
||||
</nav>
|
||||
<th:block
|
||||
th:replace="~{modules/comment :: comment(group = 'content.halo.run', kind = 'Post', name = ${post.metadata.name})}"
|
||||
th:if="${haloCommentEnabled}"/>
|
||||
</th:block>
|
||||
</html>
|
||||
|
||||
+5
-5
@@ -11,19 +11,19 @@
|
||||
Tag: Tag name [n]
|
||||
</h1>
|
||||
</header>
|
||||
<section class="post-content">
|
||||
<div class="post-content">
|
||||
<ul>
|
||||
<li class="post-list" th:each="post : ${posts.items}">
|
||||
<a data-pjax th:href="@{${post.status.permalink}}">
|
||||
<span th:text="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}">Publish Time</span>
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</article>
|
||||
<section class="pagination" th:if="${posts.hasPrevious() || posts.hasNext()}">
|
||||
<nav class="pagination" th:if="${posts.hasPrevious() || posts.hasNext()}">
|
||||
<div class="pagination__buttons">
|
||||
<span th:if="${posts.hasPrevious()}">
|
||||
<a data-pjax th:href="@{${posts.prevUrl}}" class="button inline prev">
|
||||
@@ -36,6 +36,6 @@
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</section>
|
||||
</nav>
|
||||
</th:block>
|
||||
</html>
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@
|
||||
<header>
|
||||
<h1 class="post-title" th:text="#{page.tag.title}">Tags</h1>
|
||||
</header>
|
||||
<section class="post-content">
|
||||
<div class="post-content">
|
||||
<ul>
|
||||
<li th:each="tag: ${tags}">
|
||||
<a data-pjax th:href="@{${tag.status.permalink}}"
|
||||
@@ -17,7 +17,7 @@
|
||||
<span th:text="' ['+${tag.status.visiblePostCount?:0}+']'"></span>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</article>
|
||||
</th:block>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user