From aec72f319db1526fd5ffcfadb23d72abcfcbf358 Mon Sep 17 00:00:00 2001 From: Efu Date: Mon, 17 Jun 2024 15:33:13 +0800 Subject: [PATCH 1/6] =?UTF-8?q?bug:=20=E4=BF=AE=E5=A4=8D=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E6=96=87=E7=AB=A0=E5=88=97=E8=A1=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/js/main.js | 1 - 1 file changed, 1 deletion(-) diff --git a/source/js/main.js b/source/js/main.js index 2bdd5420..cc2c015a 100644 --- a/source/js/main.js +++ b/source/js/main.js @@ -28,7 +28,6 @@ const sidebarFn = () => { } const scrollFn = () => { const innerHeight = window.innerHeight; - if (document.body.scrollHeight <= innerHeight) return; let initTop = 0; const $header = document.getElementById('page-header'); const throttledScroll = utils.throttle((e) => { From 58964e3b865ad230806564844b37a507492475ce Mon Sep 17 00:00:00 2001 From: Efu Date: Mon, 17 Jun 2024 15:35:29 +0800 Subject: [PATCH 2/6] =?UTF-8?q?bug:=20=E4=BF=AE=E5=A4=8D=E5=BA=95=E9=83=A8?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=90=9C=E7=B4=A2=E8=B7=B3=E8=BD=AC=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/js/main.js b/source/js/main.js index cc2c015a..308c78a4 100644 --- a/source/js/main.js +++ b/source/js/main.js @@ -374,7 +374,7 @@ const sco = { } pageText.addEventListener("keydown", (event) => { if (event.keyCode === 13) { - this.toPage(); + sco.toPage(); pjax.loadUrl(pageButton.href); } }); From 9ed26533b8dad1d5cc6d73e1c135f0970a11c21e Mon Sep 17 00:00:00 2001 From: Efu Date: Mon, 17 Jun 2024 15:39:44 +0800 Subject: [PATCH 3/6] =?UTF-8?q?bug:=20=E5=85=B3=E4=BA=8E=E9=A1=B5=E5=8D=A1?= =?UTF-8?q?=E7=89=87=E8=BE=B9=E8=B7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layout/includes/widgets/page/about/other.pug | 141 ++++++++++--------- 1 file changed, 71 insertions(+), 70 deletions(-) diff --git a/layout/includes/widgets/page/about/other.pug b/layout/includes/widgets/page/about/other.pug index df897283..6fd58bac 100644 --- a/layout/includes/widgets/page/about/other.pug +++ b/layout/includes/widgets/page/about/other.pug @@ -1,82 +1,83 @@ - var tj = site.data.about.tj - var oneself = site.data.about.oneself -.author-content - if tj - .about-statistic.author-content-item(style=`background: url(${tj.img});`) - .card-content - .author-content-item-tips=_p('about.other.tj.tip') - span.author-content-item-title=_p('about.other.tj.title') - #statistic - .post-tips - = _p('about.other.tj.post_tip') - case tj.provider - when '51la' - a(href="https://v6.51.la/") 51la网站统计 - when 'baidu' - a(href="https://tongji.baidu.com/") 百度统计 - if tj.button - .banner-button-group - a.banner-button(href=url_for(tj.button_link)) - i.solitude.st-right-btn-fill - span.banner-button-text= tj.button_text +if tj || oneself + .author-content + if tj + .about-statistic.author-content-item(style=`background: url(${tj.img});`) + .card-content + .author-content-item-tips=_p('about.other.tj.tip') + span.author-content-item-title=_p('about.other.tj.title') + #statistic + .post-tips + = _p('about.other.tj.post_tip') + case tj.provider + when '51la' + a(href="https://v6.51.la/") 51la网站统计 + when 'baidu' + a(href="https://tongji.baidu.com/") 百度统计 + if tj.button + .banner-button-group + a.banner-button(href=url_for(tj.button_link)) + i.solitude.st-right-btn-fill + span.banner-button-text= tj.button_text - case tj.provider - when '51la' - script. - fetch("#{tj.url}") - .then(res => res.text()) - .then(data => { - const title = ["最近活跃", "今日人数", "今日访问", "昨日人数", "昨日访问", "本月访问", "总访问量"]; - let num = data.match(/(<\/span>).*?(\/span><\/p>)/g); - num = num.map(el => { - let val = el.replace(/(<\/span>)/g, ""); - return val.replace(/(<\/span><\/p>)/g, ""); + case tj.provider + when '51la' + script. + fetch("#{tj.url}") + .then(res => res.text()) + .then(data => { + const title = ["最近活跃", "今日人数", "今日访问", "昨日人数", "昨日访问", "本月访问", "总访问量"]; + let num = data.match(/(<\/span>).*?(\/span><\/p>)/g); + num = num.map(el => { + let val = el.replace(/(<\/span>)/g, ""); + return val.replace(/(<\/span><\/p>)/g, ""); + }); + const s = document.getElementById("statistic"); + let html = ''; + for (let i = 0; i < num.length; i++) { + if (i === 0 || i === num.length - 1) continue; + html += `
${title[i]}${num[i]}
`; + } + s.innerHTML = html; }); - const s = document.getElementById("statistic"); - let html = ''; - for (let i = 0; i < num.length; i++) { - if (i === 0 || i === num.length - 1) continue; - html += `
${title[i]}${num[i]}
`; - } - s.innerHTML = html; - }); - when 'baidu' - script. - fetch("#{tj.url}") - .then(res => res.json()) - .then(data => { - const title = {"today_uv": "今日人数", "today_pv": "今日访问", "yesterday_uv": "昨日人数", "yesterday_pv": "昨日访问", "last_month_pv": "最近月访问", "last_year_pv": "最近年访问"}; + when 'baidu' + script. + fetch("#{tj.url}") + .then(res => res.json()) + .then(data => { + const title = {"today_uv": "今日人数", "today_pv": "今日访问", "yesterday_uv": "昨日人数", "yesterday_pv": "昨日访问", "last_month_pv": "最近月访问", "last_year_pv": "最近年访问"}; - let s = document.getElementById("statistic"); + let s = document.getElementById("statistic"); - for (let key in data) { - if (data.hasOwnProperty(key) && title[key]) { - s.innerHTML += `
${title[key]}${data[key]}
`; - } - } - }); + for (let key in data) { + if (data.hasOwnProperty(key) && title[key]) { + s.innerHTML += `
${title[key]}${data[key]}
`; + } + } + }); - if oneself - style. - :root { - --site-about-oneself-map--light: url(#{oneself.map.light}); - --site-about-oneself-map--dark: url(#{oneself.map.dark}); - } - .author-content-item-group.column.mapAndInfo - .author-content-item.map.single - span.map-title=_p('about.other.oneself.map_title') + oneself.location - .author-content-item.selfInfo.single - div - span.selfInfo-title=_p('about.other.oneself.info_title1') - span.selfInfo-content(style="color: #43a6c6;")= oneself.birthYear - div - span.selfInfo-title= oneself.university - span.selfInfo-content(style="color: #c69043;")= oneself.major - div - span.selfInfo-title=_p('about.other.oneself.info_title2') - span.selfInfo-content(style="color: #b04fe6;")= oneself.occupation + if oneself + style. + :root { + --site-about-oneself-map--light: url(#{oneself.map.light}); + --site-about-oneself-map--dark: url(#{oneself.map.dark}); + } + .author-content-item-group.column.mapAndInfo + .author-content-item.map.single + span.map-title=_p('about.other.oneself.map_title') + oneself.location + .author-content-item.selfInfo.single + div + span.selfInfo-title=_p('about.other.oneself.info_title1') + span.selfInfo-content(style="color: #43a6c6;")= oneself.birthYear + div + span.selfInfo-title= oneself.university + span.selfInfo-content(style="color: #c69043;")= oneself.major + div + span.selfInfo-title=_p('about.other.oneself.info_title2') + span.selfInfo-content(style="color: #b04fe6;")= oneself.occupation - var cause = site.data.about.cause From 548b021a392c3cca15e8c73d21f5df6b5ab1c5d2 Mon Sep 17 00:00:00 2001 From: Efu Date: Thu, 20 Jun 2024 18:45:15 +0800 Subject: [PATCH 4/6] =?UTF-8?q?bug:=20=E8=A7=A3=E5=86=B3=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E5=8A=A0=E7=B2=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/css/_global/index.styl | 1 + 1 file changed, 1 insertion(+) diff --git a/source/css/_global/index.styl b/source/css/_global/index.styl index e0f808bc..667049fb 100644 --- a/source/css/_global/index.styl +++ b/source/css/_global/index.styl @@ -363,6 +363,7 @@ b, strong i.solitude font-size 22px line-height 1 + font-synthesis style .layout display: flex From eec7cea22e4732b5235c8065ee84f4db4f1109de Mon Sep 17 00:00:00 2001 From: Karunari Date: Fri, 21 Jun 2024 23:41:00 +0800 Subject: [PATCH 5/6] =?UTF-8?q?feat:=E9=80=82=E9=85=8D=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E4=B8=89=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _config.yml | 1 + source/css/_layout/recent-post.styl | 25 ++++++++++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/_config.yml b/_config.yml index d3fe1e73..96b8646a 100644 --- a/_config.yml +++ b/_config.yml @@ -308,6 +308,7 @@ aside: # Configure information on the home page index_post_list: direction: column # row / column + column: 2 #2:2列 3:3列 content: false # 1: post.description / 2: 自动获取description或截取内容(Automatically get descriptions or screenshots) / 3: 只使用截取内容(Use only screenshots) / false: 不显示内容(No content is displayed) length: 500 # 截取内容的长度 : The length of the screenshot content cover: both # left: 在左侧 : left / right: 在右侧 : right / both: 两侧 : both diff --git a/source/css/_layout/recent-post.styl b/source/css/_layout/recent-post.styl index ae6cb869..270f8cae 100644 --- a/source/css/_layout/recent-post.styl +++ b/source/css/_layout/recent-post.styl @@ -32,13 +32,6 @@ if hexo-config('index_post_list.direction') == "column" cursor pointer border var(--style-border) - +minWidth1300() - flex-direction column - width 100% - flex 1 1 40% - max-width 50% - box-shadow var(--efu-shadow-border) - +maxWidth1300() margin-bottom .5rem @@ -238,6 +231,24 @@ if hexo-config('index_post_list.direction') == "column" .sticky color var(--efu-fontcolor) + if hexo-config('index_post_list.direction') == "column" && hexo-config('index_post_list.column') == 2 + #recent-posts + > .recent-post-item + +minWidth1300() + flex-direction column + width 100% + flex 1 1 40% + max-width 50% + box-shadow var(--efu-shadow-border) + else if hexo-config('index_post_list.direction') == "column" && hexo-config('index_post_list.column') == 3 + #recent-posts + > .recent-post-item + +minWidth1300() + flex-direction column + flex 1 1 33.3% + max-width 32.6% + box-shadow var(--efu-shadow-border) + else if hexo-config('index_post_list.direction') == "row" #recent-posts position relative From 3fb5a1fa8d50d8b522bdc0a18d67435a0551c4d0 Mon Sep 17 00:00:00 2001 From: Karunari Date: Fri, 21 Jun 2024 23:43:16 +0800 Subject: [PATCH 6/6] =?UTF-8?q?feat:=E9=80=82=E9=85=8D=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E4=B8=89=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/css/_layout/recent-post.styl | 1 + 1 file changed, 1 insertion(+) diff --git a/source/css/_layout/recent-post.styl b/source/css/_layout/recent-post.styl index 270f8cae..350a546c 100644 --- a/source/css/_layout/recent-post.styl +++ b/source/css/_layout/recent-post.styl @@ -245,6 +245,7 @@ if hexo-config('index_post_list.direction') == "column" > .recent-post-item +minWidth1300() flex-direction column + width 100% flex 1 1 33.3% max-width 32.6% box-shadow var(--efu-shadow-border)