From 2d56a757ecf08ea86652bc09746a8bfd23c32dfa Mon Sep 17 00:00:00 2001 From: Hakadao Date: Sun, 24 Sep 2023 01:12:44 +0800 Subject: [PATCH] feat: adopt the anime video page styles --- src/contentScripts/index.ts | 2 + src/contentScripts/views/App.vue | 2 + src/styles/adaptedStyles/animeVideoPage.scss | 83 ++++++++++++++++++++ src/styles/adaptedStyles/index.ts | 1 + 4 files changed, 88 insertions(+) create mode 100644 src/styles/adaptedStyles/animeVideoPage.scss diff --git a/src/contentScripts/index.ts b/src/contentScripts/index.ts index 2959fedc..2bb83f58 100644 --- a/src/contentScripts/index.ts +++ b/src/contentScripts/index.ts @@ -91,6 +91,8 @@ function injectApp() { // video page || /https?:\/\/(www.)?bilibili.com\/video\/.*/.test(currentUrl) + // anime video page + || /https?:\/\/(www.)?bilibili.com\/bangumi\/play\/ss.*/.test(currentUrl) // watch later playlist || /https?:\/\/(www.)?bilibili.com\/list\/watchlater.*/.test(currentUrl) // favorite playlist diff --git a/src/contentScripts/views/App.vue b/src/contentScripts/views/App.vue index ed691578..6f578f75 100644 --- a/src/contentScripts/views/App.vue +++ b/src/contentScripts/views/App.vue @@ -83,6 +83,8 @@ const isTopbarFixed = computed(() => { // || /https?:\/\/search.bilibili.com\/.*$/.test(location.href) // video page || /https?:\/\/(www.)?bilibili.com\/video\/.*/.test(location.href) + // anime video page + || /https?:\/\/(www.)?bilibili.com\/bangumi\/play\/ss.*/.test(location.href) // moment page || /https?:\/\/t.bilibili.com.*/.test(location.href) ) diff --git a/src/styles/adaptedStyles/animeVideoPage.scss b/src/styles/adaptedStyles/animeVideoPage.scss new file mode 100644 index 00000000..123a4065 --- /dev/null +++ b/src/styles/adaptedStyles/animeVideoPage.scss @@ -0,0 +1,83 @@ +.numberListItem_number_list_item__wszA4.numberListItem_select__ar1X5, +.follow_btnFollow__OFY3n, +.vipPaybar_textWrap__xXqVi { + background-color: var(--bew-theme-color); +} + +.numberListItem_badge__TV05g { + background-color: var(--bew-theme-color) !important; +} + +.mediainfo_mediaToolbar__uEabN .mediainfo_btnHome__ci38K { + background-color: var(--bew-theme-color-10); +} + +.mediainfo_mediaToolbar__uEabN .mediainfo_btnHome__ci38K, +.mediainfo_mediaRight__jv5hq + .mediainfo_media_desc_section__bOFBw + .mediainfo_display_area__CEKfP + .mediainfo_ellipsis__xCKNd { + color: var(--bew-theme-color); +} + +.RecommendItem_wrap__pJmXL + .RecommendItem_right_wrap__rgzw_ + .RecommendItem_title__zyQj0:hover { + color: var(--bew-theme-color) !important; +} + +.mediainfo_mediaToolbar__uEabN .mediainfo_btnHome__ci38K svg path { + fill: var(--bew-theme-color); +} + +.mediainfo_mediaInfo__Cpow4, +.recommend_wrap__pgu8c { + border-color: var(--bew-border-color); +} + +.dark { + .home-container .main-container, + .mediainfo_mediaRight__jv5hq .mediainfo_media_desc__F5lLq i { + background-color: var(--bew-bg); + } + + .eplist_ep_list_wrapper__PzLHa, + .eplist_ep_list_wrapper__PzLHa { + background-color: var(--bew-content-solid-1); + } + + .numberListItem_number_list_item__wszA4 { + --bg1: var(--bew-fill-1); + } + + .mediainfo_mediaRight__jv5hq + .mediainfo_media_desc_section__bOFBw + .mediainfo_display_area__CEKfP + .mediainfo_ellipsis__xCKNd { + background: linear-gradient( + 90deg, + hsla(0, 0%, 100%, 0), + var(--bew-bg) 20%, + var(--bew-bg) + ); + } + + .special.wide .main-container { + background-color: unset; + } + + .numberListItem_title__ukPv0, + .recommend_wrap__pgu8c .recommend_title__miCR4, + .RecommendItem_wrap__pJmXL + .RecommendItem_right_wrap__rgzw_ + .RecommendItem_title__zyQj0 { + color: var(--bew-text-1); + } + + .RecommendItem_wrap__pJmXL + .RecommendItem_right_wrap__rgzw_ + .RecommendItem_sub_wrap__s1pfm + .RecommendItem_showindex__KMdzi { + color: var(--bew-text-2); + } +} diff --git a/src/styles/adaptedStyles/index.ts b/src/styles/adaptedStyles/index.ts index 796e1927..58c0e63d 100644 --- a/src/styles/adaptedStyles/index.ts +++ b/src/styles/adaptedStyles/index.ts @@ -6,6 +6,7 @@ import './btn.scss' import './userCard.scss' import './searchPage.scss' import './videoPage.scss' +import './animeVideoPage.scss' import './momentsPage.scss' import './historyPage.scss' import './userSpacePage.scss'