feat: make tags display configurable
This commit is contained in:
+9
-1
@@ -187,6 +187,10 @@ spec:
|
|||||||
value: "pin-left"
|
value: "pin-left"
|
||||||
- label: "above"
|
- label: "above"
|
||||||
value: "pin-above"
|
value: "pin-above"
|
||||||
|
- $formkit: checkbox
|
||||||
|
name: show_tags
|
||||||
|
label: 显示文章标签
|
||||||
|
value: true
|
||||||
|
|
||||||
- group: post_page
|
- group: post_page
|
||||||
label: 文章页
|
label: 文章页
|
||||||
@@ -195,6 +199,10 @@ spec:
|
|||||||
name: show_toc
|
name: show_toc
|
||||||
label: 显示文章目录
|
label: 显示文章目录
|
||||||
value: true
|
value: true
|
||||||
|
- $formkit: checkbox
|
||||||
|
name: show_tags
|
||||||
|
label: 显示文章标签
|
||||||
|
value: true
|
||||||
|
|
||||||
- group: categories_page
|
- group: categories_page
|
||||||
label: 分类页
|
label: 分类页
|
||||||
@@ -217,7 +225,7 @@ spec:
|
|||||||
value:
|
value:
|
||||||
- $formkit: checkbox
|
- $formkit: checkbox
|
||||||
name: show_tags
|
name: show_tags
|
||||||
label: 归档页显示文章标签
|
label: 显示文章标签
|
||||||
value: false
|
value: false
|
||||||
|
|
||||||
- group: tags_page
|
- group: tags_page
|
||||||
|
|||||||
@@ -25,10 +25,8 @@
|
|||||||
Publish
|
Publish
|
||||||
Time
|
Time
|
||||||
</time>
|
</time>
|
||||||
<a data-pjax th:href="@{${post.status.permalink}}"><span class="post-list-title"
|
<a data-pjax th:href="@{${post.status.permalink}}"><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}, show = ${theme.config.archives_page.show_tags})}"/></div></span>
|
||||||
<th:block th:replace="~{modules/tag-list(post = ${post})}"
|
|
||||||
th:if="${theme.config.archives_page.show_tags}"/></div>
|
|
||||||
</li>
|
</li>
|
||||||
</th:block>
|
</th:block>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -32,7 +32,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:block th:replace="~{modules/tag-list(post = ${post})}"/>
|
th:text="${contributor.displayName}">Author</span><th:block th:replace="~{modules/tag-list(post = ${post}, show = ${theme.config.index_page.show_tags})}"/>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="post-excerpt">
|
<div class="post-excerpt">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<th:block th:fragment="tag-list(post)">
|
<th:block th:fragment="tag-list(post, show)">
|
||||||
<span class="post-tags" th:if="${not post.tags.isEmpty()}"><span class="post-tag" th:each="tag : ${post.tags}"><a data-pjax
|
<span class="post-tags" th:if="${show and not post.tags.isEmpty()}"><span class="post-tag" th:each="tag : ${post.tags}"><a data-pjax
|
||||||
th:href="@{${tag.status.permalink}}"
|
th:href="@{${tag.status.permalink}}"
|
||||||
th:title="${tag.spec.displayName}"
|
th:title="${tag.spec.displayName}"
|
||||||
th:text="'#'+${tag.spec.displayName}">#Tag</a>
|
th:text="'#'+${tag.spec.displayName}">#Tag</a>
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@
|
|||||||
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><th:block th:replace="~{modules/tag-list(post = ${post})}"/>
|
<span class="post-author" th:text="${post.owner.displayName}">Author</span><th:block th:replace="~{modules/tag-list(post = ${post}, show = ${theme.config.post_page.show_tags})}"/>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<section class="post-content">
|
<section class="post-content">
|
||||||
|
|||||||
Reference in New Issue
Block a user