mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-15 16:39:40 +08:00
feat(profile):增加信息模块统计项配置
增加信息模块统计项配置
This commit is contained in:
parent
06a2ee2fc0
commit
7a331658a6
@ -590,6 +590,31 @@ spec:
|
|||||||
name: profile_location
|
name: profile_location
|
||||||
label: 侧边栏信息-地理位置
|
label: 侧边栏信息-地理位置
|
||||||
placeholder: '请输入个人所在地'
|
placeholder: '请输入个人所在地'
|
||||||
|
- $formkit: repeater
|
||||||
|
name: custom_stats
|
||||||
|
label: 侧边栏信息-统计
|
||||||
|
help: 可最多配置3个统计项,未配置统计项时不显示。
|
||||||
|
max: 3
|
||||||
|
value:
|
||||||
|
- type: post
|
||||||
|
- type: category
|
||||||
|
- type: comment
|
||||||
|
children:
|
||||||
|
- $formkit: select
|
||||||
|
name: type
|
||||||
|
label: 统计项
|
||||||
|
value: ""
|
||||||
|
options:
|
||||||
|
- value: 'post'
|
||||||
|
label: 文章数量
|
||||||
|
- value: 'category'
|
||||||
|
label: 分类数量
|
||||||
|
- value: 'comment'
|
||||||
|
label: 评论数量
|
||||||
|
- value: 'upvote'
|
||||||
|
label: 点赞数量
|
||||||
|
- value: 'visit'
|
||||||
|
label: 访问数量
|
||||||
- $formkit: text
|
- $formkit: text
|
||||||
name: profile_theme_button
|
name: profile_theme_button
|
||||||
label: 侧边栏信息-主题按钮
|
label: 侧边栏信息-主题按钮
|
||||||
@ -1082,4 +1107,4 @@ spec:
|
|||||||
name: inline_js_body
|
name: inline_js_body
|
||||||
label: "内嵌JS(body)"
|
label: "内嵌JS(body)"
|
||||||
placeholder: 请输入 JS 代码内容
|
placeholder: 请输入 JS 代码内容
|
||||||
help: '填入JS代码,无需script标签,将插入body标签尾部。'
|
help: '填入JS代码,无需script标签,将插入body标签尾部。'
|
||||||
|
@ -15,23 +15,27 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<nav class="level">
|
<nav class="level" th:if="${!#lists.isEmpty(theme.config.sidebar.custom_stats)}">
|
||||||
<div class="level-item">
|
<div th:each="item,sindex :${theme.config.sidebar.custom_stats}" class="level-item" th:switch="${item.type}">
|
||||||
<div>
|
<div th:case="visit">
|
||||||
<p class="heading">文章</p>
|
<p class="heading">访问</p>
|
||||||
<p class="value" th:text="${stats.post}"></p>
|
<p class="value" th:text="${stats.visit}"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div th:case="upvote">
|
||||||
<div class="level-item has-text-centered is-marginless">
|
<p class="heading">点赞</p>
|
||||||
<div>
|
<p class="value" th:text="${stats.upvote}"></p>
|
||||||
|
</div>
|
||||||
|
<div th:case="comment">
|
||||||
|
<p class="heading">评论</p>
|
||||||
|
<p class="value" th:text="${stats.comment}"></p>
|
||||||
|
</div>
|
||||||
|
<div th:case="category">
|
||||||
<p class="heading">分类</p>
|
<p class="heading">分类</p>
|
||||||
<p class="value" th:text="${stats.category}"></p>
|
<p class="value" th:text="${stats.category}"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div th:case="*">
|
||||||
<div class="level-item">
|
<p class="heading">文章</p>
|
||||||
<div>
|
<p class="value" th:text="${stats.post}"></p>
|
||||||
<p class="heading">评论</p>
|
|
||||||
<p class="value" th:text="${stats.comment}"></p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
@ -52,4 +56,4 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user