From b06627a237069fda910b5a3318d62ffee0f6a0c1 Mon Sep 17 00:00:00 2001 From: Efu Date: Wed, 8 May 2024 14:37:50 +0800 Subject: [PATCH 01/14] =?UTF-8?q?bug:=20=E4=BF=AE=E5=A4=8D=E5=8D=B3?= =?UTF-8?q?=E5=88=BB=E7=9F=AD=E6=96=87=E6=B2=A1=E6=9C=89=E8=BE=B9=E8=B7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/css/_page/says.styl | 1 + 1 file changed, 1 insertion(+) diff --git a/source/css/_page/says.styl b/source/css/_page/says.styl index 50952130..b03a75a0 100644 --- a/source/css/_page/says.styl +++ b/source/css/_page/says.styl @@ -285,6 +285,7 @@ if hexo-config('says.enable') align-items flex-start background var(--efu-card-bg) margin-right .5rem + margin-bottom .5rem box-shadow var(--efu-shadow-border) +maxWidth1300() From 6d2e89a527eb53154b8f045cfbeda2594a425420 Mon Sep 17 00:00:00 2001 From: Efu Date: Thu, 9 May 2024 11:34:21 +0800 Subject: [PATCH 02/14] =?UTF-8?q?bug:=20=E4=BF=AE=E5=A4=8D=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=8D=A1=E7=89=87=E6=A0=B7=E5=BC=8F3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/css/_layout/aside.styl | 1 + 1 file changed, 1 insertion(+) diff --git a/source/css/_layout/aside.styl b/source/css/_layout/aside.styl index e483b108..439533d8 100644 --- a/source/css/_layout/aside.styl +++ b/source/css/_layout/aside.styl @@ -678,6 +678,7 @@ if hexo-config('aside.card.style') == 2 opacity 0 transition .3s display flex + pointer-events none gap 5px .more-info if hexo-config('aside.position') == 0 From d05a6f6c0d4636642326a4acd728357be0eef019 Mon Sep 17 00:00:00 2001 From: Efu Date: Thu, 9 May 2024 11:34:35 +0800 Subject: [PATCH 03/14] =?UTF-8?q?chore:=20=E5=90=8C=E6=AD=A5=E7=9B=B8?= =?UTF-8?q?=E5=86=8C=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/css/_tags/gallery.styl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/css/_tags/gallery.styl b/source/css/_tags/gallery.styl index bb7f39bb..1dca96a6 100644 --- a/source/css/_tags/gallery.styl +++ b/source/css/_tags/gallery.styl @@ -3,7 +3,7 @@ position: relative float: left overflow: hidden - margin: 6px 4px + margin: 0 width: calc(50% - 8px) height: 250px border-radius: 8px @@ -92,8 +92,10 @@ transform: translate3d(-100%, 0, 0) .gallery-group-main - overflow: auto - padding: 0 0 16px + overflow auto + display flex + gap .5rem + margin-top .5rem .gallery-item min-height 5rem From b9898fa3c252d7b3d6a332a08693a72fdde5a286 Mon Sep 17 00:00:00 2001 From: isYangs Date: Thu, 9 May 2024 13:38:36 +0800 Subject: [PATCH 04/14] =?UTF-8?q?fix(README):=20=F0=9F=90=9E=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=9C=A8=E7=AE=80=E4=BD=93=E4=B8=AD=E6=96=87=E4=B8=AD?= =?UTF-8?q?=E6=B7=B7=E7=94=A8=E7=B9=81=E4=BD=93=E4=B8=AD=E6=96=87=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d2f9b11b..a23822fb 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ - [x] 弹幕留言页 - [ ] 首页顶部新样式 -> 如有問題請提 [issue](https://github.com/valor-x/hexo-theme-solitude/issues) +> 如有问题请提 [issue](https://github.com/valor-x/hexo-theme-solitude/issues) ## 应用 From 9384c444c4eea82c7518dfab29455a995d350131 Mon Sep 17 00:00:00 2001 From: Efu Date: Thu, 9 May 2024 18:35:56 +0800 Subject: [PATCH 05/14] bug: #276 --- source/css/_layout/console.styl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/css/_layout/console.styl b/source/css/_layout/console.styl index 6ad55254..4244cb75 100644 --- a/source/css/_layout/console.styl +++ b/source/css/_layout/console.styl @@ -35,11 +35,13 @@ +maxHeight800() display none + &.show .console-card-group transform translateY(0) opacity 1 transition-delay .1s + max-height 80% .console-card-group-left margin-right .5rem From 3aa841f5c2f54d3d2af08fb1e017119a4827a6d1 Mon Sep 17 00:00:00 2001 From: Efu Date: Thu, 9 May 2024 18:57:01 +0800 Subject: [PATCH 06/14] bug: #276 --- layout/includes/widgets/third-party/news-comment/artalk.pug | 2 +- layout/includes/widgets/third-party/news-comment/twikoo.pug | 2 +- layout/includes/widgets/third-party/news-comment/waline.pug | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layout/includes/widgets/third-party/news-comment/artalk.pug b/layout/includes/widgets/third-party/news-comment/artalk.pug index 63f5a007..5fecc264 100644 --- a/layout/includes/widgets/third-party/news-comment/artalk.pug +++ b/layout/includes/widgets/third-party/news-comment/artalk.pug @@ -61,7 +61,7 @@ script. nick: e.nick, url: e.page_key, date: e.date, - })) + })).slice(0, 6) utils.saveToLocal.set('artalk-newest-comments', artalk, !{theme.comment.newest_comment.storage}) generateHtml(artalk, asideList) }).catch(error => { diff --git a/layout/includes/widgets/third-party/news-comment/twikoo.pug b/layout/includes/widgets/third-party/news-comment/twikoo.pug index 374ccf52..977c399a 100644 --- a/layout/includes/widgets/third-party/news-comment/twikoo.pug +++ b/layout/includes/widgets/third-party/news-comment/twikoo.pug @@ -46,7 +46,7 @@ script. nick: e.nick, url: `${e.url}#${e.id}`, date: new Date(e.created).toString() - })) + })).slice(0, 6) utils.saveToLocal.set('twikoo-newest-comment', twikooArray, !{theme.comment.newest_comment.storage}) generateHtml(twikooArray) }).catch((err) => { diff --git a/layout/includes/widgets/third-party/news-comment/waline.pug b/layout/includes/widgets/third-party/news-comment/waline.pug index ae396bde..4c2eae5a 100644 --- a/layout/includes/widgets/third-party/news-comment/waline.pug +++ b/layout/includes/widgets/third-party/news-comment/waline.pug @@ -39,7 +39,7 @@ script. 'url': e.url + '#' + e.objectId, 'date': e.time || e.insertedAt } - }) + }).slice(0, 6) utils.saveToLocal.set('waline-newest-comment', walineArray, !{theme.comment.newest_comment.storage}) generateHtml(walineArray) }).catch(error => { From 3c7d18af37a7a9e9a1b59504656e3270643c35e1 Mon Sep 17 00:00:00 2001 From: Efu Date: Fri, 10 May 2024 12:47:11 +0800 Subject: [PATCH 07/14] =?UTF-8?q?feat:=20=E5=90=8C=E6=AD=A5=E5=85=B3?= =?UTF-8?q?=E4=BA=8E=E9=A1=B5=E9=9D=A2=E5=8D=A1=E7=89=87=E8=BE=B9=E8=B7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/css/_global/index.styl | 2 +- source/css/_layout/article-container.styl | 2 +- source/css/_page/_about/about.styl | 3 ++- source/css/_page/_about/buff.styl | 2 +- source/css/_page/_about/contentinfo.styl | 4 ++-- source/css/_page/_about/maxim.styl | 2 +- source/css/_page/_about/myphoto.styl | 2 +- source/css/_page/_about/oneself.styl | 4 ++-- source/css/_page/_about/personalities.styl | 2 +- source/css/_page/_about/skills.styl | 2 +- source/css/_page/_about/statistic.styl | 2 +- source/css/_page/other.styl | 10 ++-------- 12 files changed, 16 insertions(+), 21 deletions(-) diff --git a/source/css/_global/index.styl b/source/css/_global/index.styl index f937a9e5..5089beb2 100644 --- a/source/css/_global/index.styl +++ b/source/css/_global/index.styl @@ -116,7 +116,7 @@ h1, h2, h3, h4, h5, h6 padding-left 0 font-weight 700 position relative - margin 1rem 0 0.7rem + margin .5rem 0 color var(--efu-fontcolor) hr diff --git a/source/css/_layout/article-container.styl b/source/css/_layout/article-container.styl index 7e8267c4..b4bb7fcd 100644 --- a/source/css/_layout/article-container.styl +++ b/source/css/_layout/article-container.styl @@ -191,7 +191,7 @@ font-size 1.3rem line-height 1.3 border-top 1px dashed var(--efu-theme-op) - padding-top 1.5rem + padding-top 1rem h3 font-size 1.1rem diff --git a/source/css/_page/_about/about.styl b/source/css/_page/_about/about.styl index 05908c85..41fe8c4f 100644 --- a/source/css/_page/_about/about.styl +++ b/source/css/_page/_about/about.styl @@ -3,11 +3,12 @@ padding-top 1rem flex-direction column align-items center + gap .5rem .author-title font-size 2rem font-weight 700 - margin 1rem 0 + margin .5rem 0 line-height 1 if "tenyear" in $about diff --git a/source/css/_page/_about/buff.styl b/source/css/_page/_about/buff.styl index a62a9d01..b36f61af 100644 --- a/source/css/_page/_about/buff.styl +++ b/source/css/_page/_about/buff.styl @@ -13,7 +13,7 @@ animation gradient 15s ease infinite min-height 200px height fit-content - width 59% + width 59.5% .card-content display flex diff --git a/source/css/_page/_about/contentinfo.styl b/source/css/_page/_about/contentinfo.styl index f4c6308d..bbfbd2ca 100644 --- a/source/css/_page/_about/contentinfo.styl +++ b/source/css/_page/_about/contentinfo.styl @@ -7,7 +7,7 @@ background linear-gradient(120deg, #5b27ff 0, #00d4ff 100%) background-size 200% animation gradient 15s ease infinite - width 59% + width 59.5% .title1 opacity .8 @@ -28,7 +28,7 @@ justify-content center align-items flex-start flex-direction column - width 39% + width 39.5% h2 margin-right auto diff --git a/source/css/_page/_about/maxim.styl b/source/css/_page/_about/maxim.styl index 933e7c81..9448ca07 100644 --- a/source/css/_page/_about/maxim.styl +++ b/source/css/_page/_about/maxim.styl @@ -7,7 +7,7 @@ align-items flex-start flex-direction column justify-content center - width 39% + width 39.5% .maxim-title display flex diff --git a/source/css/_page/_about/myphoto.styl b/source/css/_page/_about/myphoto.styl index f776d799..b35d1c20 100644 --- a/source/css/_page/_about/myphoto.styl +++ b/source/css/_page/_about/myphoto.styl @@ -4,7 +4,7 @@ min-height 240px position relative overflow hidden - width 39% + width 39.5% display flex align-items center justify-content center diff --git a/source/css/_page/_about/oneself.styl b/source/css/_page/_about/oneself.styl index e822927a..e94ad3b7 100644 --- a/source/css/_page/_about/oneself.styl +++ b/source/css/_page/_about/oneself.styl @@ -10,7 +10,8 @@ width 100% !important &.mapAndInfo - width 59% + width 59.5% + gap .5rem .author-content-item +minWidth1300() @@ -22,7 +23,6 @@ max-height 400px position relative overflow hidden - margin-bottom 0.5rem height 60% background-size 100% transition 1s ease-in-out diff --git a/source/css/_page/_about/personalities.styl b/source/css/_page/_about/personalities.styl index 382dd5b4..20a0906b 100644 --- a/source/css/_page/_about/personalities.styl +++ b/source/css/_page/_about/personalities.styl @@ -1,7 +1,7 @@ .author-content-item.personalities overflow hidden position relative - width 59% + width 59.5% +maxWidth768() min-height 360px diff --git a/source/css/_page/_about/skills.styl b/source/css/_page/_about/skills.styl index 9430ddf4..71d00cbd 100644 --- a/source/css/_page/_about/skills.styl +++ b/source/css/_page/_about/skills.styl @@ -4,7 +4,7 @@ justify-content center align-items flex-start flex-direction column - width 49% + width 49.5% min-height 450px .tags-group-all diff --git a/source/css/_page/_about/statistic.styl b/source/css/_page/_about/statistic.styl index e1684962..88fed247 100644 --- a/source/css/_page/_about/statistic.styl +++ b/source/css/_page/_about/statistic.styl @@ -5,7 +5,7 @@ .about-statistic min-height 380px - width 39% + width 39.5% background-size cover color var(--efu-white) overflow hidden diff --git a/source/css/_page/other.styl b/source/css/_page/other.styl index 3994e054..a999b175 100644 --- a/source/css/_page/other.styl +++ b/source/css/_page/other.styl @@ -131,7 +131,7 @@ div#banners flex-wrap wrap justify-content space-between width 100% - margin-top 1rem + gap .5rem +maxWidth768() margin-top 0 @@ -141,7 +141,6 @@ div#banners animation slide-in .6s 0s backwards +maxWidth768() width 100% !important - margin-top 1rem padding 1rem .author-content.author-content-item.sharePage @@ -152,7 +151,7 @@ div#banners margin-top 0 .author-content-item - width 49% + width 49.5% border-radius 12px background var(--efu-card-bg) border var(--style-border-always) @@ -161,11 +160,6 @@ div#banners overflow hidden padding 1rem 2rem - +maxWidth768() - width 100% - margin-top 1rem - padding 1rem - &.single width 100% From 44624220d43ddab049af27210ab438c09da77989 Mon Sep 17 00:00:00 2001 From: Efu Date: Fri, 10 May 2024 21:25:01 +0800 Subject: [PATCH 08/14] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=89=93=E5=BC=80=E5=BF=AB=E6=8D=B7=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/js/search/algolia.js | 10 ++++++++++ source/js/search/local.js | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/source/js/search/algolia.js b/source/js/search/algolia.js index 0e99c209..8bb8fe61 100644 --- a/source/js/search/algolia.js +++ b/source/js/search/algolia.js @@ -30,6 +30,16 @@ window.addEventListener("load", () => { } }; + const addEventCtrlK = () => { + document.addEventListener("keydown", function (event) { + if (event.ctrlKey && event.key === "k") { + openSearch(); + } + }); + } + + addEventCtrlK() + const searchClickFn = () => { utils.addEventListenerPjax(document.querySelector("#search-button > .search"), "click", openSearch); diff --git a/source/js/search/local.js b/source/js/search/local.js index 37d42d97..6766a7d3 100644 --- a/source/js/search/local.js +++ b/source/js/search/local.js @@ -37,6 +37,16 @@ window.addEventListener("load", () => { addEventTagList() + const addEventCtrlK = () => { + document.addEventListener("keydown", function (event) { + if (event.ctrlKey && event.key === "k") { + openSearch(); + } + }); + } + + addEventCtrlK() + const searchFnOnce = () => { $searchMask.addEventListener("click", closeSearch); utils.addEventListenerPjax(document.querySelector("#local-search .search-close-button"), "click", closeSearch); From 728885003bb2e1eee3df524a2ee2cd3f1de43846 Mon Sep 17 00:00:00 2001 From: whuib <1652725215@qq.com> Date: Fri, 10 May 2024 21:55:28 +0800 Subject: [PATCH 09/14] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=BF=AB=E6=8D=B7?= =?UTF-8?q?=E9=94=AE=E5=B1=8F=E8=94=BD=E9=BB=98=E8=AE=A4=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/js/search/local.js | 1 + 1 file changed, 1 insertion(+) diff --git a/source/js/search/local.js b/source/js/search/local.js index 6766a7d3..2c2f2ac1 100644 --- a/source/js/search/local.js +++ b/source/js/search/local.js @@ -40,6 +40,7 @@ window.addEventListener("load", () => { const addEventCtrlK = () => { document.addEventListener("keydown", function (event) { if (event.ctrlKey && event.key === "k") { + event.preventDefault(); openSearch(); } }); From 2362ff4c8cd1ebc2ab3cbbe8182ac4039d3292a7 Mon Sep 17 00:00:00 2001 From: whuib <1652725215@qq.com> Date: Fri, 10 May 2024 23:04:02 +0800 Subject: [PATCH 10/14] =?UTF-8?q?=E5=B1=8F=E8=94=BD=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=BF=AB=E6=8D=B7=E9=94=AE=E7=9A=84=E9=BB=98=E8=AE=A4=E8=A1=8C?= =?UTF-8?q?=E4=B8=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/js/search/algolia.js | 1 + 1 file changed, 1 insertion(+) diff --git a/source/js/search/algolia.js b/source/js/search/algolia.js index 8bb8fe61..4e5741af 100644 --- a/source/js/search/algolia.js +++ b/source/js/search/algolia.js @@ -33,6 +33,7 @@ window.addEventListener("load", () => { const addEventCtrlK = () => { document.addEventListener("keydown", function (event) { if (event.ctrlKey && event.key === "k") { + event.preventDefault(); openSearch(); } }); From 16c41c636c126262282e873d96d230a2765b7ba4 Mon Sep 17 00:00:00 2001 From: Efu Date: Sat, 11 May 2024 13:17:16 +0800 Subject: [PATCH 11/14] =?UTF-8?q?bug:=20=E4=BF=AE=E5=A4=8D=E5=8D=B3?= =?UTF-8?q?=E5=88=BB=E7=9F=AD=E6=96=871300-1400=E5=AE=BD=E5=BA=A6=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=94=99=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/css/_page/says.styl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/css/_page/says.styl b/source/css/_page/says.styl index b03a75a0..31de6ba3 100644 --- a/source/css/_page/says.styl +++ b/source/css/_page/says.styl @@ -273,7 +273,7 @@ if hexo-config('says.enable') li &.item position relative - width 33% + width calc(33% - .06rem) border var(--style-border-always) border-radius 12px padding 1rem 1rem .5rem @@ -289,7 +289,7 @@ if hexo-config('says.enable') box-shadow var(--efu-shadow-border) +maxWidth1300() - width 49% + width 49.5% margin-right 1% +maxWidth768() @@ -312,7 +312,6 @@ if hexo-config('says.enable') display flex flex-direction row flex-wrap wrap - justify-content space-between li &.item From 09d952ccbc14da464b4c071fe92bd9b6856c0d86 Mon Sep 17 00:00:00 2001 From: Efu Date: Sat, 11 May 2024 14:21:26 +0800 Subject: [PATCH 12/14] =?UTF-8?q?feat(=E5=A4=8D=E5=88=BBHeo):=20=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E9=A1=B6=E9=83=A8=E7=A7=BB=E5=8A=A8=E7=AB=AF=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../includes/widgets/home/categoryGroup.pug | 12 - layout/includes/widgets/home/hometop.pug | 1 - layout/includes/widgets/home/topGroup.pug | 17 +- source/css/_layout/header.styl | 27 -- source/css/_page/_home/home-top.styl | 113 ++------- source/css/_page/_home/home.styl | 2 +- source/css/_page/links.styl | 3 - source/css/_page/other.styl | 232 ++++++++++-------- source/js/main.js | 24 +- 9 files changed, 154 insertions(+), 277 deletions(-) delete mode 100644 layout/includes/widgets/home/categoryGroup.pug diff --git a/layout/includes/widgets/home/categoryGroup.pug b/layout/includes/widgets/home/categoryGroup.pug deleted file mode 100644 index dca3b523..00000000 --- a/layout/includes/widgets/home/categoryGroup.pug +++ /dev/null @@ -1,12 +0,0 @@ -- gg = theme.hometop.group -- group = gg ? (Object.entries(gg)).slice(0, 2) : null - -if group - .categoryGroup - each item in group - - var array = item[1].split('||') - .categoryItem - a.categoryButton(href=url_for(trim(array[0])) style="background-image:" + array[2] + ";") - span.categoryButtonText= item[0] - if array[1] - i.solitude(class=trim(array[1])) \ No newline at end of file diff --git a/layout/includes/widgets/home/hometop.pug b/layout/includes/widgets/home/hometop.pug index ffea59da..495c868c 100644 --- a/layout/includes/widgets/home/hometop.pug +++ b/layout/includes/widgets/home/hometop.pug @@ -3,6 +3,5 @@ #bannerGroup #banners include ./banner.pug - include ./categoryGroup.pug .topGroup include ./topGroup.pug \ No newline at end of file diff --git a/layout/includes/widgets/home/topGroup.pug b/layout/includes/widgets/home/topGroup.pug index 32969aa0..07a9a98b 100644 --- a/layout/includes/widgets/home/topGroup.pug +++ b/layout/includes/widgets/home/topGroup.pug @@ -1,12 +1,13 @@ - var filteredPosts = site.posts.data.filter(item => item.recommend === true).slice(0,6) -each post in filteredPosts - .recent-post-item - .post_cover - a(href=url_for(post.path), title=post.title) - span.recent-post-top-text= _p('home.recommend') - img.post_bg(alt=post.title, src=post.cover) - .recent-post-info - a.article-title(href=url_for(post.path), title=post.title)= post.title +.recent-post-group + each post in filteredPosts + .recent-post-item + .post_cover + a(href=url_for(post.path), title=post.title) + span.recent-post-top-text= _p('home.recommend') + img.post_bg(alt=post.title, src=post.cover) + .recent-post-info + a.article-title(href=url_for(post.path), title=post.title)= post.title mixin todayCardContent .todayCard-info diff --git a/source/css/_layout/header.styl b/source/css/_layout/header.styl index 1c5eaa61..28302b91 100644 --- a/source/css/_layout/header.styl +++ b/source/css/_layout/header.styl @@ -521,33 +521,6 @@ padding 4px transition transform .3s ease 0s - &.hide-menu - #toggle-menu - display inline-block - - +minWidth768() - display none - - .site-page - font-size inherit - - +maxWidth768() - width 35px - height 35px - display flex - align-items center - justify-content center - - .menus_items - position absolute - left 0 - visibility hidden - opacity 0 - - #search-button - span - display none - #search-button display inline padding 0 .4rem diff --git a/source/css/_page/_home/home-top.styl b/source/css/_page/_home/home-top.styl index 4ca4c690..a47e3ad3 100644 --- a/source/css/_page/_home/home-top.styl +++ b/source/css/_page/_home/home-top.styl @@ -2,7 +2,6 @@ .recent-top-post-group border-radius 12px overflow hidden - overflow-x auto width 100% margin-bottom 0 user-select none @@ -15,15 +14,24 @@ flex-direction row flex-wrap nowrap width 100% - overflow-x scroll gap .5rem +maxWidth1200() - gap 0 + flex-direction column &::-webkit-scrollbar display none + .recent-post-group + display flex + flex-direction row + flex-wrap wrap + align-content space-between + gap .5rem + + +maxWidth1200() + flex-wrap nowrap + / #bannerGroup display flex +minWidth1201() @@ -47,94 +55,17 @@ .tags-group-icon:nth-child(even) margin-left 4rem - .categoryGroup - display flex - flex-direction column - justify-content space-between - min-width 200px - +minWidth1201() - display none - +maxWidth768() - min-width 130px - margin-left 1rem - max-height 164px - overflow hidden - position relative - - .categoryItem - overflow hidden - transform scale(1) - transition all .8s cubic-bezier(.65, .15, .37, 1.19) - height 48% - border-radius 12px - +maxWidth768() - border-radius 0 - height 47% - box-shadow none - - a.categoryButton - height 100% - width 100% - background var(--efu-card-bg) - background-size 200% - border-radius 12px - display inline-block - text-align left - line-height 4em - font-weight 700 - font-size .9rem - color var(--efu-white) - transition all .8s cubic-bezier(.39, .575, .565, 1) - transform scale(1) - overflow hidden - +maxWidth768() - border-radius 8px - - &:after - top 50px - width 1rem - left 21px - height 2px - background var(--efu-white) - content "" - border-radius 1px - position absolute - - i - font-size 5rem - opacity .2 - position absolute - right 0 - top 20% - transition .3s - width 100px - text-align center - filter blur(2px) - transform scale(1) rotate(15deg) - - +maxWidth768() - display none - - &:hover - i - opacity .8 - transition .8s - transition-delay .15s - transform scale(1.03) rotate(0) - font-size 2.5rem - filter blur(0) - - .categoryButtonText - padding-left 21px - /.topGroup - display: flex + display flex + gap .5rem + +maxWidth1200() + overflow-x auto +minWidth1201() display flex flex-direction row flex-wrap wrap - justify-content space-between + justify-content flex-start height calc(328px + 0.5rem) align-content space-between width calc(50% - 0.25rem) @@ -144,7 +75,7 @@ .recent-post-item display flex flex-direction column - width calc(100% / 3 - 0.25rem) + width calc(100% / 3 - 0.5rem) align-items flex-start background var(--efu-card-bg) border-radius 12px @@ -159,10 +90,6 @@ +maxWidth1200() width 200px min-width 200px - margin-left .5rem - - &:last-child - margin-right 1rem &:hover .post_cover a .recent-post-top-text left 0 @@ -214,7 +141,6 @@ &:hover color var(--efu-fontcolor) - .todayCard display none @@ -227,7 +153,6 @@ right 0 background var(--efu-card-bg) border-radius 12px - margin-left 0.5rem overflow hidden transition .3s display flex @@ -315,10 +240,6 @@ .banner-button-group bottom: 1rem - - +maxWidth768() - margin-right 1rem - .banners-links display flex position absolute diff --git a/source/css/_page/_home/home.styl b/source/css/_page/_home/home.styl index a6b637b4..56d36139 100644 --- a/source/css/_page/_home/home.styl +++ b/source/css/_page/_home/home.styl @@ -5,7 +5,7 @@ if hexo-config('hometop.enable') || hexo-config('says.enable') padding .5rem 1.5rem +maxWidth768() - padding 0 + padding 0 1rem margin-top 0 if hexo-config('hometop.enable') diff --git a/source/css/_page/links.styl b/source/css/_page/links.styl index 7ce52917..e742a33a 100644 --- a/source/css/_page/links.styl +++ b/source/css/_page/links.styl @@ -69,9 +69,6 @@ +maxWidth768() width calc(33.3333% - 16px) - +maxWidth600() - width calc(50% - 16px) - .img border-radius 0 height 120px diff --git a/source/css/_page/other.styl b/source/css/_page/other.styl index a999b175..e8545f07 100644 --- a/source/css/_page/other.styl +++ b/source/css/_page/other.styl @@ -1,130 +1,148 @@ div#banners - display none - +minWidth1201() + display flex + width 100% + background var(--efu-card-bg) + border var(--style-border-always) + border-radius 12px + overflow hidden + position relative + box-shadow var(--efu-shadow-border) + flex-direction column + transition .3s + will-change transform + animation slide-in .6s .1s backwards + + #home_top & + +maxWidth1200() + height calc(328px + .5rem) + + :not(.flink)&:hover + box-shadow var(--efu-shadow-main) + + .banner-button-group + position absolute + right 2rem + top 2rem display flex - width 100% - background var(--efu-card-bg) - border var(--style-border) + + +maxWidth768() + display none + + .banner-button + padding 8px 12px + background var(--efu-fontcolor) border-radius 12px - overflow hidden - position relative - box-shadow var(--efu-shadow-border) - flex-direction column + color var(--efu-card-bg) + display flex + align-items center + z-index 1 transition .3s - will-change transform - animation slide-in .6s .1s backwards + cursor pointer + box-shadow var(--efu-shadow-black) + + &.secondary + background var(--efu-secondbg) + border var(--style-border-always) + color var(--efu-lighttext) + margin-right 1rem + box-shadow var(--efu-shadow-border) + + &:hover + background var(--efu-theme) + color var(--efu-white) + + i + margin-right 8px + font-size 1rem + + /.banners-title + top 2.6rem + left 2rem + position absolute + display flex + flex-direction column - :not(.flink)&:hover - box-shadow var(--efu-shadow-main) + &-big + font-size 36px + line-height 1 + font-weight 700 + margin-bottom 8px + + &-small + font-size 12px + line-height 1 + color var(--efu-secondtext) + margin-top 8px + margin-bottom 0.5rem + margin-left 2px + + /.flink + .banners-title + top 1.5rem + + .bannerText + font-size 4rem + line-height 4rem + font-weight 700 - .banner-button-group - position absolute - right 2rem - top 2rem - display flex +/.tags-group-all + display flex - .banner-button - padding 8px 12px - background var(--efu-fontcolor) - border-radius 12px - color var(--efu-card-bg) - display flex - align-items center - z-index 1 - transition .3s - cursor pointer - box-shadow var(--efu-shadow-black) - - &.secondary - background var(--efu-secondbg) - border var(--style-border-always) - color var(--efu-lighttext) - margin-right 1rem - box-shadow var(--efu-shadow-border) - - &:hover - background var(--efu-theme) - color var(--efu-white) + #home_top & + +maxWidth600() + opacity 0.06 + filter blur(8px) - i - margin-right 8px - font-size 1rem + &.nowrapMove + padding-bottom 2rem - /.banners-title - top 2.6rem - left 2rem - position absolute + .tags-group-wrapper + margin-top: 7rem + animation: rowleft 120s linear infinite display flex - flex-direction column - - &-big - font-size 36px - line-height 1 - font-weight 700 - margin-bottom 8px - - &-small - font-size 12px - line-height 1 - color var(--efu-secondtext) - margin-top 8px - margin-bottom 0.5rem - margin-left 2px - - /.flink - .banners-title - top 1.5rem - - .bannerText - font-size 4rem - line-height 4rem - font-weight 700 - - /.tags-group-all - display flex - &.nowrapMove - padding-bottom 2rem + +maxWidth768() + margin-top 7.5rem - .tags-group-wrapper - margin-top: 7rem - animation: rowleft 120s linear infinite - display flex + .tags-group-icon + border-radius 50% - .tags-group-icon + img + min-width 100% + min-height 100% border-radius 50% + object-fit cover - img - min-width 100% - min-height 100% - border-radius 50% - object-fit cover + .tags-group-icon-pair + margin-left 1rem + user-select none - .tags-group-icon-pair - margin-left 1rem - user-select none + a img + border-radius 50% - a img - border-radius 50% + /.tags-group-icon + width 120px + height 120px + border-radius 30px + display flex + align-items center + justify-content center + color #fff + font-size 66px + font-weight 700 + box-shadow var(--efu-shadow-blackdeep) - /.tags-group-icon - width 120px - height 120px - border-radius 30px - display flex - align-items center - justify-content center - color #fff - font-size 66px - font-weight 700 - box-shadow var(--efu-shadow-blackdeep) + #page & + +maxWidth768() + width 50px + height 50px - &:nth-child(even) - margin-top 1rem - transform translate(-60px) + &:nth-child(even) + margin-top 1rem + transform translate(-60px) - img - width 60% + img + width 60% .author-content display flex diff --git a/source/js/main.js b/source/js/main.js index c069aa63..4ff8941f 100644 --- a/source/js/main.js +++ b/source/js/main.js @@ -163,7 +163,7 @@ let is_rm = typeof rm !== 'undefined' /** * sco * @description solitude 主题的一些方法 - * @type {{showConsole: (function(): boolean), setTimeState: sco.setTimeState, toTop: (function(): void), changeTimeFormat(*): void, hideCookie: sco.hideCookie, owoBig(*): void, switchDarkMode: sco.switchDarkMode, openAllTags: sco.openAllTags, switchHideAside: sco.switchHideAside, addRuntime: sco.addRuntime, refreshWaterFall: sco.refreshWaterFall, categoriesBarActive: sco.categoriesBarActive, addNavBackgroundInit: sco.addNavBackgroundInit, toPage: sco.toPage, changeSayHelloText: sco.changeSayHelloText, initConsoleState: (function(): void), switchComments(): void, switchKeyboard: sco.switchKeyboard, initAdjust: sco.initAdjust, listenToPageInputPress: sco.listenToPageInputPress, scrollTo: sco.scrollTo, musicToggle: sco.musicToggle, toTalk: sco.toTalk, switchCommentBarrage: sco.switchCommentBarrage, hideTodayCard: (function(): void), scrollCategoryBarToRight: sco.scrollCategoryBarToRight, scrollToComment: sco.scrollToComment, initbbtalk: sco.initbbtalk, tagPageActive: sco.tagPageActive, hideConsole: (function(): void), addPhotoFigcaption: sco.addPhotoFigcaption}} + * @type {{showConsole: (function(): boolean), setTimeState: sco.setTimeState, toTop: (function(): void), changeTimeFormat(*): void, hideCookie: sco.hideCookie, owoBig(*): void, switchDarkMode: sco.switchDarkMode, openAllTags: sco.openAllTags, switchHideAside: sco.switchHideAside, addRuntime: sco.addRuntime, refreshWaterFall: sco.refreshWaterFall, categoriesBarActive: sco.categoriesBarActive, addNavBackgroundInit: sco.addNavBackgroundInit, toPage: sco.toPage, changeSayHelloText: sco.changeSayHelloText, initConsoleState: (function(): void), switchComments(): void, switchKeyboard: sco.switchKeyboard, listenToPageInputPress: sco.listenToPageInputPress, scrollTo: sco.scrollTo, musicToggle: sco.musicToggle, toTalk: sco.toTalk, switchCommentBarrage: sco.switchCommentBarrage, hideTodayCard: (function(): void), scrollCategoryBarToRight: sco.scrollCategoryBarToRight, scrollToComment: sco.scrollToComment, initbbtalk: sco.initbbtalk, tagPageActive: sco.tagPageActive, hideConsole: (function(): void), addPhotoFigcaption: sco.addPhotoFigcaption}} */ let sco = { /** @@ -507,26 +507,6 @@ let sco = { const scrollTop = document.documentElement.scrollTop; (scrollTop !== 0) && document.getElementById("page-header").classList.add("nav-fixed", "nav-visible"); }, - /** - * initAdjust - * @description 初始化调整 - */ - initAdjust: function () { - const $blogName = document.getElementById('site-name'); - const $menusEle = document.querySelector('#menus .menus_items'); - const $searchEle = document.querySelector('#search-button'); - const $nav = document.getElementById('nav'); - const blogNameWidth = $blogName && $blogName.offsetWidth; - const menusWidth = $menusEle && $menusEle.offsetWidth; - const searchWidth = $searchEle && $searchEle.offsetWidth; - const shouldHideMenu = window.innerWidth < 768 || blogNameWidth + menusWidth + searchWidth > $nav?.offsetWidth - 120; - if (shouldHideMenu) { - $nav?.classList.add('hide-menu'); - } else { - $nav?.classList.remove('hide-menu'); - } - $nav?.classList.add('show'); - }, /** * toPage * @description 跳转到指定页 @@ -822,7 +802,7 @@ window.refreshFn = () => { } // 页面加载完成后执行 document.addEventListener('DOMContentLoaded', () => { - [sco.initAdjust, addCopyright, sco.initConsoleState, window.refreshFn, asideStatus, () => window.onscroll = percent].forEach(fn => fn()); + [addCopyright, sco.initConsoleState, window.refreshFn, asideStatus, () => window.onscroll = percent].forEach(fn => fn()); }); // 一些快捷键绑定 window.onkeydown = e => { From 9f6e1d748378679bb08dcc3cdacfe43e6e71db47 Mon Sep 17 00:00:00 2001 From: Efu Date: Sat, 11 May 2024 14:50:27 +0800 Subject: [PATCH 13/14] =?UTF-8?q?pref:=20=E5=8F=B3=E4=BE=A7=E6=BB=91?= =?UTF-8?q?=E6=BB=9A=E6=9D=A1=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/css/_global/index.styl | 48 +++++++++++++++++-------------- source/css/_layout/rightmenu.styl | 2 +- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/source/css/_global/index.styl b/source/css/_global/index.styl index 5089beb2..ec646b94 100644 --- a/source/css/_global/index.styl +++ b/source/css/_global/index.styl @@ -86,15 +86,38 @@ main // scrollbar - chrome/safari *::-webkit-scrollbar - width 5px - height 5px + width 12px + height 6px *::-webkit-scrollbar-thumb background var(--scrollbar-color) + opacity .5 + border-radius 8px + cursor pointer + border 2px solid var(--efu-background) + + &:hover + background var(--efu-lighttext) + display block *::-webkit-scrollbar-track background-color transparent +::-webkit-scrollbar-thumb + background var(--efu-card-border) + opacity .5 + border-radius 8px + cursor pointer + border 2px solid var(--efu-background) + +::-webkit-scrollbar-thumb:hover + background var(--efu-main) + opacity 1 + display block !important + +::-webkit-scrollbar-track + background-color var(--efu-none) + if hexo-config('lazyload.enable') && !hexo-config('lazyload.placeholder') img &[data-lazy-src]:not(.loaded) @@ -319,25 +342,6 @@ li, ul margin 0 padding 0 -::-webkit-scrollbar - width 10px - height 6px - -::-webkit-scrollbar-thumb - background var(--efu-card-border) - opacity .5 - border-radius 8px - cursor pointer - border 2px solid var(--efu-background) - -::-webkit-scrollbar-thumb:hover - background var(--efu-main) - opacity 1 - display block !important - -::-webkit-scrollbar-track - background-color var(--efu-none) - [data-theme=dark] img filter brightness(1) @@ -383,7 +387,7 @@ i.solitude +maxWidth1200() width 100% - > #post,#category,#tag,#archive + > #post, #category, #tag, #archive box-shadow var(--efu-shadow-border) padding 1rem 2rem border-radius 12px diff --git a/source/css/_layout/rightmenu.styl b/source/css/_layout/rightmenu.styl index ab61cd59..b87bf87f 100644 --- a/source/css/_layout/rightmenu.styl +++ b/source/css/_layout/rightmenu.styl @@ -23,7 +23,7 @@ if hexo-config('right_menu.enable') box-shadow var(--efu-shadow-theme) .rightMenu-group - padding .5rem .3rem + padding .35rem .3rem &.rightMenu-small display flex From 9a5795c4c4840facee1c3f82809edcbb260d7d41 Mon Sep 17 00:00:00 2001 From: Efu Date: Sat, 11 May 2024 14:52:14 +0800 Subject: [PATCH 14/14] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layout/includes/inject/head.pug | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layout/includes/inject/head.pug b/layout/includes/inject/head.pug index 2803ee9f..265a56e2 100644 --- a/layout/includes/inject/head.pug +++ b/layout/includes/inject/head.pug @@ -27,7 +27,7 @@ include ../head/pwa.pug script. console.log( - "%c Program: Hexo %c Theme: Solitude %c Version: v1.10.5", + "%c Program: Hexo %c Theme: Solitude %c Version: v1.10.6", "border-radius:5px 0 0 5px;padding: 5px 10px;color:white;background:#ff3842;", "padding: 5px 10px;color:white;background:#3e9f50;", "padding: 5px 10px;color:white;background:#0084ff;border-radius:0 5px 5px 0", diff --git a/package.json b/package.json index a5f5e1a5..1b473765 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-theme-solitude", - "version": "1.10.5", + "version": "1.10.6", "description": "A beautiful, powerful, and efficient Hexo theme developed by EverFu.", "main": "package.json", "scripts": {