From 5cd53154fd65b542fccb5ece18a7ae4f31f79d42 Mon Sep 17 00:00:00 2001 From: seaHi Date: Sun, 16 Aug 2026 21:23:26 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BD=BF=E7=94=A8=20SVG=20?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E6=9B=BF=E6=8D=A2=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E6=8C=89=E9=92=AE=E7=9A=84=E7=BA=AF=20CSS=20?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.css | 41 ++++++--------------------------------- src/routes/+layout.svelte | 36 ++++++++++++++++++++++++++++++---- 2 files changed, 38 insertions(+), 39 deletions(-) diff --git a/src/app.css b/src/app.css index aed1d0e..a9d8b82 100644 --- a/src/app.css +++ b/src/app.css @@ -253,28 +253,7 @@ a:hover { cursor: pointer; padding: 10px; z-index: 1100; -} - -.mobile-menu-btn span { - display: block; - width: 25px; - height: 3px; - background-color: var(--header-text); - margin: 5px 0; - transition: all 0.3s; - border-radius: 2px; -} - -.mobile-menu-btn.open span:nth-child(1) { - transform: rotate(45deg) translate(5px, 6px); -} - -.mobile-menu-btn.open span:nth-child(2) { - opacity: 0; -} - -.mobile-menu-btn.open span:nth-child(3) { - transform: rotate(-45deg) translate(5.5px, -6.5px); + color: var(--header-text); } @media screen and (max-width: 767px) { @@ -293,11 +272,11 @@ a:hover { top: 58px; left: 0; width: 100%; - height: 0; + max-height: 0; overflow: hidden; flex-direction: column; background-color: var(--header-bg); - transition: height 0.3s ease; + transition: max-height 0.3s ease; justify-content: flex-start; } @supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) { @@ -308,8 +287,9 @@ a:hover { } } .header nav.open { - height: calc(100vh - 58px); + max-height: 400px; overflow-y: auto; + padding-bottom: 10px; } .header nav a, .header nav .nav-dropdown-trigger { @@ -1285,7 +1265,7 @@ footer section p:first-child { bottom: 0; left: 0; right: 0; - background: rgba(255, 255, 255, 0.85); + background: rgba(0, 0, 0, 0.4); z-index: 3; opacity: 0; visibility: hidden; @@ -1486,15 +1466,6 @@ footer section p:first-child { } } -/* 移动端默认不显示目录 */ -@media screen and (max-width: 767px) { - #toggle-toc, - .TOC, - .toc-mask { - display: none !important; - } -} - /* Tags Styling (VOID style) */ .tags { margin: 1.5rem 0; diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 103c32d..3f581bb 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -64,13 +64,41 @@ >{$page.data.site?.title || 'BlogFlare'}