页脚内容样式一和默认样式合并

This commit is contained in:
1152958806@qq.com 2023-09-04 12:35:07 +08:00
parent 30c9380986
commit 07cf2303ed
3 changed files with 66 additions and 66 deletions

View File

@ -1079,36 +1079,43 @@ spec:
name: footerContent
label: 页脚内容
value:
footerStyle: default
style_one:
owner_enable: false
runtime_enable: true
work_img: "https://0206.ink/upload/%E5%9B%B0%E5%9B%B0%E9%B1%BC-%E4%B8%8B%E7%8F%AD%E5%95%A6-yellowgreen.svg"
work_description: "距离月入25k也就还差一个大佬带我~"
offduty_img: "https://0206.ink/upload/%E5%9B%B0%E5%9B%B0%E9%B1%BC-%E4%B8%8B%E7%8F%AD%E5%95%A6-yellowgreen.svg"
offduty_description: "下班了就该开开心心的玩耍,嘿嘿~"
bdageitem:
- link: "https://halo.run/"
shields: "https://npm.elemecdn.com/hao-theme-static@1.2.0/templates/images/Frame-Halo-blue.svg"
message: "博客框架为halo2.x"
default_enable: true
children:
- $formkit: select
name: footerStyle
id: footeStyle
key: footeStyle
label: 样式
value: default
- $formkit: radio
name: default_enable
label: 底部
options:
- value: default
label: 默认
- value: one
label: 样式一
- label: 显示
value: true
- label: 隐藏
value: false
- $formkit: group
if: $get(footeStyle).value == 'one'
name: style_one
label: 样式一
label: 中间
value:
runtime_enable:
work_img:
work_description:
offduty_img:
offduty_description:
bdageitem:
children:
- $formkit: radio
name: owner_enable
label: 网站所有者
options:
- label: 显示
value: true
- label: 隐藏
value: false
- $formkit: radio
name: runtime_enable
id: runtime_enable
key: runtime_enable
value: true
label: 运行时间
options:
- label: 显示
@ -1120,32 +1127,25 @@ spec:
name: work_img
label: 上班时间的徽标
placeholder: 请输入内容
value: "https://0206.ink/upload/%E5%9B%B0%E5%9B%B0%E9%B1%BC-%E4%B8%8B%E7%8F%AD%E5%95%A6-yellowgreen.svg"
- $formkit: text
if: $get(runtime_enable).value
name: work_description
label: 上班时间的 title 描述
placeholder: 请输入内容
value: "距离月入25k也就还差一个大佬带我~"
- $formkit: attachment
if: $get(runtime_enable).value
name: offduty_img
label: 下班时间的徽标
placeholder: 请输入内容
value: "https://0206.ink/upload/%E5%9B%B0%E5%9B%B0%E9%B1%BC-%E4%B8%8B%E7%8F%AD%E5%95%A6-yellowgreen.svg"
- $formkit: text
if: $get(runtime_enable).value
name: offduty_description
label: 下班时间的 title 描述
placeholder: 请输入内容
value: "下班了就该开开心心的玩耍,嘿嘿~"
- $formkit: repeater
name: bdageitem
label: 徽标配置项
value:
- link: "https://halo.run/"
shields: "https://npm.elemecdn.com/hao-theme-static@1.2.0/templates/images/Frame-Halo-blue.svg"
message: "博客框架为halo2.x"
children:
- $formkit: url
name: link

View File

