From 7a331658a68aa9df319394c8d620b201a3ae966c Mon Sep 17 00:00:00 2001 From: mjking <1406993111@qq.com> Date: Fri, 1 Dec 2023 13:36:24 +0800 Subject: [PATCH] =?UTF-8?q?feat(profile)=EF=BC=9A=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=A8=A1=E5=9D=97=E7=BB=9F=E8=AE=A1=E9=A1=B9?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加信息模块统计项配置 --- settings.yaml | 27 ++++++++++++++++++++++++++- templates/widget/profile.html | 32 ++++++++++++++++++-------------- 2 files changed, 44 insertions(+), 15 deletions(-) diff --git a/settings.yaml b/settings.yaml index 6cf9fe4..ff59093 100644 --- a/settings.yaml +++ b/settings.yaml @@ -590,6 +590,31 @@ spec: name: profile_location label: 侧边栏信息-地理位置 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 name: profile_theme_button label: 侧边栏信息-主题按钮 @@ -1082,4 +1107,4 @@ spec: name: inline_js_body label: "内嵌JS(body)" placeholder: 请输入 JS 代码内容 - help: '填入JS代码,无需script标签,将插入body标签尾部。' \ No newline at end of file + help: '填入JS代码,无需script标签,将插入body标签尾部。' diff --git a/templates/widget/profile.html b/templates/widget/profile.html index b8c70d6..f619ecf 100644 --- a/templates/widget/profile.html +++ b/templates/widget/profile.html @@ -15,23 +15,27 @@
-