style: adjust tags display

This commit is contained in:
Erzbir
2025-11-18 01:57:38 +08:00
parent b2af6489d3
commit 51429a5722
6 changed files with 37 additions and 34 deletions
+1
View File
@@ -22,6 +22,7 @@
--scrollbar-theme-color: rgba(134, 134, 134, 0.45) rgba(255, 255, 255, 0); --scrollbar-theme-color: rgba(134, 134, 134, 0.45) rgba(255, 255, 255, 0);
--font-theme-lig: none; --font-theme-lig: none;
--border-theme-width: calc(var(--font-theme-size) * 0.125); --border-theme-width: calc(var(--font-theme-size) * 0.125);
white-space-collapse: discard;
} }
html { html {
+22 -2
View File
@@ -37,7 +37,7 @@
color: color-mix(in srgb, var(--color-theme-meta) 65%, transparent); color: color-mix(in srgb, var(--color-theme-meta) 65%, transparent);
} }
.post-meta > *:not(:first-child)::before { .post-meta > *:not(:first-child):not(:empty)::before {
content: "::"; content: "::";
display: inline-block; display: inline-block;
margin-right: 1ch; margin-right: 1ch;
@@ -67,10 +67,22 @@
color: var(--color-theme-title); color: var(--color-theme-title);
} }
.post-time {
color: var(--color-theme-foreground);
}
.post-meta > .post-time {
color: inherit;
}
.post-author {
}
.post-tags { .post-tags {
display: block;
margin-bottom: calc(var(--font-theme-size) * 0.3125); margin-bottom: calc(var(--font-theme-size) * 0.3125);
font-size: inherit; font-size: inherit;
color: var(--color-theme-tag);
} }
.post-tag { .post-tag {
@@ -81,6 +93,14 @@
} }
} }
.post-meta > .post-tags {
color: inherit;
}
.post-tags > .post-tag {
color: inherit;
}
.post-meta .post-tags { .post-meta .post-tags {
font-size: calc(var(--font-theme-size) * 0.95); font-size: calc(var(--font-theme-size) * 0.95);
} }
+4 -13
View File
@@ -24,19 +24,10 @@
Publish Publish
Time Time
</time> </time>
<a data-pjax th:href="@{${post.status.permalink}}"> <a data-pjax th:href="@{${post.status.permalink}}"><span class="post-list-title"
<span class="post-list-title" th:text="${post.spec.title}">Post Title</span> th:text="${post.spec.title}">Post Title</span></a>
</a> <th:block th:replace="~{modules/tag-list(post = ${post})}"
<span class="post-tags" th:if="${theme.config.page.archives_tags}"> th:if="${theme.config.page.archives_tags}"/></div>
<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> </li>
+1 -9
View File
@@ -24,15 +24,7 @@
theme.config.style.custom_time_style : theme.config.style.time_style}__')}">Publish Time</time> theme.config.style.custom_time_style : theme.config.style.time_style}__')}">Publish Time</time>
<span class="post-author" <span class="post-author"
th:with="contributor = ${post.contributors[0]}" th:with="contributor = ${post.contributors[0]}"
th:text="${contributor.displayName}">Author</span> th:text="${contributor.displayName}">Author</span><th:block th:replace="~{modules/tag-list(post = ${post})}"/>
</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>
</div> </div>
</header> </header>
<div class="post-excerpt"> <div class="post-excerpt">
+8
View File
@@ -0,0 +1,8 @@
<th:block th:fragment="tag-list(post)">
<span class="post-tags" th:if="${not post.tags.isEmpty()}"><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>
</th:block>
+1 -10
View File
@@ -12,17 +12,8 @@
th:text="${#dates.format(post.spec.publishTime, '__${theme.config.style.time_style == 'custom' ? 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 theme.config.style.custom_time_style : theme.config.style.time_style}__')}">Publish Time
</time> </time>
<span class="post-author" th:text="${post.owner.displayName}">Author</span> <span class="post-author" th:text="${post.owner.displayName}">Author</span><th:block th:replace="~{modules/tag-list(post = ${post})}"/>
</div> </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>
</header> </header>
<section class="post-content"> <section class="post-content">
<div th:utext="${post.content.content}" id="content">Post Content</div> <div th:utext="${post.content.content}" id="content">Post Content</div>