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'}