Change dark mode icon

This commit is contained in:
the1812 2020-05-18 10:09:35 +08:00
parent 80ead257ee
commit 5dde053612
11 changed files with 50 additions and 31 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -32,14 +32,14 @@
"compact-layout.min.js": "B20609A7CBBDB1845FA0156FB5BE6B1E1A1B8B069EA85F65D16241DD2C12D738", "compact-layout.min.js": "B20609A7CBBDB1845FA0156FB5BE6B1E1A1B8B069EA85F65D16241DD2C12D738",
"custom-control-background.min.css": "1981FD2BF3B17ECF33F98D5DEDAF0D32ACBE9532A51FDB70822286991AB98EF3", "custom-control-background.min.css": "1981FD2BF3B17ECF33F98D5DEDAF0D32ACBE9532A51FDB70822286991AB98EF3",
"custom-control-background.min.js": "B9F366B251D1572ACE801FF6ECF15D4D1AAB3EA5A5B04B961B6F4310E2AB1A84", "custom-control-background.min.js": "B9F366B251D1572ACE801FF6ECF15D4D1AAB3EA5A5B04B961B6F4310E2AB1A84",
"custom-navbar.min.css": "FFA9C1FBF1889F0C7CD73B9C74952D7F3324AFC0F8669EF1E339EBAEF6F37CFD", "custom-navbar.min.css": "9A928621375DCBCB93199AEA82E1A5EA58C2C0D25BF36BC26620F0CC91E227ED",
"custom-navbar.min.html": "269CEAA9877456B824BC17D4FA4FC62CBFE767EF14715DD0E75443185DFD032C", "custom-navbar.min.html": "269CEAA9877456B824BC17D4FA4FC62CBFE767EF14715DD0E75443185DFD032C",
"custom-navbar.min.js": "9C703E332EB075D72FE0718C8D50B818F90F9144880CEEADC1086E7FCB83A1E0", "custom-navbar.min.js": "476D95799DBA91F536DE78C749389F9658E9CEC394A2ACF32CC4C00B3CC0D94C",
"custom-navbar-activities.min.js": "802226FE2C24D56379A6EAD13D3697A4D5A46109D0C63EDACAE8E667ED267EA1", "custom-navbar-activities.min.js": "802226FE2C24D56379A6EAD13D3697A4D5A46109D0C63EDACAE8E667ED267EA1",
"custom-navbar-blank.min.js": "DC2B75D5760EECD3A257785FDFBB7E5DEBF61CD9083C68DD5BCE468B093F54F3", "custom-navbar-blank.min.js": "DC2B75D5760EECD3A257785FDFBB7E5DEBF61CD9083C68DD5BCE468B093F54F3",
"custom-navbar-category.min.js": "CBD31D61E11985A03CC690BFB65082543AF63817D74398555786927445EB19D5", "custom-navbar-category.min.js": "CBD31D61E11985A03CC690BFB65082543AF63817D74398555786927445EB19D5",
"custom-navbar-component.min.js": "1E19E02F7BFCC3397C14907EC8390F03522E128B528CB82412F202BAF57C28E9", "custom-navbar-component.min.js": "1E19E02F7BFCC3397C14907EC8390F03522E128B528CB82412F202BAF57C28E9",
"custom-navbar-dark-mode.min.js": "707998148D2B9449EA2FBBC131F1DC2B30360184E70619AF3E31B1E93E399FEC", "custom-navbar-dark-mode.min.js": "1B7D0C6F13401731BDABC63253E22B58EBB85DEE8FC125E7FC97DD5FFACCF073",
"custom-navbar-favorites-list.min.js": "1A4DE7241209A663C4FC0F2811B401515C5FC652BB9F13AE0569253D51097024", "custom-navbar-favorites-list.min.js": "1A4DE7241209A663C4FC0F2811B401515C5FC652BB9F13AE0569253D51097024",
"custom-navbar-history-list.min.js": "E58A6B853AFEFCAE9868711D6E637C4264B5C9D0C76DBD180E9EA55D1876FFFA", "custom-navbar-history-list.min.js": "E58A6B853AFEFCAE9868711D6E637C4264B5C9D0C76DBD180E9EA55D1876FFFA",
"custom-navbar-iframe.min.js": "DBE5844C2AA36057DBD33BBC5724D7D7F881AB15EC45A80228961942CD810A32", "custom-navbar-iframe.min.js": "DBE5844C2AA36057DBD33BBC5724D7D7F881AB15EC45A80228961942CD810A32",
@ -55,11 +55,12 @@
"custom-navbar-watchlater-list.min.js": "57EA2C62F7442750BB177B9898CF07BA61C45F0FD99737516ED609051699B054", "custom-navbar-watchlater-list.min.js": "57EA2C62F7442750BB177B9898CF07BA61C45F0FD99737516ED609051699B054",
"danmaku-converter.min.js": "6C844406F060DCF2483F9CC4C7329911ED77BC77097F2BC5B925B6F12C990820", "danmaku-converter.min.js": "6C844406F060DCF2483F9CC4C7329911ED77BC77097F2BC5B925B6F12C990820",
"dark.min.css": "232E370441B12CC3DAFE8AEBB25C32CE7B00CCC807F54D4CD9488770FD67B1AC", "dark.min.css": "232E370441B12CC3DAFE8AEBB25C32CE7B00CCC807F54D4CD9488770FD67B1AC",
"dark.user.css": "0058BB6D1A9F84714B3A89939E73900D1F74C9D5371E54605029088C851204D2", "dark.user.css": "CF75B3278EE0D5396BC56B2581CCACFE4F1FFC8E43A07AC5EFE10A33E883278B",
"dark-color-scheme.min.js": "6D353AC738180317ACF9D2E046BFFBA0ACC0FA7A8D22B8E16C51127CDE4FE96B", "dark-color-scheme.min.js": "6D353AC738180317ACF9D2E046BFFBA0ACC0FA7A8D22B8E16C51127CDE4FE96B",
"dark-important.min.css": "5369385A2C16188FB11E71C4C5B91275646F22F0F09E518E37813CC4FA23A072", "dark-important.min.css": "5369385A2C16188FB11E71C4C5B91275646F22F0F09E518E37813CC4FA23A072",
"dark-navbar.min.css": "7FAD547E326B768904B3739C978DF86FFDDD5E5064FB8F490710D197CCC3018B", "dark-navbar.min.css": "7FAD547E326B768904B3739C978DF86FFDDD5E5064FB8F490710D197CCC3018B",
"dark-schedule.min.js": "853C446547603F4F0425F19F09F73335C9EC451A790C1C07E5E5B88A09E9B453", "dark-schedule.min.js": "853C446547603F4F0425F19F09F73335C9EC451A790C1C07E5E5B88A09E9B453",
"dark-slice-12.min.css": "BDDCBDAA8CF2F320C1D36496EE6B54BE9F9C1DC19196D9AD104F9875320DE1DF",
"dark-styles.min.js": "74E6D655F88E50A27D60F189554F6656CCD2A6EA2686FD9946CA9A89EABF7719", "dark-styles.min.js": "74E6D655F88E50A27D60F189554F6656CCD2A6EA2686FD9946CA9A89EABF7719",
"debounce.min.js": "54D33E1273C1F3FE19550BF1844339C3D54D6B01DF8A39C3162D95B93B079CFA", "debounce.min.js": "54D33E1273C1F3FE19550BF1844339C3D54D6B01DF8A39C3162D95B93B079CFA",
"default-danmaku-settings.min.css": "D9942B184FEDA7B08CFA0C34920E97D7A83B81762DCBF757642EBB60F95FF25D", "default-danmaku-settings.min.css": "D9942B184FEDA7B08CFA0C34920E97D7A83B81762DCBF757642EBB60F95FF25D",

