From 68eb70a4a2c5f9c20f5d54c7d22cbe01ac741c25 Mon Sep 17 00:00:00 2001 From: festoney8 Date: Wed, 19 Jun 2024 02:56:27 +0800 Subject: [PATCH] fix: subarea popover position when hiding banner #78 --- CHANGELOG.md | 4 ++++ src/rules/channel.ts | 12 ++++++++++-- src/rules/homepage.ts | 10 +++++++++- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 443872fa..e206b4b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 3.7.2 + +- 更新:首页 隐藏banner,第一排按钮弹出菜单下置 + ## 3.7.1 - 移除:顶栏右侧稍后再看相关功能,适配网页变动 diff --git a/src/rules/channel.ts b/src/rules/channel.ts index d6fe906f..eba39033 100644 --- a/src/rules/channel.ts +++ b/src/rules/channel.ts @@ -11,7 +11,8 @@ if (isPageChannel()) { new CheckboxItem({ itemID: 'homepage-hide-banner', description: '隐藏 横幅banner', - itemCSS: `.header-banner__inner, .bili-header__banner { + itemCSS: ` + .header-banner__inner, .bili-header__banner { display: none !important; } .bili-header .bili-header__bar:not(.slide-down) { @@ -43,7 +44,14 @@ if (isPageChannel()) { } /* header高度 */ #biliMainHeader {min-height: unset !important;} - `, + /* 分区菜单 第一排按钮的二级菜单下置 */ + .v-popover.is-top {padding-top: 5px; padding-bottom: unset !important; bottom: unset !important;} + @media (min-width: 2200px) {.v-popover.is-top {top:32px;}} + @media (min-width: 1701px) and (max-width: 2199.9px) {.v-popover.is-top {top:32px;}} + @media (min-width: 1367px) and (max-width: 1700.9px) {.v-popover.is-top {top:28px;}} + @media (min-width: 1100px) and (max-width: 1366.9px) {.v-popover.is-top {top:28px;}} + @media (max-width: 1099.9px) {.v-popover.is-top {top:24px;}} + `, }), // 隐藏 全站分区栏 new CheckboxItem({ diff --git a/src/rules/homepage.ts b/src/rules/homepage.ts index b908e679..8cc686ac 100644 --- a/src/rules/homepage.ts +++ b/src/rules/homepage.ts @@ -41,7 +41,15 @@ if (isPageHomepage()) { } #i_cecream .bili-header__bar:not(.slide-down) { transition: background-color 0.3s ease-out !important; - }`, + } + /* 分区菜单 第一排按钮的二级菜单下置 */ + .v-popover.is-top {padding-top: 5px; padding-bottom: unset !important; bottom: unset !important;} + @media (min-width: 2200px) {.v-popover.is-top {top:32px;}} + @media (min-width: 1701px) and (max-width: 2199.9px) {.v-popover.is-top {top:32px;}} + @media (min-width: 1367px) and (max-width: 1700.9px) {.v-popover.is-top {top:28px;}} + @media (min-width: 1100px) and (max-width: 1366.9px) {.v-popover.is-top {top:28px;}} + @media (max-width: 1099.9px) {.v-popover.is-top {top:24px;}} + `, }), // 隐藏 大图活动轮播, 默认开启 new CheckboxItem({