@ -3,7 +3,7 @@
<th:block th:fragment="footer-style-one">
<script th:if="${theme.config.footer.footerContent.footerStyle == 'one'}" async="async">(function () {
<script th:if="${theme.config.footer.footerContent.style_one.runtime_enable}" async="async">(function () {
var grt = new Date("[[${#strings.arraySplit(theme.config.basics.siteStartTime, '-')[1]}]]/[[${#strings.arraySplit(theme.config.basics.siteStartTime, '-')[2]}]]/[[${#strings.arraySplit(theme.config.basics.siteStartTime, '-')[0]}]] 00:00:00"); //设置网站上线时间
var now = new Date();
var dnum;

View File

@ -53,10 +53,45 @@
</th:block>
<!-- 底部 banner -->
<halo:footer />
<div th:if="${theme.config.footer.footerContent.footerStyle == 'default'}" id="footer-banner">
<div class="copyright" th:if="${not #strings.isEmpty(theme.config.basics.siteStartTime) && theme.config.footer.footerContent.style_one.owner_enable}">
©[[${#strings.arraySplit(theme.config.basics.siteStartTime, '-')[0]}]] - [[${#dates.format(new
java.util.Date(), 'yyyy')}]] By [[${site.title}]]
</div>
<div class="copyright" th:if="${#strings.isEmpty(theme.config.basics.siteStartTime) && theme.config.footer.footerContent.style_one.owner_enable}">
©[[${#dates.format(new java.util.Date(), 'yyyy')}]] By [[${site.title}]]
</div>
<div th:if="${theme.config.footer.footerContent.style_one.runtime_enable}" id="workboard"></div>
<p id="ghbdages"
th:with="bdageitem = ${theme.config.footer.footerContent.style_one.bdageitem}">
<a class="github-badge" th:each="data : ${bdageitem}" target="_blank"
th:href="@{${data.link}}" style="margin-inline:5px"
th:title="${data.message}">
<img th:with=" img = @{${data.shields}}"
th:src="${isLazyload ? '' : img}"
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>
<style>
.copyright,#ghbdages,#workboard {
text-align: center;
}
</style>
<style th:if="${(theme.config.footer.footerContent.style_one.owner_enable || not #lists.isEmpty(theme.config.footer.footerContent.style_one.bdageitem)) && theme.config.footer.footerContent.default_enable}">
#heo-footer {
margin-bottom: 1rem;
}
</style>
<div th:if="${theme.config.footer.footerContent.default_enable}" id="footer-banner">
<div class="footer-banner-links">
<div class="footer-banner-left">
<div id="footer-banner-tips">
@ -98,41 +133,6 @@
</div>
</div>
<th:block th:if="${theme.config.footer.footerContent.footerStyle == 'one'}">
<div class="copyright" th:if="${not #strings.isEmpty(theme.config.basics.siteStartTime)}">
©[[${#strings.arraySplit(theme.config.basics.siteStartTime, '-')[0]}]] - [[${#dates.format(new
java.util.Date(), 'yyyy')}]] By [[${site.title}]]
</div>
<div class="copyright" th:if="${#strings.isEmpty(theme.config.basics.siteStartTime)}">
©[[${#dates.format(new java.util.Date(), 'yyyy')}]] By [[${site.title}]]
</div>
<div th:if="${theme.config.footer.footerContent.style_one.runtime_enable}" id="workboard"></div>
<p id="ghbdages"
th:with="bdageitem = ${theme.config.footer.footerContent.style_one.bdageitem}">
<a class="github-badge" th:each="data : ${bdageitem}" target="_blank"
th:href="@{${data.link}}" style="margin-inline:5px"
th:title="${data.message}">
<img th:with=" img = @{${data.shields}}"
th:src="${isLazyload ? '' : img}"
th:data-lazy-src="${ isLazyload ? img : ''}"
th:alt="${data.message}" />
</a>
</p>
<span style="padding: 20px 20px;">
</span>
<style>
[data-theme="light"] .copyright,#ghbdages,#workboard{
color: var(--font-color);
}
.copyright,#ghbdages,#workboard {
position: relative;
padding: 0px 20px;
text-align: center;
}
</style>
</th:block>
<!-- 右下角 snackbar 弹窗 -->
<div th:if="${theme.config.tool.snackbar.switch}" class="needEndHide" id="cookies-window">