refactor: use --bew-top-bar-height to set the bewly top bar height

This commit is contained in:
hakadao
2024-06-16 18:35:07 +08:00
parent 36f6bd55fd
commit f1de0d5bfa
3 changed files with 10 additions and 4 deletions

View File

@@ -386,8 +386,10 @@ defineExpose({
:class="{ hide: hideTopBar }"
>
<main
max-w="$bew-page-max-width" m-auto flex="~ justify-between items-center gap-4"
p="lg:x-20 md:x-16 x-14" h="70px"
max-w="$bew-page-max-width"
flex="~ justify-between items-center gap-4"
p="lg:x-20 md:x-16 x-14" m-auto
h="$bew-top-bar-height"
>
<!-- Top bar mask -->
<div

View File

@@ -107,13 +107,15 @@ if (settings.value.adaptToOtherPageStyles && isHomePage()) {
}
if (isSupportedPages()) {
// remove the original top bar
// remove the original top bar and adjust the height of the top bar to match the bewly top bar
injectCSS(`
.bili-header .bili-header__bar,
#internationalHeader,
.link-navbar,
#home_nav {
#home_nav,
#biliMainHeader {
visibility: hidden;
height: var(--bew-top-bar-height) !important;
}
`)
}

View File

@@ -4,6 +4,8 @@
--bew-radius: 12px;
--bew-radius-half: calc(var(--bew-radius) / 2);
--bew-top-bar-height: 70px;
--bew-filter-glass-1: blur(20px) saturate(180%);
--bew-filter-glass-2: blur(40px) saturate(180%);
--bew-filter-icon-glow: saturate(0) brightness(2) drop-shadow(0 0 0.2px white)