Skip to content

Commit 1e57341

Browse files
authored
Black background on Duck Player (#1422)
1 parent 464da2c commit 1e57341

10 files changed

+16
-71
lines changed

special-pages/pages/duckplayer/app/components/Background.jsx

-6
This file was deleted.

special-pages/pages/duckplayer/app/components/Background.module.css

-52
This file was deleted.

special-pages/pages/duckplayer/app/components/Button.module.css

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,17 @@
99
padding: 0 20px;
1010
flex-shrink: 0;
1111
box-shadow: none;
12-
background: rgba(255, 255, 255, 0.12);
12+
background: rgba(255, 255, 255, 0.18);
1313
border-radius: var(--inner-radius);
1414
color: rgba(255, 255, 255, 1);
1515
text-decoration: none;
16+
17+
[data-layout="mobile"] & {
18+
background-color: #2f2f2f;
19+
}
1620
}
1721

22+
1823
.button:hover, .button:focus-visible {
1924
cursor: pointer;
2025
background: rgba(255, 255, 255, 0.2);

special-pages/pages/duckplayer/app/components/Components.jsx

-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { FloatingBar } from './FloatingBar.jsx';
88
import { SwitchBarMobile } from './SwitchBarMobile.jsx';
99
import { InfoBar, InfoBarContainer, InfoIcon } from './InfoBar.jsx';
1010
import { Wordmark } from './Wordmark.jsx';
11-
import { Background } from './Background.jsx';
1211
import { Player, PlayerError } from './Player.jsx';
1312
import { SettingsProvider } from '../providers/SettingsProvider.jsx';
1413
import { Settings } from '../settings.js';
@@ -25,9 +24,6 @@ export function Components() {
2524
if (!url) throw new Error('unreachable');
2625
return (
2726
<>
28-
<div data-layout="mobile">
29-
<Background />
30-
</div>
3127
<main class={styles.main}>
3228
<div class={styles.tube}>
3329
<Wordmark />

special-pages/pages/duckplayer/app/components/DesktopApp.jsx

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { h, Fragment } from 'preact';
22
import styles from './DesktopApp.module.css';
3-
import { Background } from './Background.jsx';
43
import { InfoBar, InfoBarContainer } from './InfoBar.jsx';
54
import { PlayerContainer } from './PlayerContainer.jsx';
65
import { Player, PlayerError } from './Player.jsx';
@@ -17,7 +16,6 @@ export function DesktopApp({ embed }) {
1716
const features = createAppFeaturesFrom(settings);
1817
return (
1918
<>
20-
<Background />
2119
{features.focusMode()}
2220
<main class={styles.app}>
2321
<DesktopLayout embed={embed} />

special-pages/pages/duckplayer/app/components/InfoBar.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
.container {
99
padding: 12px;
10-
background: rgba(0, 0, 0, 0.3);
10+
background: rgba(255, 255, 255, 0.12);
1111
position: relative;
1212
z-index: 1;
1313
border-bottom-left-radius: 14px;

special-pages/pages/duckplayer/app/components/MobileApp.jsx

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { h, Fragment } from 'preact';
22
import cn from 'classnames';
33
import styles from './MobileApp.module.css';
4-
import { Background } from './Background.jsx';
54
import { Player, PlayerError } from './Player.jsx';
65
import { usePlatformName, useSettings } from '../providers/SettingsProvider.jsx';
76
import { SwitchBarMobile } from './SwitchBarMobile.jsx';
@@ -25,7 +24,6 @@ export function MobileApp({ embed }) {
2524
const features = createAppFeaturesFrom(settings);
2625
return (
2726
<>
28-
<Background />
2927
{features.focusMode()}
3028
<OrientationProvider
3129
onChange={(orientation) => {

special-pages/pages/duckplayer/app/components/MobileApp.module.css

+7-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ html[data-focus-mode="on"] .hideInFocus {
2727
display: none;
2828
}
2929
.main {
30-
--bg-color: rgba(0, 0, 0, 0.3);
30+
--bg-color: #222;
3131
--logo-spacing: 185px;
3232
--gutter-width: 8px;
3333
--outer-radius: 16px;
@@ -87,6 +87,12 @@ body:has([data-state="completed"] [aria-checked="true"]) .switch {
8787
padding-bottom: 0;
8888
border-top-left-radius: var(--outer-radius);
8989
border-top-right-radius: var(--outer-radius);
90+
91+
transition: background-color .3s;
92+
93+
html[data-focus-mode="on"] & {
94+
transition: none;
95+
}
9096
}
9197

9298
.logo {

special-pages/pages/duckplayer/app/components/SwitchBarMobile.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.switchBar {
22
display: grid;
33
border-radius: 8px;
4-
background: rgba(255, 255, 255, 0.03);
4+
background: #2f2f2f;
55
padding-inline: 16px;
66
height: 100%;
77
line-height: 1.1;

special-pages/pages/duckplayer/app/index.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ html:has(body[data-display="app"]) {
99

1010
body[data-display="app"] {
1111
color: rgba(242, 242, 242, 1);
12-
background: #101010;
12+
background: #000;
1313
height: 100vh;
1414
overflow: hidden;
1515
padding: 16px;

0 commit comments

Comments
 (0)