commit
fea7a349c7
|
@ -991,7 +991,7 @@ spec:
|
||||||
label: 页脚友链
|
label: 页脚友链
|
||||||
value:
|
value:
|
||||||
enable_footer_group:
|
enable_footer_group:
|
||||||
fetchUrl:
|
num:
|
||||||
children:
|
children:
|
||||||
- $formkit: radio
|
- $formkit: radio
|
||||||
name: enable_footer_group
|
name: enable_footer_group
|
||||||
|
@ -1003,6 +1003,12 @@ spec:
|
||||||
value: true
|
value: true
|
||||||
- label: 禁用
|
- label: 禁用
|
||||||
value: false
|
value: false
|
||||||
|
- $formkit: number
|
||||||
|
if: $get(enable_footer_group).value
|
||||||
|
name: num
|
||||||
|
label: 友链数
|
||||||
|
value: 3
|
||||||
|
validation: required
|
||||||
- $formkit: group
|
- $formkit: group
|
||||||
name: footerContent
|
name: footerContent
|
||||||
label: 页脚内容
|
label: 页脚内容
|
||||||
|
|
|
@ -139,7 +139,8 @@ var heo = {
|
||||||
addFriendLinksInFooter: function () {
|
addFriendLinksInFooter: function () {
|
||||||
const linksUrl = GLOBAL_CONFIG.source.links.linksUrl
|
const linksUrl = GLOBAL_CONFIG.source.links.linksUrl
|
||||||
const links = GLOBAL_CONFIG.source.links.linksData
|
const links = GLOBAL_CONFIG.source.links.linksData
|
||||||
var randomFriendLinks = getArrayItems(links, 3);
|
const num = GLOBAL_CONFIG.source.links.linksNum
|
||||||
|
var randomFriendLinks = getArrayItems(links, num);
|
||||||
var htmlText = '';
|
var htmlText = '';
|
||||||
for (let i = 0; i < randomFriendLinks.length; ++i) {
|
for (let i = 0; i < randomFriendLinks.length; ++i) {
|
||||||
var item = randomFriendLinks[i]
|
var item = randomFriendLinks[i]
|
||||||
|
|
|
@ -44,24 +44,23 @@
|
||||||
const footer = document.getElementById("footer");
|
const footer = document.getElementById("footer");
|
||||||
if (!footer) return
|
if (!footer) return
|
||||||
let currentTimeHtml = "";
|
let currentTimeHtml = "";
|
||||||
|
let img = "";
|
||||||
|
let description = "";
|
||||||
if (nowHour < 18 && nowHour >= 9) {
|
if (nowHour < 18 && nowHour >= 9) {
|
||||||
// 如果是上班时间,默认就是"困困鱼-上班摸鱼中.svg"图片,不需要更改
|
// 如果是上班时间
|
||||||
currentTimeHtml = `本站居然运行了 ${dnum} 天<span id='runtime'> ${hnum} 小时 ${mnum} 分 ${snum} 秒 </span><i class='haofont hao-icon-heartbeat' style='color:red'></i> <br> 旅行者 1 号当前距离地球 ${t} 千米,约为 ${n} 个天文单位 🚀`;
|
img = "[(${theme.config.footer.footerContent.style_one.work_img})]";
|
||||||
|
description = "[(${theme.config.footer.footerContent.style_one.work_description})]";
|
||||||
} else {
|
} else {
|
||||||
// 如果是下班时间,插入"困困鱼-下班啦.svg"图片
|
// 如果是下班时间
|
||||||
let img = document.querySelector("#workboard .workSituationImg");
|
img = "[(${theme.config.footer.footerContent.style_one.offduty_img})]";
|
||||||
img.src = "[[${theme.config.footer.footerContent.style_one.offduty_img}]]";
|
description = "[(${theme.config.footer.footerContent.style_one.offduty_description})]";
|
||||||
img.title = "[[${theme.config.footer.footerContent.style_one.offduty_description}]]";
|
|
||||||
img.alt = "[[${theme.config.footer.footerContent.style_one.offduty_description}]]";
|
|
||||||
|
|
||||||
currentTimeHtml = `本站居然运行了 ${dnum} 天<span id='runtime'> ${hnum} 小时 ${mnum} 分 ${snum} 秒 </span><i class='haofont hao-icon-heartbeat' style='color:red'></i> <br> 旅行者 1 号当前距离地球 ${t} 千米,约为 ${n} 个天文单位 🚀`;
|
|
||||||
}
|
}
|
||||||
|
if (document.getElementById("workboard")) {
|
||||||
if (document.getElementById("runtimeTextTip")) {
|
currentTimeHtml = `<img class="workSituationImg boardsign" src="${img}" alt="${description}" title="${description}">
|
||||||
document.getElementById("runtimeTextTip").innerHTML = currentTimeHtml;
|
<div id="runtimeTextTip"> 本站居然运行了 ${dnum} 天<span id='runtime'> ${hnum} 小时 ${mnum} 分 ${snum} 秒 </span><i class='haofont hao-icon-heartbeat' style='color:red'></i> <br> 旅行者 1 号当前距离地球 ${t} 千米,约为 ${n} 个天文单位 🚀 </div>`
|
||||||
|
document.getElementById("workboard").innerHTML = currentTimeHtml;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
updateTime();
|
updateTime();
|
||||||
updateHtml();
|
updateHtml();
|
||||||
|
|
|
@ -103,13 +103,7 @@
|
||||||
<div class="copyright" th:if="${#strings.isEmpty(theme.config.basics.siteStartTime)}">
|
<div class="copyright" th:if="${#strings.isEmpty(theme.config.basics.siteStartTime)}">
|
||||||
©[[${#dates.format(new java.util.Date(), 'yyyy')}]] By [[${site.title}]]
|
©[[${#dates.format(new java.util.Date(), 'yyyy')}]] By [[${site.title}]]
|
||||||
</div>
|
</div>
|
||||||
<div th:if="${theme.config.footer.footerContent.style_one.runtime_enable}" id="workboard">
|
<div th:if="${theme.config.footer.footerContent.style_one.runtime_enable}" id="workboard"></div>
|
||||||
<img class="workSituationImg boardsign"
|
|
||||||
th:src="${theme.config.footer.footerContent.style_one.work_img}"
|
|
||||||
th:alt="${theme.config.footer.footerContent.style_one.work_description}"
|
|
||||||
th:title="${theme.config.footer.footerContent.style_one.work_description}" />
|
|
||||||
<div id="runtimeTextTip"></div>
|
|
||||||
</div>
|
|
||||||
<p id="ghbdages"
|
<p id="ghbdages"
|
||||||
th:with="bdageitem = ${theme.config.footer.footerContent.style_one.bdageitem}">
|
th:with="bdageitem = ${theme.config.footer.footerContent.style_one.bdageitem}">
|
||||||
<a class="github-badge" th:each="data : ${bdageitem}" target="_blank"
|
<a class="github-badge" th:each="data : ${bdageitem}" target="_blank"
|
||||||
|
|
|
@ -211,7 +211,8 @@
|
||||||
source: {
|
source: {
|
||||||
links: {
|
links: {
|
||||||
linksUrl: [[${ theme.config.link.linksUrl }]],
|
linksUrl: [[${ theme.config.link.linksUrl }]],
|
||||||
linksData: []
|
linksData: [],
|
||||||
|
linksNum: [[${theme.config.footer.footer_group.num}]],
|
||||||
},
|
},
|
||||||
jQuery: 'https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery/3.6.0/jquery.min.js',
|
jQuery: 'https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery/3.6.0/jquery.min.js',
|
||||||
justifiedGallery: {
|
justifiedGallery: {
|
||||||
|
|
Loading…
Reference in New Issue