Skip to content

Commit eaea2c5

Browse files
author
Shane Osbourne
committed
Added initial duckplayer page without refactor
1 parent a7e8f0f commit eaea2c5

File tree

14 files changed

+1133
-0
lines changed

14 files changed

+1133
-0
lines changed

packages/special-pages/pages/duckplayer/.gitignore

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 15 additions & 0 deletions
Loading
Lines changed: 8 additions & 0 deletions
Loading
Lines changed: 12 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading
Loading
Lines changed: 248 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,248 @@
1+
:root {
2+
--aspect-ratio: calc(9 / 16);
3+
--toolbar-height: 56px;
4+
5+
/* Set video to take up 80vw width */
6+
--video-width: 80vw;
7+
8+
/* Calculate video height based on aspect ratio, but never exceed 80vh
9+
* for the video height, for example when using short, wide screens.
10+
*/
11+
--video-height: min(calc(var(--video-width) * var(--aspect-ratio)), 80vh);
12+
}
13+
14+
@media screen and (max-width: 1080px) {
15+
:root {
16+
--video-width: 85vw;
17+
}
18+
}
19+
20+
@media screen and (max-width: 740px) {
21+
:root {
22+
--video-width: 90vw;
23+
}
24+
}
25+
26+
.bg {
27+
background: url('img/player-bg.png');
28+
}
29+
30+
.bg {
31+
position: fixed;
32+
top: 0;
33+
bottom: 0;
34+
left: 0;
35+
right: 0;
36+
background-size: cover;
37+
opacity: 0.6;
38+
}
39+
40+
.bg::after {
41+
content: '';
42+
position: absolute;
43+
left: 0;
44+
right: 0;
45+
top: -50%;
46+
height: 100%;
47+
background: linear-gradient(0deg, rgba(0, 0, 0, 0), #101010 70%);
48+
transition: all 1s ease-out;
49+
}
50+
51+
body.faded .bg::after {
52+
top: 30%;
53+
}
54+
55+
body {
56+
color: rgba(255, 255, 255, 0.85);
57+
font-family: system-ui;
58+
font-size: 13px;
59+
line-height: 16px;
60+
letter-spacing: -0.08px;
61+
margin: 0;
62+
background: #101010;
63+
64+
/* Make it feel more like something native */
65+
-webkit-user-select: none;
66+
cursor: default;
67+
}
68+
69+
.player-container {
70+
overflow: hidden;
71+
z-index: 10;
72+
position: relative;
73+
background: black;
74+
}
75+
76+
.player-container,
77+
#player {
78+
width: var(--video-width);
79+
height: var(--video-height);
80+
max-width: 3840px;
81+
}
82+
83+
.player-error {
84+
text-align: center;
85+
line-height: var(--video-height);
86+
background: #2f2f2f;
87+
}
88+
89+
.content-hover {
90+
--content-padding: 1px;
91+
padding: var(--content-padding);
92+
width: var(--video-width);
93+
94+
/* Set margin left to be half of the remaining vw - video width */
95+
margin-left: calc(((100vw - var(--video-width)) / 2) - var(--content-padding));
96+
97+
/* Set margin-top to be half of the remaaining vh - video and toolbar height, but never less than 0px. */
98+
margin-top: max(0px, calc((100vh - (var(--video-height) + var(--toolbar-height))) / 2));
99+
position: absolute;
100+
}
101+
102+
.toolbar {
103+
background: rgba(0, 0, 0, 0.3);
104+
border-radius: 0px 0px 12px 12px;
105+
transition: all 0.5s linear;
106+
opacity: 1;
107+
margin-top: -12px;
108+
padding: 12px;
109+
padding-top: 24px;
110+
height: 32px;
111+
}
112+
113+
body.faded .toolbar {
114+
opacity: 0;
115+
margin-top: -80px;
116+
}
117+
118+
.logo {
119+
float: left;
120+
font-style: normal;
121+
font-weight: 600;
122+
color: #ffffff;
123+
margin-top: 4px;
124+
}
125+
126+
.dax-icon {
127+
margin-bottom: -7px;
128+
margin-right: 5px;
129+
}
130+
131+
.info-icon-container {
132+
position: relative;
133+
display: inline-block;
134+
margin-left: 4px;
135+
}
136+
137+
.info-icon {
138+
margin-bottom: -4px;
139+
}
140+
141+
.info-icon:hover path {
142+
fill: rgba(255, 255, 255, 0.8);
143+
}
144+
145+
.info-icon-tooltip {
146+
position: absolute;
147+
background: linear-gradient(0deg, rgba(48, 48, 48, 0.35), rgba(48, 48, 48, 0.35)), rgba(33, 33, 33, 0.55);
148+
background-blend-mode: normal, luminosity;
149+
box-shadow: inset 0px 0px 1px #ffffff;
150+
filter: drop-shadow(0px 0px 1px #000000) drop-shadow(0px 0px 1px #000000) drop-shadow(0px 0px 1px #000000)
151+
drop-shadow(0px 8px 16px rgba(0, 0, 0, 0.2));
152+
backdrop-filter: blur(76px);
153+
border-radius: 10px;
154+
width: 300px;
155+
font-weight: normal;
156+
padding: 12px;
157+
left: -162px;
158+
top: 32px;
159+
display: none;
160+
}
161+
162+
.info-icon-tooltip::after {
163+
content: '';
164+
width: 15px;
165+
height: 15px;
166+
border: 1px solid #5f5f5f;
167+
display: block;
168+
position: absolute;
169+
top: -8px;
170+
border-right: none;
171+
border-bottom: none;
172+
transform: rotate(45deg);
173+
background: #1d1d1d;
174+
left: 162px;
175+
}
176+
177+
.info-icon-tooltip.above {
178+
top: -105px;
179+
z-index: 50;
180+
}
181+
182+
.info-icon-tooltip.above::after {
183+
top: 80px;
184+
transform: rotate(225deg);
185+
}
186+
187+
.info-icon-tooltip.visible {
188+
display: block;
189+
}
190+
191+
.options {
192+
float: right;
193+
}
194+
195+
.setting-container {
196+
position: absolute;
197+
right: 207px;
198+
overflow: hidden;
199+
white-space: nowrap;
200+
margin: 8px;
201+
margin-right: 0;
202+
width: 299px;
203+
}
204+
205+
.setting-container.animatable {
206+
transition: 0.3s linear all;
207+
}
208+
209+
.setting-container.invisible {
210+
width: 0px;
211+
}
212+
213+
@media screen and (max-width: 760px) {
214+
.setting-container {
215+
width: calc(var(--video-width) - 370px);
216+
margin-right: 8px;
217+
text-overflow: ellipsis;
218+
}
219+
}
220+
221+
.settings-checkbox {
222+
margin-top: 2px;
223+
margin-right: 4px;
224+
width: 14px;
225+
height: 14px;
226+
}
227+
228+
.options-button {
229+
height: 16px;
230+
padding: 8px;
231+
background: rgba(255, 255, 255, 0.18);
232+
border-radius: 8px;
233+
float: left;
234+
color: white;
235+
text-decoration: none;
236+
margin-left: 8px;
237+
font-weight: bold;
238+
text-align: center;
239+
}
240+
241+
.options-button:hover,
242+
.options-button.active {
243+
background: rgba(255, 255, 255, 0.28);
244+
}
245+
246+
.play-on-youtube img {
247+
margin-bottom: -3px;
248+
}

0 commit comments

Comments
 (0)