From a94fcd8e181eff234771686ba35e9a958d468ce5 Mon Sep 17 00:00:00 2001 From: liuzhihang Date: Thu, 31 Aug 2023 18:35:43 +0800 Subject: [PATCH 1/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5e988832..0b27b226 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@

-[主题预览](#-预览) | [快速上手](#-安装) | [使用文档](https://docs.liuzhihang.com) | [加入我们](#-讨论) +[主题预览](#-预览) | [快速上手](#-安装) | [使用文档](https://www.yuque.com/liuzhihangs/halo-theme-hao) | [加入我们](#-讨论)

From 2f543a8e35db76b86600148df9775423ca274b7f Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <1152958806@qq.com> Date: Thu, 31 Aug 2023 22:32:41 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=A1=B5=E8=84=9A?= =?UTF-8?q?=E5=8F=8B=E8=81=94bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/assets/js/heo.js | 8 ++++++- templates/assets/zhheo/blogex.js | 41 +++++++++++++------------------- templates/moments.html | 1 - 3 files changed, 24 insertions(+), 26 deletions(-) diff --git a/templates/assets/js/heo.js b/templates/assets/js/heo.js index ab3e6c40..faf2bc9f 100644 --- a/templates/assets/js/heo.js +++ b/templates/assets/js/heo.js @@ -70,6 +70,10 @@ var heo = { const linksUrl = GLOBAL_CONFIG.source.links.linksUrl const links = GLOBAL_CONFIG.source.links.linksData const num = GLOBAL_CONFIG.source.links.linksNum + console.log() + if(links){ + + } var randomFriendLinks = getArrayItems(links, num); var htmlText = ''; for (let i = 0; i < randomFriendLinks.length; ++i) { @@ -77,7 +81,9 @@ var heo = { htmlText += `${item.spec.displayName}`; } htmlText += `更多` - document.getElementById("friend-links-in-footer").innerHTML = htmlText; + if(document.getElementById("friend-links-in-footer")){ + document.getElementById("friend-links-in-footer").innerHTML = htmlText; + } }, //禁止图片右键单击 diff --git a/templates/assets/zhheo/blogex.js b/templates/assets/zhheo/blogex.js index b23d7675..04ab9131 100644 --- a/templates/assets/zhheo/blogex.js +++ b/templates/assets/zhheo/blogex.js @@ -647,24 +647,25 @@ function listenToPageInputPress() { function initBlog() { // 图片主色 GLOBAL_CONFIG.source.post.dynamicBackground && coverColor(), - percent(), - heo.topCategoriesBarScroll(), - heo.initIndexEssay(), - setBodyDataType(), - listenToPageInputPress(), - heo.topPostScroll(), - heo.sayhi(), - heo.qrcodeCreate(), - //右下角 snackbar 弹窗 + percent(), + heo.topCategoriesBarScroll(), + heo.initIndexEssay(), + setBodyDataType(), + listenToPageInputPress(), + heo.topPostScroll(), + heo.sayhi(), + heo.qrcodeCreate(), + //右下角 snackbar 弹窗 GLOBAL_CONFIG.source.tool.switch && heo.hidecookie(), - heo.stopImgRightDrag(), - heo.onlyHome(), - heo.addNavBackgroundInit(), - heo.darkModeStatus(), - heo.initThemeColor(), - //隐藏加载动画 + heo.stopImgRightDrag(), + heo.onlyHome(), + heo.addNavBackgroundInit(), + heo.reflashEssayWaterFall(), + heo.darkModeStatus(), + heo.initThemeColor(), + //隐藏加载动画 GLOBAL_CONFIG.loadingBox && heo.hideLoading(), - checkUrlAndAddHideBanner() + checkUrlAndAddHideBanner() } // 如果当前页有评论就执行函数 @@ -861,11 +862,3 @@ document.addEventListener('pjax:send', function () { }) - -document.addEventListener('DOMContentLoaded', function () { - //页脚友联 - if(GLOBAL_CONFIG.isFriendLinksInFooter){ - heo.addFriendLinksInFooter() - } - heo.reflashEssayWaterFall() -}) diff --git a/templates/moments.html b/templates/moments.html index 6af2524e..33ccd50d 100644 --- a/templates/moments.html +++ b/templates/moments.html @@ -62,7 +62,6 @@ -
Date: Thu, 31 Aug 2023 22:34:10 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=A1=B5=E8=84=9A?= =?UTF-8?q?=E5=8F=8B=E8=81=94bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/assets/js/heo.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/templates/assets/js/heo.js b/templates/assets/js/heo.js index faf2bc9f..47711224 100644 --- a/templates/assets/js/heo.js +++ b/templates/assets/js/heo.js @@ -70,10 +70,6 @@ var heo = { const linksUrl = GLOBAL_CONFIG.source.links.linksUrl const links = GLOBAL_CONFIG.source.links.linksData const num = GLOBAL_CONFIG.source.links.linksNum - console.log() - if(links){ - - } var randomFriendLinks = getArrayItems(links, num); var htmlText = ''; for (let i = 0; i < randomFriendLinks.length; ++i) { From 3c196c0cdb1a434d568f3f57493c0acb948c715e Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <1152958806@qq.com> Date: Thu, 31 Aug 2023 23:51:41 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=A1=B5=E8=84=9A?= =?UTF-8?q?=E5=8F=8B=E8=81=94bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/assets/js/custom.js | 2 +- templates/assets/js/heo.js | 3 +++ templates/assets/zhheo/blogex.js | 39 ++++++++++++--------------- templates/modules/layouts/layout.html | 5 +--- 4 files changed, 22 insertions(+), 27 deletions(-) diff --git a/templates/assets/js/custom.js b/templates/assets/js/custom.js index 1230a6c5..cf7a046a 100644 --- a/templates/assets/js/custom.js +++ b/templates/assets/js/custom.js @@ -432,7 +432,7 @@ document.addEventListener("DOMContentLoaded", () => { // flink 友链标签 customElements.define( "hao-flink", - class HaoGalleryGroup extends HTMLElement { + class HaoFlink extends HTMLElement { constructor() { super(); this.options = { diff --git a/templates/assets/js/heo.js b/templates/assets/js/heo.js index ab3e6c40..1872d21e 100644 --- a/templates/assets/js/heo.js +++ b/templates/assets/js/heo.js @@ -78,6 +78,9 @@ var heo = { } htmlText += `更多` document.getElementById("friend-links-in-footer").innerHTML = htmlText; + if(document.getElementById("friend-links-in-footer")){ + document.getElementById("friend-links-in-footer").innerHTML = htmlText; + } }, //禁止图片右键单击 diff --git a/templates/assets/zhheo/blogex.js b/templates/assets/zhheo/blogex.js index b23d7675..96c227a8 100644 --- a/templates/assets/zhheo/blogex.js +++ b/templates/assets/zhheo/blogex.js @@ -647,24 +647,24 @@ function listenToPageInputPress() { function initBlog() { // 图片主色 GLOBAL_CONFIG.source.post.dynamicBackground && coverColor(), - percent(), - heo.topCategoriesBarScroll(), - heo.initIndexEssay(), - setBodyDataType(), - listenToPageInputPress(), - heo.topPostScroll(), - heo.sayhi(), - heo.qrcodeCreate(), - //右下角 snackbar 弹窗 + percent(), + heo.topCategoriesBarScroll(), + heo.initIndexEssay(), + setBodyDataType(), + listenToPageInputPress(), + heo.topPostScroll(), + heo.sayhi(), + heo.qrcodeCreate(), + //右下角 snackbar 弹窗 GLOBAL_CONFIG.source.tool.switch && heo.hidecookie(), - heo.stopImgRightDrag(), - heo.onlyHome(), - heo.addNavBackgroundInit(), - heo.darkModeStatus(), - heo.initThemeColor(), - //隐藏加载动画 + heo.stopImgRightDrag(), + heo.onlyHome(), + heo.addNavBackgroundInit(), + heo.darkModeStatus(), + heo.initThemeColor(), + //隐藏加载动画 GLOBAL_CONFIG.loadingBox && heo.hideLoading(), - checkUrlAndAddHideBanner() + checkUrlAndAddHideBanner() } // 如果当前页有评论就执行函数 @@ -859,13 +859,8 @@ document.addEventListener('pjax:send', function () { heo.showLoading(); } - }) - document.addEventListener('DOMContentLoaded', function () { - //页脚友联 - if(GLOBAL_CONFIG.isFriendLinksInFooter){ - heo.addFriendLinksInFooter() - } heo.reflashEssayWaterFall() }) + diff --git a/templates/modules/layouts/layout.html b/templates/modules/layouts/layout.html index 94078fb2..42609c6a 100644 --- a/templates/modules/layouts/layout.html +++ b/templates/modules/layouts/layout.html @@ -220,10 +220,7 @@ removeLoading(); } //页脚友联 - if(GLOBAL_CONFIG.isFriendLinksInFooter){ - heo.addFriendLinksInFooter() - } - + GLOBAL_CONFIG.isFriendLinksInFooter && heo.addFriendLinksInFooter() //音乐页面切换歌曲调用 if(GLOBAL_CONFIG.isMusic){ heo.changeMusicBg(false); From b4be184d8430b13b13f0ebf9aa7b9f8c4bcd428d Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <1152958806@qq.com> Date: Fri, 1 Sep 2023 00:13:11 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E8=BF=98=E5=8E=9Fmoments=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/assets/zhheo/blogex.js | 4 ---- templates/moments.html | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/templates/assets/zhheo/blogex.js b/templates/assets/zhheo/blogex.js index 74b2c735..703fcfca 100644 --- a/templates/assets/zhheo/blogex.js +++ b/templates/assets/zhheo/blogex.js @@ -864,9 +864,5 @@ document.addEventListener('pjax:send', function () { }) document.addEventListener('DOMContentLoaded', function () { - //页脚友联 - if(GLOBAL_CONFIG.isFriendLinksInFooter){ - heo.addFriendLinksInFooter() - } heo.reflashEssayWaterFall() }) diff --git a/templates/moments.html b/templates/moments.html index 33ccd50d..6af2524e 100644 --- a/templates/moments.html +++ b/templates/moments.html @@ -62,6 +62,7 @@ +