From 116260c117696368c136173cd8819438276a2265 Mon Sep 17 00:00:00 2001 From: liuzhihang Date: Wed, 19 Oct 2022 00:59:38 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=BC=B9=E5=B9=95=E7=95=99?= =?UTF-8?q?=E8=A8=80=EF=BC=8C=E8=B0=83=E6=95=B4=20JS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/404.html | 266 -------- templates/assets/js/heo.js | 127 ++-- templates/assets/js/main.js | 48 +- templates/assets/zhheo/blogex.js | 67 +- templates/assets/zhheo/privacy.js | 1 - templates/assets/zhheo/zhheoblog.css | 874 +------------------------- templates/modules/layouts/layout.html | 311 ++++----- templates/modules/loading-box.html | 19 + templates/modules/time-list.html | 22 +- 9 files changed, 261 insertions(+), 1474 deletions(-) delete mode 100644 templates/404.html delete mode 100644 templates/assets/zhheo/privacy.js diff --git a/templates/404.html b/templates/404.html deleted file mode 100644 index 554bbd86..00000000 --- a/templates/404.html +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - - -
- - -
-
-
-
-
-

404

-
请尝试站内搜索寻找文章
- 回到主页
-
-
-
-
- - -
- - - -
- - -
-
-
-
-
- -
- -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- - \ No newline at end of file diff --git a/templates/assets/js/heo.js b/templates/assets/js/heo.js index 2fb0da3e..dc1cdaa1 100644 --- a/templates/assets/js/heo.js +++ b/templates/assets/js/heo.js @@ -1,64 +1,67 @@ "use strict"; -var heo_cookiesTime = null, heo_musicPlaying = !1, heo_keyboard = !0, heo = { +var heo_keyboard = !0, heo = { darkModeStatus: function () { "light" == ("dark" === document.documentElement.getAttribute("data-theme") ? "dark" : "light") ? $(".menu-darkmode-text").text("深色模式") : $(".menu-darkmode-text").text("浅色模式") - }, changeTimeInEssay: function () { - document.querySelector("#bber") && document.querySelectorAll("#bber time").forEach(function (e) { - var t = e, o = t.getAttribute("datetime"); - t.innerText = btf.diffDate(o, !0), t.style.display = "inline" - }) - }, initIndexEssay: function () { - document.querySelector("#bber-talk") && new Swiper(".swiper-container", { - direction: "vertical", loop: !0, autoplay: {delay: 3e3, pauseOnMouseEnter: !0} - }) - }, onlyHome: function () { + }, + + onlyHome: function () { var e = window.location.pathname; "/" == (e = decodeURIComponent(e)) ? $(".only-home").attr("style", "display: flex") : $(".only-home").attr("style", "display: none") - }, is_Post: function () { + }, + + is_Post: function () { return 0 <= window.location.href.indexOf("/p/") - }, addNavBackgroundInit: function () { + }, + + addNavBackgroundInit: function () { var e, t = 0, o = 0; document.body && (t = document.body.scrollTop), document.documentElement && (o = document.documentElement.scrollTop), e = 0 < t - o ? t : o, console.log("滚动高度" + e), 0 != e && (document.getElementById("page-header").classList.add("nav-fixed"), document.getElementById("page-header").classList.add("nav-visible"), $("#cookies-window").hide(), console.log("已添加class")) - }, tagPageActive: function () { + }, + + tagPageActive: function () { var e = window.location.pathname, e = decodeURIComponent(e); console.log(e); var t, o, n = /\/tags\/.*?\//.test(e); console.log(n), n && (t = e.split("/"), console.log(t[2]), o = t[2], document.querySelector("#tag-page-tags") && document.getElementById(o).classList.add("select")) - }, categoriesBarActive: function () { + }, + + categoriesBarActive: function () { document.querySelector("#category-bar") && $(".category-bar-item").removeClass("select"); var e, t = window.location.pathname, t = decodeURIComponent(t); console.log(t), "/" == t ? document.querySelector("#category-bar") && document.getElementById("category-bar-home").classList.add("select") : /\/categories\/.*?\//.test(t) && (e = t.split("/")[2], document.querySelector("#category-bar") && document.getElementById(e).classList.add("select")) - }, addFriendLinksInFooter: function () { - fetch("https://moments.zhheo.com/randomfriend?num=3").then(function (e) { - return e.json() - }).then(function (e) { - for (var t = getArrayItems(e, 3), o = "", n = 0; n < t.length; ++n) { - var a = t[n]; - o += "').concat(a.name, "") - } - o += "更多", document.getElementById("friend-links-in-footer").innerHTML = o - }) - }, stopImgRightDrag: function () { + }, + + stopImgRightDrag: function () { $("img").on("dragstart", function () { return !1 }) - }, topPostScroll: function () { + }, + + topPostScroll: function () { var o; document.getElementById("recent-post-top") && (o = document.getElementById("recent-post-top")).addEventListener("mousewheel", function (e) { var t = -e.wheelDelta / 2; o.scrollLeft += t, document.body.clientWidth < 1300 && e.preventDefault() }, !1) - }, topCategoriesBarScroll: function () { + }, + + topCategoriesBarScroll: function () { var o; document.getElementById("category-bar-items") && (o = document.getElementById("category-bar-items")).addEventListener("mousewheel", function (e) { var t = -e.wheelDelta / 2; o.scrollLeft += t, e.preventDefault() }, !1) - }, sayhi: function () { + }, + + sayhi: function () { document.querySelector("#author-info__sayhi") && (document.getElementById("author-info__sayhi").innerHTML = getTimeState() + "!我是") - }, addTag: function () { + }, + + addTag: function () { document.querySelector(".heo-tag-new") && $(".heo-tag-new").append('N'), document.querySelector(".heo-tag-hot") && $(".heo-tag-hot").append('H') - }, qrcodeCreate: function () { + }, + + qrcodeCreate: function () { document.getElementById("qrcode") && new QRCode(document.getElementById("qrcode"), { text: window.location.href, width: 250, @@ -67,13 +70,19 @@ var heo_cookiesTime = null, heo_musicPlaying = !1, heo_keyboard = !0, heo = { colorLight: "#ffffff", correctLevel: QRCode.CorrectLevel.H }) - }, reflashEssayWaterFall: function () { + }, + + reflashEssayWaterFall: function () { document.querySelector("#waterfall") && setTimeout(function () { waterfall("#waterfall"), document.getElementById("waterfall").classList.add("show") }, 500) - }, addMediumInEssay: function () { + }, + + addMediumInEssay: function () { document.querySelector("#waterfall") && mediumZoom(document.querySelectorAll("[data-zoomable]")) - }, downloadImage: function (e, c) { + }, + + downloadImage: function (e, c) { rm.hideRightMenu(), 0 == rm.downloadimging ? (rm.downloadimging = !0, btf.snackbarShow("正在下载中,请稍后", !1, 1e4), setTimeout(function () { var a = new Image; a.setAttribute("crossOrigin", "anonymous"), a.onload = function () { @@ -83,41 +92,35 @@ var heo_cookiesTime = null, heo_musicPlaying = !1, heo_keyboard = !0, heo = { o.download = c || "photo", o.href = t, o.dispatchEvent(n) }, a.src = e, btf.snackbarShow("图片已添加盲水印,请遵守版权协议"), rm.downloadimging = !1 }, "10000")) : btf.snackbarShow("有正在进行中的下载,请稍后再试") - }, hidecookie: function () { - heo_cookiesTime = setTimeout(function () { - document.getElementById("cookies-window").classList.add("cw-hide"), setTimeout(function () { - $("#cookies-window").hide() - }, 1e3) - }, 3e3) - }, hideTodayCard: function () { - document.getElementById("todayCard") && document.getElementById("todayCard").classList.add("hide") - }, changeThemeColor: function (e) { + }, + + changeThemeColor: function (e) { null !== document.querySelector('meta[name="theme-color"]') && document.querySelector('meta[name="theme-color"]').setAttribute("content", e) - }, initThemeColor: function () { + }, + + initThemeColor: function () { var e, t, o; heo.is_Post() ? 0 === (window.scrollY || document.documentElement.scrollTop) ? (e = getComputedStyle(document.documentElement).getPropertyValue("--heo-main"), heo.changeThemeColor(e)) : (t = getComputedStyle(document.documentElement).getPropertyValue("--heo-background"), heo.changeThemeColor(t)) : (o = getComputedStyle(document.documentElement).getPropertyValue("--heo-background"), heo.changeThemeColor(o)) - }, jumpTo: function (e) { - $(document).ready(function () { - $("html,body").animate({scrollTop: $(e).eq(i).offset().top}, 500) - }) - }, showLoading: function () { + }, + + + showLoading: function () { document.querySelector("#loading-box").classList.remove("loaded") - }, hideLoading: function () { + }, + + hideLoading: function () { document.querySelector("#loading-box").classList.add("loaded") - }, musicToggle: function () { - heo_musicPlaying = heo_musicPlaying ? (document.querySelector("#nav-music").classList.remove("playing"), document.getElementById("menu-music-toggle").innerHTML = '播放音乐', document.getElementById("nav-music-hoverTips").innerHTML = "音乐已暂停", document.querySelector("#consoleMusic").classList.remove("on"), !1) : (document.querySelector("#nav-music").classList.add("playing"), document.getElementById("menu-music-toggle").innerHTML = '暂停音乐', document.querySelector("#consoleMusic").classList.add("on"), !0), document.querySelector("meting-js").aplayer.toggle(), rm.hideRightMenu() - }, musicSkipBack: function () { - document.querySelector("meting-js").aplayer.skipBack(), rm.hideRightMenu() - }, musicSkipForward: function () { - document.querySelector("meting-js").aplayer.skipForward(), rm.hideRightMenu() - }, musicGetName: function () { - for (var e = $(".aplayer-title"), t = [], o = e.length - 1; 0 <= o; o--) t[o] = e[o].innerText; - return t[0] - }, showConsole: function () { + }, + + showConsole: function () { document.querySelector("#console").classList.add("show") - }, hideConsole: function () { + }, + + hideConsole: function () { document.querySelector("#console").classList.remove("show") - }, keyboardToggle: function () { + }, + + keyboardToggle: function () { heo_keyboard ? (heo_keyboard = !1, document.querySelector("#consoleKeyboard").classList.remove("on"), localStorage.setItem("keyboardToggle", "false")) : (heo_keyboard = !0, document.querySelector("#consoleKeyboard").classList.add("on"), localStorage.setItem("keyboardToggle", "true")) } }; \ No newline at end of file diff --git a/templates/assets/js/main.js b/templates/assets/js/main.js index 2b91d652..79f76b55 100644 --- a/templates/assets/js/main.js +++ b/templates/assets/js/main.js @@ -45,48 +45,6 @@ document.addEventListener("DOMContentLoaded", function () { n ? e.classList.add("hide-menu") : e.classList.remove("hide-menu") } - // todo 没啥影响就删除 - // 应该和 代码高亮有关,先注释掉 - // function E() { - // var t, e, n, c, r, o, s, l, d, u, i, f, m, a = GLOBAL_CONFIG.highlight; - // - // function h(t, e, n) { - // var o, i, a = document.createDocumentFragment(); - // r && ((o = document.createElement("div")).className = "highlight-tools ".concat(u), o.innerHTML = l + t + d, o.addEventListener("click", f), a.appendChild(o)), c && e.offsetHeight > c + 30 && ((i = document.createElement("div")).className = "code-expand-btn", i.innerHTML = '', i.addEventListener("click", m), a.appendChild(i)), "hl" === n ? e.insertBefore(a, e.firstChild) : e.parentNode.insertBefore(a, e) - // } - // a && (t = a.highlightCopy, e = a.highlightLang, n = GLOBAL_CONFIG_SITE.isHighlightShrink, c = a.highlightHeightLimit, r = t || e || void 0 !== n, o = "highlighjs" === a.plugin ? document.querySelectorAll("figure.highlight") : document.querySelectorAll('pre[class*="language-"]'), (r || c) && o.length && (s = "prismjs" === a.plugin, u = !(d = l = "") === n ? "closed" : "", void 0 !== n && (l = '')), t && (d = '
'), i = function (t) { - // var e = t.parentNode; - // e.classList.add("copy-true"); - // var n = window.getSelection(), o = document.createRange(); - // s ? o.selectNodeContents(e.querySelectorAll("pre code")[0]) : o.selectNodeContents(e.querySelectorAll("table .code pre")[0]), n.removeAllRanges(), n.addRange(o); - // var i, a; - // n.toString(); - // i = t.lastChild, document.queryCommandSupported && document.queryCommandSupported("copy") ? (document.execCommand("copy"), void 0 !== GLOBAL_CONFIG.Snackbar ? btf.snackbarShow(GLOBAL_CONFIG.copy.success) : ((a = i.previousElementSibling).innerText = GLOBAL_CONFIG.copy.success, a.style.opacity = 1, setTimeout(function () { - // a.style.opacity = 0 - // }, 700))) : void 0 !== GLOBAL_CONFIG.Snackbar ? btf.snackbarShow(GLOBAL_CONFIG.copy.noSupport) : i.previousElementSibling.innerText = GLOBAL_CONFIG.copy.noSupport, n.removeAllRanges(), e.classList.remove("copy-true") - // }, f = function (t) { - // var e, n, o = t.target.classList; - // o.contains("expand") ? (n = _toConsumableArray((e = this).parentNode.children).slice(1), e.firstChild.classList.toggle("closed"), btf.isHidden(n[n.length - 1]) ? n.forEach(function (t) { - // t.style.display = "block" - // }) : n.forEach(function (t) { - // t.style.display = "none" - // })) : o.contains("copy-button") && i(this) - // }, m = function () { - // this.classList.toggle("expand-done") - // }, e ? s ? o.forEach(function (t) { - // var e = t.getAttribute("data-language") ? t.getAttribute("data-language") : "Code", - // n = '
'.concat(e, "
"); - // btf.wrap(t, "figure", "", "highlight"), h(n, t) - // }) : o.forEach(function (t) { - // var e = t.getAttribute("class").split(" ")[1]; - // "plain" !== e && void 0 !== e || (e = "Code"), h('
'.concat(e, "
"), t, "hl") - // }) : s ? o.forEach(function (t) { - // btf.wrap(t, "figure", "", "highlight"), h("", t) - // }) : o.forEach(function (t) { - // h("", t, "hl") - // }))) - // } - var o = document.getElementById("site-name"), i = o && o.offsetWidth, a = document.querySelector("#menus .menus_items"), c = a && a.offsetWidth, r = document.querySelector("#search-button"), s = r && r.offsetWidth; @@ -279,13 +237,9 @@ document.addEventListener("DOMContentLoaded", function () { }) })), l = document.getElementById("toggle-menu"), d = document.getElementById("sidebar-menus"), u = document.getElementById("menu-mask"), f = document.body, l.addEventListener("click", function () { btf.sidebarPaddingR(), f.style.overflow = "hidden", btf.fadeIn(u, .5), d.classList.add("open") - }), u.addEventListener("click", function (t) { - d.classList.contains("open") && v() }), window.addEventListener("resize", function (t) { btf.isHidden(l) && d.classList.contains("open") && v() - }), !GLOBAL_CONFIG_SITE.isHome || (m = document.getElementById("scroll-down")) && m.addEventListener("click", function () { - btf.scrollToDest(document.getElementById("content-inner").offsetTop, 300) - }), E(), GLOBAL_CONFIG.isPhotoFigcaption && document.querySelectorAll("#article-container img").forEach(function (t) { + }), GLOBAL_CONFIG.isPhotoFigcaption && document.querySelectorAll("#article-container img").forEach(function (t) { var e, n = t.parentNode; n.parentNode.classList.contains("justified-gallery") || ((e = document.createElement("div")).className = "img-alt is-center", e.textContent = t.getAttribute("alt"), n.insertBefore(e, t.nextSibling)) }), w(), "mediumZoom" === GLOBAL_CONFIG.lightbox && (h = mediumZoom(document.querySelectorAll("#article-container :not(a)>img"))).on("open", function (t) { diff --git a/templates/assets/zhheo/blogex.js b/templates/assets/zhheo/blogex.js index a3299ae3..b794c7f9 100644 --- a/templates/assets/zhheo/blogex.js +++ b/templates/assets/zhheo/blogex.js @@ -134,6 +134,7 @@ checkOpen.toString = function () { }); heo.initThemeColor() }; + var getTimeState = function () { var e = (new Date).getHours(), t = ""; return 0 <= e && e <= 5 ? t = "晚安" : 5 < e && e <= 10 ? t = "早上好" : 10 < e && e <= 14 ? t = "中午好" : 14 < e && e <= 18 ? t = "下午好" : 18 < e && e <= 24 && (t = "晚上好"), t @@ -160,7 +161,7 @@ var navFn = { function RemoveRewardMask() { $(".reward-main").attr("style", "display: none"), $("#quit-box").attr("style", "display: none") } - +// 移除加载动画 function removeLoading() { setTimeout(function () { preloader.endLoading() @@ -205,11 +206,17 @@ function percent() { document.addEventListener("touchstart", function (e) { RemoveRewardMask() -}, !1), $(document).unbind("keydown").bind("keydown", function (e) { +}, !1); + +$(document).unbind("keydown").bind("keydown", function (e) { if ((e.ctrlKey || e.metaKey) && 67 == e.keyCode && "" != selectTextNow) return btf.snackbarShow("复制成功,复制和转载请标注本文地址"), rm.rightmenuCopyText(selectTextNow), !1 -}), document.addEventListener("scroll", btf.throttle(function () { +}); + +document.addEventListener("scroll", btf.throttle(function () { heo.initThemeColor() -}, 200)), navigator.serviceWorker.getRegistrations().then(function (e) { +}, 200)); + +navigator.serviceWorker.getRegistrations().then(function (e) { var t, o = _createForOfIteratorHelper(e); try { for (o.s(); !(t = o.n()).done;) { @@ -220,17 +227,26 @@ document.addEventListener("touchstart", function (e) { } finally { o.f() } -}), window.onkeydown = function (e) { +}); + +window.onkeydown = function (e) { 123 === e.keyCode && btf.snackbarShow("开发者模式已打开,请遵循GPL协议", !1, 3e3) -}, document.querySelector("#algolia-search").addEventListener("wheel", function (e) { +}; + +document.querySelector("#console").addEventListener("wheel", function (e) { e.preventDefault() -}), document.querySelector("#console").addEventListener("wheel", function (e) { - e.preventDefault() -}), window.addEventListener("resize", function () { +}); + +window.addEventListener("resize", function () { document.querySelector("#waterfall") && heo.reflashEssayWaterFall() -}), $(".topGroup").hover(function () { +}); + +$(".topGroup").hover(function () { console.log("卡片悬浮") -}, document.getElementById("post-comment") && owoBig(), document.addEventListener("scroll", btf.throttle(function () { +}); + + +document.getElementById("post-comment") && owoBig(), document.addEventListener("scroll", btf.throttle(function () { var e, t = window.scrollY + document.documentElement.clientHeight, o = (window.scrollY, document.getElementById("pagination")), n = document.getElementById("post-tools"); n && o && (e = n.offsetTop + n.offsetHeight / 2, 1300 < document.body.clientWidth && (e < t ? o.classList.add("show-window") : o.classList.remove("show-window"))) @@ -244,10 +260,29 @@ document.addEventListener("touchstart", function (e) { if (68 == e.keyCode) return rm.switchDarkMode(), !1; if (70 == e.keyCode) return pjax.loadUrl("/moments/"), !1 } -}), $(window).on("keyup", function (e) { +}); + +$(window).on("keyup", function (e) { 16 == e.keyCode && document.querySelector("#keyboard-tips").classList.remove("show") -}), document.addEventListener("pjax:send", function () { +}); + +document.addEventListener("pjax:send", function () { heo.showLoading() -}), document.addEventListener("pjax:complete", function () { - heo.categoriesBarActive(), heo.tagPageActive(), heo.onlyHome(), heo.addNavBackgroundInit(), heo.initIndexEssay(), heo.changeTimeInEssay(), heo.reflashEssayWaterFall(), heo.darkModeStatus(), heo.initThemeColor(), percent(), window.onscroll = percent, heo.hideLoading() -}), heo.initThemeColor(), percent(), window.onscroll = percent; \ No newline at end of file +}); + +document.addEventListener("pjax:complete", function () { + heo.categoriesBarActive(); + heo.tagPageActive(); + heo.onlyHome(); + heo.addNavBackgroundInit(); + heo.reflashEssayWaterFall(); + heo.darkModeStatus(); + heo.initThemeColor(); + percent(); + window.onscroll = percent; + heo.hideLoading(); +}); +heo.initThemeColor(); +percent(); +window.onscroll = percent(); + diff --git a/templates/assets/zhheo/privacy.js b/templates/assets/zhheo/privacy.js deleted file mode 100644 index 8d531445..00000000 --- a/templates/assets/zhheo/privacy.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";function getIpInfo(){fetch("https://api.ooomn.com/api/ip").then(function(e){return e.json()}).then(function(e){var n=e.country,t=e.ip,r=e.province,i=e.city,o=e.isp;document.getElementById("userAgentIp").innerHTML=t,document.getElementById("userAgentCountry").innerHTML=n,document.getElementById("userAgentRegion").innerHTML=r,document.getElementById("userAgentCity").innerHTML=i,document.getElementById("userAgentIsp").innerHTML=o;var u=navigator.userAgent;document.getElementById("userAgentDevice").innerHTML=u})}getIpInfo(); \ No newline at end of file diff --git a/templates/assets/zhheo/zhheoblog.css b/templates/assets/zhheo/zhheoblog.css index f5b40c04..767527a1 100644 --- a/templates/assets/zhheo/zhheoblog.css +++ b/templates/assets/zhheo/zhheoblog.css @@ -1,3 +1,8 @@ +/* + 备注: + search 关键字相关的 css 不知是否有用,能清理的清理了一部分 + + */ @charset "UTF-8"; :root { --heo-white: #fff; @@ -3895,24 +3900,6 @@ mjx-container[jax=CHTML][display=true] { padding-bottom: .3rem } -#article-container .aplayer { - margin: 0 0 1rem -} - -#article-container .aplayer ol, #article-container .aplayer ul { - margin: 0; - padding: 0 -} - -#article-container .aplayer ol li, #article-container .aplayer ul li { - margin: 0; - padding: 0 15px -} - -#article-container .aplayer ol li::before, #article-container .aplayer ul li::before { - content: none -} - #article-container .btn-center { margin: 0 0 1rem; text-align: center @@ -4842,10 +4829,6 @@ blockquote.pullquote.right { background: rgba(27, 31, 35, .05) } -[data-theme=dark] #article-container .aplayer { - filter: brightness(.8) -} - [data-theme=dark] #article-container kbd { border-color: #696969; background-color: #525252; @@ -4970,94 +4953,6 @@ blockquote.pullquote.right { background: rgba(0, 0, 0, .6) } -#algolia-search .search-dialog { - animation: .5s ease 0s 1 normal none running titlescale -} - -#algolia-search .search-dialog .ais-search-box { - margin: 0 auto; - max-width: 100%; - width: 100% -} - -#algolia-search .search-dialog .ais-search-box input { - padding: .25rem .7rem; - outline: 0; - border: 2px solid #307af6; - border-radius: 2rem; - background: var(--search-bg); - color: var(--search-input-color) -} - -#algolia-search .search-dialog .ais-hits--item.algolia-hit-item { - position: relative; - padding-left: 1.2rem -} - -#algolia-search .search-dialog .ais-hits--item.algolia-hit-item:hover::before { - border-color: #ff7242 -} - -#algolia-search .search-dialog .ais-hits--item.algolia-hit-item::before { - position: absolute; - top: .53em; - left: 0; - width: .5em; - height: .5em; - border: .15rem solid #307af6; - border-radius: .5em; - background: 0 0; - content: ""; - line-height: .5em; - transition: all .2s ease-in-out 0s -} - -#algolia-search .search-dialog .ais-hits--item.algolia-hit-item a { - display: block; - color: var(--search-result-title); - cursor: pointer -} - -#algolia-search .search-dialog .ais-hits--item.algolia-hit-item a:hover { - color: #307af6 -} - -#algolia-search .search-dialog .ais-hits--item.algolia-hit-item em { - color: #f47466; - font-weight: 700 -} - -#algolia-search .search-dialog .ais-pagination.pagination { - margin: .8rem 0 0; - padding: 0; - text-align: center -} - -#algolia-search .search-dialog .ais-pagination.pagination .ais-pagination--item { - margin: 0 .2rem; - padding: 0 -} - -#algolia-search .search-dialog .ais-pagination.pagination .ais-pagination--item a { - display: inline-block; - min-width: 1.2rem; - height: 1.2rem; - text-align: center; - line-height: 1.2rem -} - -#algolia-search .search-dialog .ais-pagination.pagination .ais-pagination--item.current a { - background: #0079ff; - color: #eee; - cursor: default -} - -#algolia-search .search-dialog .algolia-logo { - padding-top: 2px; - width: 4rem; - height: 1.5rem -} - :root { --heo-main: var(--heo-theme) !important } @@ -5853,51 +5748,6 @@ html { } } -@media screen and (max-width: 1300px) { - #nav-music { - display: none !important - } -} - -#nav-music { - display: flex; - align-items: center; - z-index: 1001; - position: fixed; - bottom: 20px; - left: 20px; - cursor: pointer; - transition: .3s; - transform-origin: left bottom; - box-shadow: var(--heo-shadow-border); - border-radius: 40px -} - -#nav-music:active { - transform: scale(.97) -} - -#nav-music.playing { - box-shadow: var(--heo-shadow-main) -} - -#nav-music .aplayer.aplayer-withlrc .aplayer-pic { - height: 25px; - width: 25px; - border-radius: 40px; - z-index: 1; - transition: .3s; - -webkit-transform: rotate(0) scale(1); - border: var(--style-border-always) -} - -#nav-music.playing .aplayer.aplayer-withlrc .aplayer-pic { - -webkit-animation: changeright 6s linear infinite; - box-shadow: 0 0 14px #ffffffa6; - -webkit-transform: rotate(0) scale(1.1); - border-color: var(--heo-white) -} - @-webkit-keyframes changeright { 0% { -webkit-transform: rotate(0) scale(1.1); @@ -5921,178 +5771,6 @@ html { } } -#nav-music .aplayer.aplayer-withlrc .aplayer-info { - height: 100%; - color: var(--font-color); - margin-left: 8px; - padding: 0; - display: flex; - align-items: center -} - -#nav-music.playing .aplayer.aplayer-withlrc .aplayer-info { - color: var(--heo-white) -} - -#nav-music #nav-music-hoverTips { - color: var(--heo-white); - background: var(--heo-main); - width: 100%; - height: 100%; - position: absolute; - top: 0; - left: 0; - align-items: center; - justify-content: center; - display: flex; - border-radius: 40px; - opacity: 0; - font-size: 12px; - transition: 0s; - z-index: 2; - pointer-events: none; - transition: .3s -} - -#nav-music:hover:not(.playing) #nav-music-hoverTips { - opacity: 1 -} - -#nav-music.playing #nav-music-hoverTips { - opacity: 0 -} - -#nav-music .aplayer { - background: var(--card-bg); - border-radius: 60px; - height: 41px; - display: flex; - margin: 0; - pointer-events: none; - transition: .3s; - border: var(--style-border); - box-shadow: none -} - -#nav-music.playing .aplayer { - background: var(--heo-main); - border: var(--style-border-hover) -} - -#nav-music .aplayer .aplayer-notice { - display: none -} - -#nav-music .aplayer .aplayer-miniswitcher { - display: none -} - -#nav-music .aplayer .aplayer-body { - position: relative; - display: flex; - align-items: center; - padding: 0 8px; - padding-right: 12px -} - -#nav-music .aplayer .aplayer-pic .aplayer-play { - opacity: 0 -} - -#nav-music .aplayer-list { - display: none -} - -#nav-music .aplayer .aplayer-info .aplayer-music { - margin: 0; - display: flex; - align-items: center; - padding: 0; - z-index: 1 -} - -#nav-music .aplayer .aplayer-info .aplayer-controller .aplayer-time { - display: none -} - -#nav-music .aplayer .aplayer-info .aplayer-music .aplayer-author { - display: none -} - -#nav-music .aplayer.aplayer-withlist .aplayer-info { - border: none -} - -#nav-music .aplayer .aplayer-pic div { - display: none -} - -#nav-music .aplayer .aplayer-info .aplayer-music .aplayer-title { - cursor: pointer; - line-height: 1; - display: inline-block; - white-space: nowrap; - max-width: 120px; - overflow: hidden; - text-overflow: ellipsis; - transition: .3s -} - -#nav-music .aplayer .aplayer-info .aplayer-controller { - position: absolute; - width: 100%; - height: 100%; - top: 0; - left: 0 -} - -#nav-music .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap { - margin: 0; - padding: 0 -} - -#nav-music .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar { - height: 100%; - background: 0 0 -} - -#nav-music .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded { - display: none -} - -#nav-music .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played { - height: 100%; - opacity: .4; - background-color: var(--heo-white) !important -} - -#nav-music .aplayer.aplayer-withlrc .aplayer-lrc { - width: 0; - opacity: 0; - transition: .3s; - margin-left: 8px; - margin-top: -2px -} - -#nav-music.playing .aplayer.aplayer-withlrc .aplayer-lrc { - width: 200px; - margin-bottom: 0; - opacity: 1 -} - -#nav-music .aplayer .aplayer-lrc p.aplayer-lrc-current { - color: var(--heo-white); - border: none -} - -#nav-music .aplayer .aplayer-lrc:after, #nav-music .aplayer .aplayer-lrc:before { - display: none -} - -#nav-music .aplayer .aplayer-lrc p { - color: #ffffffb3 -} - i.fab { font-size: 20px; vertical-align: middle; @@ -6233,94 +5911,6 @@ i.fab { color: var(--heo-white) } -#search-mask { - backdrop-filter: blur(12px); - -webkit-backdrop-filter: blur(12px); - background: var(--heo-maskbg) -} - -#algolia-search .search-dialog .ais-search-box input { - border-radius: 8px !important; - border: var(--style-border) -} - -#algolia-search .search-dialog .ais-search-box input:focus { - border: var(--style-border-hover) -} - -#algolia-search .search-dialog .ais-search-box input::placeholder { - opacity: .6 -} - -.search-dialog { - border-radius: 12px !important; - box-shadow: var(--heo-shadow-lightblack); - background: var(--heo-card-bg); - border: var(--style-border); - transition: .3s -} - -.search-dialog:hover { - border: var(--style-border-hover); - box-shadow: var(--heo-shadow-theme) -} - -.search-dialog__title { - font-weight: 700; - color: var(--heo-main) -} - -#algolia-search .search-dialog .ais-hits--item.algolia-hit-item a:hover { - color: var(--heo-hovertext) -} - -#algolia-search .search-dialog .algolia-logo { - display: none -} - -#algolia-tips { - padding-top: 12px; - color: var(--heo-secondtext); - right: 0; - margin: auto -} - -.algolia-tips-text { - margin-left: .4rem -} - -#algolia-search-results { - padding-top: 8px -} - -#algolia-search .search-dialog .ais-hits--item.algolia-hit-item:before { - display: none -} - -#algolia-search .search-dialog .ais-hits--item.algolia-hit-item { - padding-left: 0; - font-weight: 700 -} - -#algolia-search .search-dialog .ais-pagination.pagination { - margin: .2rem 0 0 -} - -#algolia-search .search-dialog .ais-hits--item.algolia-hit-item em { - color: var(--heo-theme); - font-style: normal -} - -#algolia-search .search-dialog .ais-search-box { - padding-top: 8px -} - -#algolia-search .search-dialog .ais-pagination.pagination .ais-pagination--item.current a { - border-radius: 4px; - background: var(--heo-main); - color: var(--heo-white) -} - a { color: var(--heo-fontcolor) } @@ -6724,30 +6314,6 @@ a.console_switchbutton { } } -#algolia-search .ais-hits--item.algolia-hit-item a { - color: var(--heo-fontcolor) -} - -.aplayer .aplayer-list ol { - backdrop-filter: blur(1px); - -webkit-backdrop-filter: blur(1px) -} - -.aplayer .aplayer-lrc:after { - display: none !important -} - -.aplayer.aplayer-withlrc.aplayer-withlist { - border-radius: 12px -} - -#article-container .aplayer { - border-radius: 12px; - min-height: 90px; - background: var(--heo-card-bg); - border: var(--style-border); - box-shadow: var(--heo-shadow-border) -} #article-container.flink { margin-top: 1rem @@ -6758,20 +6324,6 @@ a.console_switchbutton { margin-bottom: 0 } -#algolia-hits .tag-list { - padding: 4px 8px; - border-radius: 8px; - margin-right: .5rem; - margin-top: .5rem; - border: var(--style-border); - cursor: pointer -} - -#algolia-hits .tag-list:hover { - background: var(--heo-main); - color: var(--heo-white) -} - #mobile-sidebar #mobile-sidebar-menus.open { background: var(--heo-maskbg) } @@ -6798,15 +6350,6 @@ a.console_switchbutton { border-radius: 25px } -#algolia-search .search-dialog .ais-hits--item.algolia-hit-item a { - color: var(--heo-fontcolor); - width: auto; - max-width: 100%; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden -} - .not-index-bg { height: 2rem !important; background-image: none !important; @@ -8275,40 +7818,9 @@ a.categoryButton:hover { font-weight: 700 } -#bber-talk { - width: 100%; - height: 25px; - line-height: 25px; - display: flex; - flex-direction: column -} -#bbtalk { - overflow: hidden; - width: 100%; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap -} -#bber-talk .li-style { - width: auto; - max-width: 100%; - height: 25px; - text-align: center; - overflow: hidden; - text-overflow: ellipsis; - transition: .3s; - font-weight: 700; - margin: auto; - cursor: pointer; - white-space: nowrap -} -#bbTimeList .li-style:hover { - color: var(--heo-theme); - transition: .3s -} li, ul { list-style: none; @@ -8317,56 +7829,10 @@ li, ul { padding: 0 } -#bbTimeList { - background: var(--heo-none); - color: var(--heo-fontcolor); - padding: .5rem 1rem; - border-radius: 12px; - box-shadow: var(--heo-shadow-lightblack); - display: flex; - transition: .3s; - margin-bottom: 1rem; - border: var(--style-border); - align-items: center; - height: 50px -} -#bbTimeList:hover { - border: var(--style-border-hover); - box-shadow: var(--heo-shadow-main) -} -@media screen and (min-width: 1300px) { - #bbTimeList { - margin-bottom: 1rem - } -} -.bber-gotobb { - line-height: 25px; - margin-left: 1rem; - transition: .3s; - cursor: pointer -} -.bber-gotobb:hover { - opacity: .8; - color: var(--heo-theme) -} - -.icon-bblogo { - font-size: 2rem; - font-size: 2rem; - line-height: 22px; - margin-right: 1rem; - transition: .3s; - cursor: pointer -} - -.icon-bblogo:hover { - opacity: .8; - color: var(--heo-theme) -} #recent-posts > .recent-post-item > .recent-post-info { padding: 0 @@ -8871,13 +8337,6 @@ span.recent-post-top-text { width: 100% } - #bbTimeList { - margin-top: 0; - border-radius: 0; - background: var(--heo-background); - padding: .5rem 20px - } - a.article-meta__categories { left: 12px !important; top: 12px !important; @@ -8885,10 +8344,6 @@ span.recent-post-top-text { padding: 2px 9px !important; font-size: 12px } - - #bbTimeList { - margin-bottom: 0 - } } @media screen and (min-width: 1300px) { @@ -13140,305 +12595,6 @@ figure.gallery-group:hover .gallery-group-name::after { display: none } -#bber .timeline #waterfall { - opacity: 0; - transition: .3s -} - -#bber .timeline #waterfall.show { - opacity: 1 -} - -#bber .timeline ul li.item { - position: relative; - width: 32%; - border: var(--style-border-always); - border-radius: 12px; - padding: 1rem; - padding-bottom: .5rem; - transition: .3s; - display: flex; - flex-direction: column; - flex-wrap: nowrap; - justify-content: space-between; - align-items: flex-start; - background: var(--heo-card-bg); - box-shadow: var(--heo-shadow-border); - margin-right: 2% -} - -#bber .timeline ul li.item hr { - display: flex; - position: relative; - margin: 8px 0; - border: 1px dashed var(--heo-theme-op); - width: 100% -} - -@media screen and (max-width: 768px) { - #bber .timeline ul li.item { - padding: 0 - } -} - -#bber .timeline ul li.item:hover { - border: var(--style-border-hover) -} - -#bber ul.list { - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: space-between -} - -#bber li.item { - display: flex; - flex-direction: column; - flex-wrap: nowrap; - align-items: flex-start -} - -@media screen and (max-width: 1300px) { - #bber .timeline ul li.item { - width: 49%; - margin-right: 1% - } -} - -@media screen and (max-width: 768px) { - #bber .timeline ul li.item { - width: 100%; - margin-right: 0 - } - - #bber .timeline ul li.item { - padding: 16px 20px - } -} - -.timeline ul .list { - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: space-between -} - -.bb-info { - display: inline; - float: right; - line-height: 1; - color: var(--heo-secondtext); - margin-left: auto; - margin-bottom: 1rem; - margin-right: .5rem -} - -.bb-info:hover { - color: var(--heo-hovertext) -} - -#bber { - margin-top: 1rem; - width: 100% -} - -#bber div.bber-content { - display: flex; - flex-direction: initial; - flex-wrap: wrap; - border-radius: 12px; - width: 100%; - height: 100% -} - -#bber > section > ul > li.item { - margin-bottom: 1rem -} - -#bber .bber-info { - display: flex; - align-items: center -} - -#bber .bber-info .fa-rectangles-mixed { - margin-right: 8px -} - -#bber .bber-content-link { - display: flex; - margin-left: .5rem; - color: var(--heo-secondtext); - font-size: .7rem; - align-items: center; - background-color: rgba(245, 108, 108, .13); - color: #f56c6c; - padding: 0 8px; - border-radius: 20px -} - -#bber .bber-content-link:hover { - background-color: var(--heo-main); - color: var(--heo-white) -} - -#bber .bber-content-link i { - margin-right: 3px -} - -#bber .bber-reply { - cursor: pointer; - padding: 0 4px -} - -#bber .bber-bottom { - display: flex; - justify-content: space-between; - width: 100% -} - -#bber .count { - color: var(--heo-secondtext); - font-size: .8rem -} - -#bber p { - margin: 0 -} - -#bber .datafrom i { - margin-right: 4px -} - -#bber .bber-music { - width: 100%; - height: 90px; - margin: .5rem 0; - border-radius: 8px; - overflow: hidden; - border: var(--style-border-always); - background: var(--heo-secondbg) -} - -#bber .aplayer { - margin: 0 -} - -#bber .aplayer .aplayer-info .aplayer-music .aplayer-title { - font-size: .8rem; - font-weight: 700; - margin: 0; - color: var(--heo-fontcolor) -} - -#bber .aplayer.aplayer-withlrc .aplayer-pic { - height: 82px; - width: 82px; - margin: 4px; - border-radius: 4px -} - -#bber .aplayer .aplayer-info .aplayer-music { - height: 23px -} - -#bber .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap { - padding: 0 -} - -#bber .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar { - background: var(--heo-gray); - height: 8px; - border-radius: 12px; - transition: .3s; - overflow: hidden -} - -#bber .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap:hover .aplayer-bar { - height: 12px -} - -#bber .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played { - height: 100%; - border-radius: 12px -} - -#bber .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded { - height: 100%; - border-radius: 12px -} - -#bber .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb { - display: none -} - -#bber .aplayer .aplayer-info .aplayer-controller { - align-items: center -} - -#bber .aplayer .aplayer-info .aplayer-controller .aplayer-time { - position: initial -} - -#bber-tips { - font-size: 14px; - display: flex; - justify-content: center; - margin-top: 1rem -} - -#bber .bber-content-img img { - object-fit: cover; - max-height: 100%; - border-radius: 12px -} - -#bber .bber-content-img { - height: 100px; - margin: auto; - margin-top: .2rem; - margin-bottom: .3rem; - margin-left: 0; - border-radius: 12px; - overflow: hidden; - display: flex; - position: relative -} - -#bber > section > ul > li > div .bber-info-time { - color: var(--heo-fontcolor); - font-size: .7rem; - background-color: var(--heo-gray-op); - padding: 0 8px; - border-radius: 20px; - cursor: default -} - -#bber .bber-content .datacont { - order: 0; - font-size: .8rem; - font-weight: 700; - color: var(--heo-fontcolor); - width: 100%; - line-height: 1.38; - border-radius: 12px; - margin-bottom: .5rem; - display: flex; - flex-direction: column; - text-align: justify -} - -#bber > section > ul > li > div .datafrom { - order: 2; - color: var(--heo-secondtext); - font-size: .7rem; - margin-left: 8px -} - -#bber > section > ul > li > div .datafrom small { - font-size: .7rem -} - .load-btn.button-load { background: var(--heo-card-btn-bg); color: var(--heo-fontcolor); @@ -13503,26 +12659,6 @@ figure.gallery-group:hover .gallery-group-name::after { color: var(--heo-hovertext) } -a.bb-link { - margin-left: 8px; - color: var(--heo-secondtext) !important; - display: inline; - border: none !important -} - -a.bb-link-info { - display: inline; - float: right; - border: none !important; - color: var(--heo-secondtext) !important; - line-height: 2.7rem -} - -a.bb-link-info:hover { - color: var(--heo-fontcolor) !important; - background: 0 0 !important -} - #friend_link_moments { border: none !important } diff --git a/templates/modules/layouts/layout.html b/templates/modules/layouts/layout.html index a336560f..bfcadc15 100644 --- a/templates/modules/layouts/layout.html +++ b/templates/modules/layouts/layout.html @@ -20,238 +20,157 @@
-
- - +
+ + -
-
+
+
- -
+ +
- - - + + + - - - + + + - - + + - - - + + + - - + + - +
- -
- - - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + if (window.aplayers) { + for (let i = 0; i < window.aplayers.length; i++) { + if (!window.aplayers[i].options.fixed) { + window.aplayers[i].destroy() + } + } + } + + typeof typed === 'object' && typed.destroy() + + //reset readmode + const $bodyClassList = document.body.classList + $bodyClassList.contains('read-mode') && $bodyClassList.remove('read-mode') + }) + + document.addEventListener('pjax:complete', function () { + window.refreshFn() + + document.querySelectorAll('script[data-pjax]').forEach(item => { + const newScript = document.createElement('script') + const content = item.text || item.textContent || item.innerHTML || "" + Array.from(item.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value)) + newScript.appendChild(document.createTextNode(content)) + item.parentNode.replaceChild(newScript, item) + }) + + GLOBAL_CONFIG.islazyload && window.lazyLoadInstance.update() + + typeof chatBtnFn === 'function' && chatBtnFn() + typeof panguInit === 'function' && panguInit() + + typeof preloader === 'object' && preloader.endLoading() + }) + + document.addEventListener('pjax:error', (e) => { + if (e.request.status === 404) { + pjax.loadUrl('/404.html') + } + })
- +
diff --git a/templates/modules/loading-box.html b/templates/modules/loading-box.html index fa61f7ba..bca2ea1e 100644 --- a/templates/modules/loading-box.html +++ b/templates/modules/loading-box.html @@ -8,6 +8,25 @@
+ + + \ No newline at end of file diff --git a/templates/modules/time-list.html b/templates/modules/time-list.html index a7d2d78d..2a72b435 100644 --- a/templates/modules/time-list.html +++ b/templates/modules/time-list.html @@ -1,20 +1,8 @@ -
- -
-
-
- 日志模块 -
-
-
-
- +
+ + + +
\ No newline at end of file