add: `页脚`增加云服务商展示

This commit is contained in:
liuxuewen 2023-12-28 16:35:34 +08:00
parent 030293dda8
commit e12dc7d305
9 changed files with 203 additions and 83 deletions

View File

@ -1058,7 +1058,15 @@ spec:
name: footerContent
label: 页脚内容
value:
default_enable: true
default_enable_group:
default_enable: true
dingyue: true
zhuti: true
about: true
icp_icon: true
gongwangan: true
yingsi: true
yunzhichi: false
style_one:
owner_enable: false
runtime_enable: true
@ -1072,76 +1080,131 @@ spec:
shields: "https://npm.onmicrosoft.cn/hao-theme-static@1.3.6/images/Frame-Halo-blue.svg"
message: "博客框架为halo2.x"
children:
- $formkit: radio
name: default_enable
id: default_enable
key: default_enable
label: 底部
options:
- label: 显示
value: true
- label: 隐藏
value: false
- $formkit: radio
if: $get(default_enable).value
name: dingyue
default_enable: true
label: 订阅
options:
- label: 显示
value: true
- label: 隐藏
value: false
- $formkit: radio
if: $get(default_enable).value
name: zhuti
default_enable: true
label: 主题
options:
- label: 显示
value: true
- label: 隐藏
value: false
- $formkit: radio
if: $get(default_enable).value
name: about
default_enable: true
label: 关于
options:
- label: 显示
value: true
- label: 隐藏
value: false
- $formkit: radio
if: $get(default_enable).value
name: icp_icon
default_enable: true
label: icp备案
options:
- label: 显示
value: true
- label: 隐藏
value: false
- $formkit: radio
if: $get(default_enable).value
name: gongwangan
default_enable: true
label: 公网安备案
options:
- label: 显示
value: true
- label: 隐藏
value: false
- $formkit: radio
if: $get(default_enable).value
name: yingsi
default_enable: true
label: yingsi
options:
- label: 显示
value: true
- label: 隐藏
value: false
- $formkit: group
name: default_enable_group
label: 底部页脚
value:
children:
- $formkit: radio
name: default_enable
id: default_enable
key: default_enable
label: 底部启用
options:
- label: 显示
value: true
- label: 隐藏
value: false
- $formkit: radio
if: $get(default_enable).value
name: dingyue
id: dingyue
key: dingyue
label: 订阅
options:
- label: 显示
value: true
- label: 隐藏
value: false
- $formkit: radio
if: $get(default_enable).value
name: zhuti
id: zhuti
key: zhuti
label: 主题
options:
- label: 显示
value: true
- label: 隐藏
value: false
- $formkit: radio
if: $get(default_enable).value
name: about
id: about
key: about
label: 关于
options:
- label: 显示
value: true
- label: 隐藏
value: false
- $formkit: radio
if: $get(default_enable).value
name: icp_icon
id: icp_icon
key: icp_icon
label: icp备案
options:
- label: 显示
value: true
- label: 隐藏
value: false
- $formkit: radio
if: $get(default_enable).value
name: gongwangan
id: gongwangan
key: gongwangan
label: 公网安备案
options:
- label: 显示
value: true
- label: 隐藏
value: false
- $formkit: radio
if: $get(default_enable).value
name: yingsi
id: yingsi
key: yingsi
label: 隐私
options:
- label: 显示
value: true
- label: 隐藏
value: false
- $formkit: radio
if: $get(default_enable).value
name: yunzhichi
id: yunzhichi
key: yunzhichi
label: 云服务支持
options:
- label: 显示
value: true
- label: 隐藏
value: false
- $formkit: select
name: yunzhichi_list
id: yunzhichi_list
key: yunzhichi_list
if: $get(yunzhichi).value
label: 云服务商
options:
- value: upyun_cloud
label: 又拍云
- value: aliyun_cloud
label: 阿里云
- value: tencent_cloud
label: 腾讯云
- value: huawei_cloud
label: 华为云
- value: custom_cloud
label: 自定义地址
- $formkit: attachment
name: yunzhichi_url
id: yunzhichi_url
key: yunzhichi_url
label: 自定义云支持地址
if: $get(yunzhichi_list).value == 'custom_cloud'
value:
placeholder: 请输入自定义云支持地址
- $formkit: attachment
name: yunzhichi_url_link
id: yunzhichi_url_link
key: yunzhichi_url_link
label: 自定义云支持跳转地址
if: $get(yunzhichi_list).value == 'custom_cloud'
value:
placeholder: 请输入自定义云支持跳转地址(注意是跳转地址不是图片展示地址)
- $formkit: group
name: style_one
label: 中间

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -1,5 +1,5 @@
<!-- 页脚模块 -->
<footer id="footer">
<footer id="footer" xmlns:th="http://www.w3.org/1999/xhtml">
<div id="heo-footer-bar" th:if="${theme.config.footer.footer_bar.footer_bar_enable}">
<div class="footer-logo"><th:block th:utext="${theme.config.footer.footer_bar.logo}"></th:block></div>
@ -79,7 +79,7 @@
th:data-lazy-src="${ isLazyload ? img : ''}" th:alt="${data.message}" />
</a>
</p>
<span th:if="${!theme.config.footer.footerContent.default_enable}" style="padding: 20px 20px;">
<span th:if="${!theme.config.footer.footerContent.default_enable_group.default_enable}" style="padding: 20px 20px;">
</span>
@ -95,13 +95,13 @@
th:if="${(theme.config.footer.footerContent.style_one.owner_enable
|| (not #lists.isEmpty(theme.config.footer.footerContent.style_one.bdageitem) && theme.config.footer.footerContent.style_one.bdageitem_enable )
|| theme.config.footer.footerContent.style_one.runtime_enable)
&& theme.config.footer.footerContent.default_enable}">
&& theme.config.footer.footerContent.default_enable_group.default_enable}">
#heo-footer {
margin-bottom: 1rem;
}
</style>
<div th:if="${theme.config.footer.footerContent.default_enable}" id="footer-banner">
<div th:if="${theme.config.footer.footerContent.default_enable_group.default_enable}" id="footer-banner">
<div class="footer-banner-links">
<div class="footer-banner-left">
<div id="footer-banner-tips">
@ -118,11 +118,58 @@
</div>
</div>
<div class="footer-banner-right">
<!-- 又拍云 -->
<a th:if="${theme.config.footer.footerContent.default_enable_group.yunzhichi && theme.config.footer.footerContent.default_enable_group.yunzhichi_list == 'upyun_cloud'}"
class="footer-banner-link cloud" href="https://www.upyun.com/"
rel="noopener external nofollow noreferrer noopener"
target="_blank">
<span>本网站由</span>&nbsp;&nbsp;
<img th:src="${assets_link + '/images/footer/upyun-5.png'}" alt="upyun" class="entered loading cloud" />
&nbsp;&nbsp;<span>提供CDN加速/云存储服务</span>
</a>
<!-- 阿里云 -->
<a th:if="${theme.config.footer.footerContent.default_enable_group.yunzhichi && theme.config.footer.footerContent.default_enable_group.yunzhichi_list == 'aliyun_cloud'}"
class="footer-banner-link cloud" href="https://www.aliyun.com/"
rel="noopener external nofollow noreferrer noopener"
target="_blank">
<span>本网站由</span>&nbsp;&nbsp;
<img th:src="${assets_link + '/images/footer/aliyun.png'}" alt="aliyun_cloud" class="entered loading cloud" />
&nbsp;&nbsp;<span>提供CDN加速/云存储服务</span>
</a>
<!-- 腾讯云 -->
<a th:if="${theme.config.footer.footerContent.default_enable_group.yunzhichi && theme.config.footer.footerContent.default_enable_group.yunzhichi_list == 'tencent_cloud'}"
class="footer-banner-link cloud" href="https://cloud.tencent.com/"
rel="noopener external nofollow noreferrer noopener"
target="_blank">
<span>本网站由</span>&nbsp;&nbsp;
<img th:src="${assets_link + '/images/footer/tencent.png'}" alt="tencent_cloud" class="entered loading cloud" />
&nbsp;&nbsp;<span>提供CDN加速/云存储服务</span>
</a>
<!-- 华为云 -->
<a th:if="${theme.config.footer.footerContent.default_enable_group.yunzhichi && theme.config.footer.footerContent.default_enable_group.yunzhichi_list == 'huawei_cloud'}"
class="footer-banner-link cloud" href="https://www.huaweicloud.com/"
rel="noopener external nofollow noreferrer noopener"
target="_blank">
<span>本网站由</span>&nbsp;&nbsp;
<img th:src="${assets_link + '/images/footer/huawei.png'}" alt="huawei_cloud" class="entered loading cloud" />
&nbsp;&nbsp;<span>提供CDN加速/云存储服务</span>
</a>
<!-- 自定义云服务信息 -->
<a th:if="${theme.config.footer.footerContent.default_enable_group.yunzhichi && theme.config.footer.footerContent.default_enable_group.yunzhichi_list == 'custom_cloud' && not #strings.isEmpty(theme.config.footer.footerContent.default_enable_group.yunzhichi_url)}"
class="footer-banner-link cloud" th:href="@{${theme.config.footer.footerContent.default_enable_group.yunzhichi_url_link}}"
rel="noopener external nofollow noreferrer noopener"
target="_blank">
<span>本网站由</span>&nbsp;&nbsp;
<img th:src="@{${theme.config.footer.footerContent.default_enable_group.yunzhichi_url}}" alt="custom_cloud" class="entered loading cloud"/>
&nbsp;&nbsp;<span>提供CDN加速/云存储服务</span>
</a>
<!-- 订阅 需要 RSS 插件支持 -->
<a class="footer-banner-link" href="/rss.xml" th:if="${pluginFinder.available('PluginFeed')} and ${theme.config.footer.footerContent.dingyue}">订阅</a>
<a th:if="${theme.config.footer.footerContent.zhuti}" class="footer-banner-link" href="https://github.com/liuzhihang/halo-theme-hao">主题</a>
<a th:if="${theme.config.footer.footerContent.about}" class="footer-banner-link" href="/about">关于</a>
<a th:if="${not #strings.isEmpty(theme.config.basics.icp) && theme.config.footer.footerContent.icp_icon}"
<a class="footer-banner-link" href="/rss.xml" th:if="${pluginFinder.available('PluginFeed')} and ${theme.config.footer.footerContent.default_enable_group.dingyue}">订阅</a>
<a th:if="${theme.config.footer.footerContent.default_enable_group.zhuti}" class="footer-banner-link" href="https://github.com/liuzhihang/halo-theme-hao">主题</a>
<a th:if="${theme.config.footer.footerContent.default_enable_group.about}" class="footer-banner-link" href="/about">关于</a>
<a th:if="${not #strings.isEmpty(theme.config.basics.icp) && theme.config.footer.footerContent.default_enable_group.icp_icon}"
class="footer-banner-link" href="https://beian.miit.gov.cn/#/Integrated/index"
rel="noopener external nofollow noreferrer noopener"
target="_blank">
@ -131,7 +178,7 @@
<img th:if="${#strings.startsWith(theme.config.basics.icp, 'http')}"
th:src="@{${theme.config.basics.icp}}" alt="icp"/>
</a>
<a th:if="${not #strings.isEmpty(theme.config.basics.gongan) && theme.config.footer.footerContent.gongwangan}"
<a th:if="${not #strings.isEmpty(theme.config.basics.gongan) && theme.config.footer.footerContent.default_enable_group.gongwangan}"
class="footer-banner-link" href="http://www.beian.gov.cn/portal/registerSystemInfo"
rel="noopener external nofollow noreferrer noopener"
target="_blank">
@ -140,7 +187,7 @@
th:src="@{${theme.config.basics.gongan}}" alt="gongan"/>
</a>
<a class="footer-banner-link cc" th:href="${theme.config.basics.copyrightAgreement}"
th:if="${not #strings.isEmpty(theme.config.basics.copyrightAgreement) && theme.config.footer.footerContent.yingsi}" title="cc协议">
th:if="${not #strings.isEmpty(theme.config.basics.copyrightAgreement) && theme.config.footer.footerContent.default_enable_group.yingsi}" title="cc协议">
<i class="haofont hao-icon-copyright-line"></i>
<i class="haofont hao-icon-creative-commons-by-line"></i>
<i class="haofont hao-icon-creative-commons-nc-line"></i>
@ -166,4 +213,14 @@
<!--评论弹幕弹窗 -->
<div class="comment-barrage needEndHide" style="display: none;"></div>
<style>
a.footer-banner-link.cloud {
display: flex;
align-items: center;
}
img.entered.loading.cloud {
height: 32px;
}
</style>
</footer>

View File

@ -129,7 +129,7 @@
locale: [[${not #strings.isEmpty(theme.config.comments.walines.locale) ? theme.config.comments.walines.locale : '' }]]
},
footer: {
default_enable: [[${theme.config.footer.footerContent.default_enable}]]
default_enable: [[${theme.config.footer.footerContent.default_enable_group.default_enable}]]
}
}
};

View File

@ -51,5 +51,5 @@ spec:
repo: https://githubfast.com/liuzhihang/halo-theme-hao
settingName: "theme-hao-setting"
configMapName: "theme-hao-configMap"
version: "1.4.5"
version: "1.4.5.7"
require: ">=2.10.0"