update:完善社交信息,新增自定义社交信息(#33)

This commit is contained in:
jiewenhuang 2023-08-27 01:22:24 +08:00
parent ebd5f11341
commit 920628d607
2 changed files with 76 additions and 3 deletions

View File

@ -883,7 +883,19 @@ spec:
label: 开启
- value: false
label: 关闭
- $formkit: radio
name: option_social_data
id: option_social_data
label: 社交信息来源
value: "default"
help: "是否在移动端展示社交账号,默认关闭"
options:
- value: default
label: 默认
- value: custom
label: 自定义
- $formkit: repeater
if: "$get(option_social_data).value === 'default'"
name: socials
id: socials
key: socials
@ -912,14 +924,58 @@ spec:
value: qq
- label: 微博
value: weibo
- label: 豆瓣
value: douban
- label: 抖音 / TikTok
value: tiktok
- label: Facebook
value: facebook
- label: Instagram
value: instagram
- label: LinkedIn
value: linkedin
- label: Twitter
value: twitter
- label: Slack
value: slack
- label: Discord
value: discord
- label: YouTube
value: youtube
- label: Steam
value: steam
- label: GitLab
value: gitlab
- $formkit: text
name: socialUrl
label: 链接
help: "邮箱填邮箱号QQ填QQ号其他填跳转链接"
validation: "required"
- $formkit: repeater
if: "$get(option_social_data).value === 'custom'"
name: custom_socials
id: custom_socials
key: custom_socials
label: 自定义社交信息
children:
- $formkit: text
name: socials_name
label: 名称
validation: "required"
- $formkit: url
name: socials_url
label: 跳转链接
validation: "required"
- $formkit: text
name: socials_icon
label: svg代码或者图片(如果使用图片请输入完整img标签)
validation: "required"
- $formkit: radio
name: enable_weather
id: enable_weather
label: 展示博主信息
label: 展示天气信息
value: false
help: "是否展示简约版天气信息必须配置正确的appKey后才可生效"
options:
@ -1434,6 +1490,11 @@ spec:
label:
- value: false
label:
- $formkit: text
name: post_author_link
label: 文章页作者跳转链接
value: ""
help: "留空则不跳转"
- $formkit: radio
@ -2301,6 +2362,11 @@ spec:
label: 开启
- value: false
label: 关闭
- $formkit: text
name: baidu_token
label: 百度推送Token
value: ""
help: "文章页未收录时会自动将当前链接推送给百度加快收录Token在百度收录平台注册账号获取必须启用“检查百度收录”并填入token才生效https://ziyuan.baidu.com/linksubmit"
- $formkit: select
name: enable_console_theme
label: 控制台输出主题信息

View File

@ -113,12 +113,19 @@
<th:block th:if="${theme.config.blogger.enable_weather and theme.config.blogger.weather_key !=''}">
<div id="he-plugin-simple"></div>
</th:block>
<th:block th:if="${theme.config.blogger.enable_social}">
<th:block th:if="${not #lists.isEmpty(theme.config.blogger.enable_social)}">
<th:block th:if="${theme.config.blogger.option_social_data == 'default'}">
<div class="social-account">
<th:block th:each="socials : ${theme.config.blogger.socials}">
<th:block th:replace="~{modules/macro/social :: ${socials.socials_select}}" />
<th:block th:replace="~{modules/widgets/social :: ${socials.socials_select}}" />
</th:block>
</div>
</th:block>
<th:block th:if="${theme.config.blogger.option_social_data == 'custom'}">
<div class="social-account">
<th:block th:replace="~{modules/widgets/social :: custom_socials}" />
</div>
</th:block>
</th:block>
<th:block th:if="${theme.config.blogger.enable_strips}">
<canvas id="canvas-strips" width="300" height="340"></canvas>