From 2d231723e80e5a4e4b7d06a6343450b762593425 Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <1152958806@qq.com> Date: Wed, 6 Sep 2023 23:45:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/assets/js/heo.js | 9 +------ templates/assets/js/main.js | 21 --------------- templates/assets/js/utils.js | 38 ---------------------------- templates/assets/zhheo/zhheoblog.css | 20 +++------------ 4 files changed, 5 insertions(+), 83 deletions(-) diff --git a/templates/assets/js/heo.js b/templates/assets/js/heo.js index 813fd679..cb624178 100644 --- a/templates/assets/js/heo.js +++ b/templates/assets/js/heo.js @@ -46,7 +46,7 @@ var heo = { //是否在首页 is_Post: function () { var url = window.location.href; //获取url - if (url.indexOf("/p/") >= 0) { //判断url地址中是否包含code字符串 + if (url.indexOf("/archives/") >= 0) { //判断url地址中是否包含code字符串 return true; } else { return false; @@ -161,13 +161,6 @@ var heo = { ), 500) }, - // 即刻短文添加灯箱 - addMediumInEssay: function () { - if (document.querySelector('#waterfall')) { - mediumZoom(document.querySelectorAll('[data-zoomable]')) - } - }, - // 下载图片 downloadImage: function (imgsrc, name) { //下载图片地址和图片名 rm.hideRightMenu(); diff --git a/templates/assets/js/main.js b/templates/assets/js/main.js index 3a841f49..ce489e73 100644 --- a/templates/assets/js/main.js +++ b/templates/assets/js/main.js @@ -237,18 +237,6 @@ document.addEventListener('DOMContentLoaded', function () { } } - - function setFixed(el) { - if (!el) return - const currentTop = window.scrollY || document.documentElement.scrollTop - if (currentTop > 0) { - el.classList.add('nav-fixed') - } else { - el.classList.remove('nav-fixed') - } - } - - /** * menu * 側邊欄sub-menu 展開/收縮 @@ -443,15 +431,6 @@ document.addEventListener('DOMContentLoaded', function () { }) } - const relativeDate = function (selector) { - selector.forEach(item => { - const $this = item - const timeVal = $this.getAttribute('datetime') - $this.innerText = btf.diffDate(timeVal, true) - $this.style.display = 'inline' - }) - } - const unRefreshFn = function () { window.addEventListener('resize', adjustMenu) window.addEventListener('orientationchange', () => { diff --git a/templates/assets/js/utils.js b/templates/assets/js/utils.js index 73bc0e9c..b2356358 100644 --- a/templates/assets/js/utils.js +++ b/templates/assets/js/utils.js @@ -36,44 +36,6 @@ var btf = { return result; }, - // loadLightbox: ele => { - // const service = GLOBAL_CONFIG.lightbox; - - // if (service === "mediumZoom") { - // const zoom = mediumZoom(ele); - // zoom.on("open", e => { - // const photoBg = document.documentElement.getAttribute("data-theme") === "dark" ? "#121212" : "#fff"; - // zoom.update({ - // background: photoBg, - // }); - // }); - // } - - // if (service === "fancybox") { - // ele.forEach(i => { - // if (i.parentNode.tagName !== "A") { - // const dataSrc = i.dataset.lazySrc || i.src; - // const dataCaption = i.title || i.alt || ""; - // btf.wrap(i, "a", { - // href: dataSrc, - // "data-fancybox": "gallery", - // "data-caption": dataCaption, - // "data-thumb": dataSrc, - // }); - // } - // }); - - // if (!window.fancyboxRun) { - // Fancybox.bind("[data-fancybox]", { - // Hash: false, - // Thumbs: { - // autoStart: false, - // }, - // }); - // window.fancyboxRun = true; - // } - // } - // }, loadLightbox: ele => { const jqLoadAndRun = () => { diff --git a/templates/assets/zhheo/zhheoblog.css b/templates/assets/zhheo/zhheoblog.css index 02ad355d..d10d1be4 100644 --- a/templates/assets/zhheo/zhheoblog.css +++ b/templates/assets/zhheo/zhheoblog.css @@ -1691,8 +1691,8 @@ blockquote footer cite::before { } #recent-posts > .recent-post-item > .recent-post-info > .article-meta-wrap { - color: rgb(133, 133, 133); - font-size: 90%; + color: var(--heo-fontcolor); + font-size: .7rem; } #recent-posts > .recent-post-item > .recent-post-info > .article-meta-wrap > .post-meta-date { @@ -8348,7 +8348,7 @@ li { } .recent-post-item .recent-post-info .recent-post-info-top .article-title { - font-size: 22px; + font-size: 20px; -webkit-line-clamp: 2; } @@ -9345,14 +9345,10 @@ a.article-meta__category:hover { } } -/* 文章卡片标签边距 */ -.article-meta-wrap { - color: var(--heo-secondtext) !important; -} + /* 日期右侧显示 */ #recent-posts > .recent-post-item > .recent-post-info > .article-meta-wrap > .post-meta-date { - /* display: none; */ right: 0px; text-align: right; } @@ -9369,10 +9365,6 @@ a.article-meta__category:hover { display: none; } -.post-meta-date { - margin-right: 0.8rem; -} - /* 文章目录 */ #aside-content #card-toc .toc-content .toc-link.active { line-height: 1.2; @@ -10564,10 +10556,6 @@ span.post-meta-position { } } -.post-meta-date { - opacity: 0.6; -} - .post-meta-pv-cv { opacity: 0.6; }