Binary file not shown.

View File

@ -1 +1 @@
(()=>{return(e,t)=>{const{NavbarComponent:i}=t.import("custom-navbar-component");class s extends i{constructor(){super();this.touch=false;this.href="javascript:(bilibiliEvolved.settings.useDarkStyle = !bilibiliEvolved.settings.useDarkStyle)";addSettingsListener("useDarkStyle",e=>{if(e){this.html=`<i style="font-size: 20px; line-height: 1;" class="mdi mdi-weather-sunny"></i>`}else{this.html=`<i style="font-size: 18px; line-height: 1; margin: 0 1px;" class="mdi mdi-weather-night"></i>`}},true)}get name(){return"darkMode"}}return{export:{DarkMode:s}}}})(); (()=>{return(e,s)=>{const{NavbarComponent:c}=s.import("custom-navbar-component");class t extends c{constructor(){super();this.touch=false;this.href="javascript:(bilibiliEvolved.settings.useDarkStyle = !bilibiliEvolved.settings.useDarkStyle)";addSettingsListener("useDarkStyle",e=>{if(e){this.html=`<svg style="width: 18px" class="stroke" id="a20ed59c-32d2-4769-954f-0602e97eedf8" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 47.96 47.96"><defs><style>.a364c9a4-cc27-4243-b763-ad92ece952af{stroke-linejoin:round;}.a364c9a4-cc27-4243-b763-ad92ece952af,.ac139620-7190-48fc-8944-d99840bf36f7{stroke-linecap:round;stroke-width:4px;}.ac139620-7190-48fc-8944-d99840bf36f7{stroke-miterlimit:10;}</style></defs><circle class="a364c9a4-cc27-4243-b763-ad92ece952af" cx="23.96" cy="24" r="10"/><line class="ac139620-7190-48fc-8944-d99840bf36f7" x1="23.96" y1="4" x2="23.96" y2="7"/><line class="ac139620-7190-48fc-8944-d99840bf36f7" x1="38.11" y1="9.86" x2="35.98" y2="11.98"/><line class="ac139620-7190-48fc-8944-d99840bf36f7" x1="43.96" y1="24" x2="40.96" y2="24"/><line class="ac139620-7190-48fc-8944-d99840bf36f7" x1="38.11" y1="38.14" x2="35.98" y2="36.02"/><line class="ac139620-7190-48fc-8944-d99840bf36f7" x1="23.96" y1="44" x2="23.96" y2="41"/><line class="ac139620-7190-48fc-8944-d99840bf36f7" x1="9.82" y1="38.14" x2="11.94" y2="36.02"/><line class="ac139620-7190-48fc-8944-d99840bf36f7" x1="3.96" y1="24" x2="6.96" y2="24"/><line class="ac139620-7190-48fc-8944-d99840bf36f7" x1="9.82" y1="9.86" x2="11.94" y2="11.98"/></svg>`}else{this.html=`<svg style="width: 18px" class="stroke" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><defs><style>.e1c42ff5-d2fc-4816-897c-4f24c16cbb01{stroke-linecap:round;stroke-linejoin:round;stroke-width:4px;}</style></defs><path class="e1c42ff5-d2fc-4816-897c-4f24c16cbb01" d="M30.32,31A13.32,13.32,0,0,1,22.37,7,16.66,16.66,0,1,0,41,25.63,13.29,13.29,0,0,1,30.32,31Z"/></svg>`}},true)}get name(){return"darkMode"}}return{export:{DarkMode:t}}}})();

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@
@namespace Bilibili-Evolved @namespace Bilibili-Evolved
@homepageURL https://github.com/the1812/Bilibili-Evolved @homepageURL https://github.com/the1812/Bilibili-Evolved
@updateURL https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/min/dark.user.css @updateURL https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/min/dark.user.css
@version 671.08.0 @version 671.76.0
@license MIT @license MIT
@author Grant Howard (https://github.com/the1812), Coulomb-G (https://github.com/Coulomb-G) @author Grant Howard (https://github.com/the1812), Coulomb-G (https://github.com/Coulomb-G)
==/UserStyle== */ ==/UserStyle== */

View File

@ -203,8 +203,22 @@ li.nav-item[report-id="playpage_dynamic"] .i-frame,
path { path {
fill: var(--navbar-foreground); fill: var(--navbar-foreground);
} }
svg.stroke {
&,
path {
fill: transparent;
stroke: var(--navbar-foreground);
}
}
&.fill:not(.transparent) path { &.fill:not(.transparent) path {
fill: var(--foreground-color-d); fill: var(--foreground-color-d);
svg.stroke {
&,
path {
fill: transparent;
stroke: var(--navbar-foreground-d);
}
}
} }
&.shadow:not(.transparent) { &.shadow:not(.transparent) {
box-shadow: #0002 0 1px 10px 1px; box-shadow: #0002 0 1px 10px 1px;

View File

@ -6,9 +6,9 @@ export class DarkMode extends NavbarComponent {
this.href = 'javascript:(bilibiliEvolved.settings.useDarkStyle = !bilibiliEvolved.settings.useDarkStyle)' this.href = 'javascript:(bilibiliEvolved.settings.useDarkStyle = !bilibiliEvolved.settings.useDarkStyle)'
addSettingsListener('useDarkStyle', value => { addSettingsListener('useDarkStyle', value => {
if (value) { if (value) {
this.html = /*html*/`<i style="font-size: 20px; line-height: 1;" class="mdi mdi-weather-sunny"></i>` this.html = /*html*/`<svg style="width: 18px" class="stroke" id="a20ed59c-32d2-4769-954f-0602e97eedf8" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 47.96 47.96"><defs><style>.a364c9a4-cc27-4243-b763-ad92ece952af{stroke-linejoin:round;}.a364c9a4-cc27-4243-b763-ad92ece952af,.ac139620-7190-48fc-8944-d99840bf36f7{stroke-linecap:round;stroke-width:4px;}.ac139620-7190-48fc-8944-d99840bf36f7{stroke-miterlimit:10;}</style></defs><circle class="a364c9a4-cc27-4243-b763-ad92ece952af" cx="23.96" cy="24" r="10"/><line class="ac139620-7190-48fc-8944-d99840bf36f7" x1="23.96" y1="4" x2="23.96" y2="7"/><line class="ac139620-7190-48fc-8944-d99840bf36f7" x1="38.11" y1="9.86" x2="35.98" y2="11.98"/><line class="ac139620-7190-48fc-8944-d99840bf36f7" x1="43.96" y1="24" x2="40.96" y2="24"/><line class="ac139620-7190-48fc-8944-d99840bf36f7" x1="38.11" y1="38.14" x2="35.98" y2="36.02"/><line class="ac139620-7190-48fc-8944-d99840bf36f7" x1="23.96" y1="44" x2="23.96" y2="41"/><line class="ac139620-7190-48fc-8944-d99840bf36f7" x1="9.82" y1="38.14" x2="11.94" y2="36.02"/><line class="ac139620-7190-48fc-8944-d99840bf36f7" x1="3.96" y1="24" x2="6.96" y2="24"/><line class="ac139620-7190-48fc-8944-d99840bf36f7" x1="9.82" y1="9.86" x2="11.94" y2="11.98"/></svg>`
} else { } else {
this.html = /*html*/`<i style="font-size: 18px; line-height: 1; margin: 0 1px;" class="mdi mdi-weather-night"></i>` this.html = /*html*/`<svg style="width: 18px" class="stroke" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><defs><style>.e1c42ff5-d2fc-4816-897c-4f24c16cbb01{stroke-linecap:round;stroke-linejoin:round;stroke-width:4px;}</style></defs><path class="e1c42ff5-d2fc-4816-897c-4f24c16cbb01" d="M30.32,31A13.32,13.32,0,0,1,22.37,7,16.66,16.66,0,1,0,41,25.63,13.29,13.29,0,0,1,30.32,31Z"/></svg>`
} }
}, true) }, true)
} }