]>
Commit | Line | Data |
---|---|---|
be6a4802 C |
1 | // Thanks: https://github.com/zanechua/videojs-sublime-inspired-skin |
2 | $primary-foreground-color: #fff; | |
3 | $primary-background-color: #000; | |
4 | $font-size: 13px; | |
5 | $control-bar-height: 34px; | |
aa8b6df4 | 6 | |
be6a4802 C |
7 | .video-js.vjs-peertube-skin { |
8 | font-size: $font-size; | |
9 | color: $primary-foreground-color; | |
aa8b6df4 | 10 | |
be6a4802 C |
11 | .vjs-button > .vjs-icon-placeholder::before { |
12 | line-height: $control-bar-height; | |
aa8b6df4 | 13 | } |
e14852b4 | 14 | |
be6a4802 C |
15 | .vjs-mouse-display:before, |
16 | .vjs-play-progress:before, | |
17 | .vjs-volume-level:before { | |
18 | content: ''; /* Remove Circle From Progress Bar */ | |
19 | } | |
e14852b4 | 20 | |
be6a4802 C |
21 | .vjs-audio-button { |
22 | display: none; | |
23 | } | |
e14852b4 | 24 | |
be6a4802 C |
25 | .vjs-big-play-button { |
26 | font-size: 8em; | |
e14852b4 | 27 | |
be6a4802 C |
28 | $big-play-width: 3em; |
29 | $big-play-height: 1.5em; | |
e14852b4 | 30 | |
be6a4802 C |
31 | line-height: $big-play-height; |
32 | height: $big-play-height; | |
33 | width: $big-play-width; | |
e14852b4 | 34 | |
be6a4802 C |
35 | border: 0; |
36 | border-radius: 0.3em; | |
e14852b4 | 37 | |
e14852b4 C |
38 | left: 50%; |
39 | top: 50%; | |
40 | margin-left: -($big-play-width / 2); | |
41 | margin-top: -($big-play-height / 2); | |
e14852b4 | 42 | } |
e14852b4 | 43 | |
be6a4802 | 44 | &:hover .vjs-big-play-button { |
e14852b4 | 45 | background-color: transparent; |
be6a4802 | 46 | } |
e14852b4 | 47 | |
be6a4802 C |
48 | .vjs-control-bar, |
49 | .vjs-big-play-button, | |
50 | .vjs-menu-button .vjs-menu-content { | |
51 | background-color: rgba($primary-background-color, 0.5); | |
52 | } | |
e14852b4 | 53 | |
be6a4802 | 54 | $slider-bg-color: lighten($primary-background-color, 33%); |
e14852b4 | 55 | |
be6a4802 C |
56 | .vjs-slider { |
57 | background-color: rgba(255, 255, 255, .3); | |
e14852b4 | 58 | border-radius: 2px; |
be6a4802 C |
59 | height: 5px; |
60 | } | |
e14852b4 | 61 | |
be6a4802 C |
62 | /* The slider bar color is used for the progress bar and the volume bar |
63 | (the first two can be removed after a fix that's coming) */ | |
64 | .vjs-volume-level, | |
65 | .vjs-play-progress, | |
66 | .vjs-slider-bar { | |
67 | background: $primary-foreground-color; | |
68 | } | |
e14852b4 | 69 | |
be6a4802 C |
70 | .vjs-load-progress { |
71 | background: rgba($slider-bg-color, 0.5); | |
72 | } | |
e14852b4 | 73 | |
be6a4802 C |
74 | .vjs-load-progress div { |
75 | background: rgba($slider-bg-color, 0.75); | |
76 | } | |
e14852b4 | 77 | |
be6a4802 C |
78 | .vjs-poster { |
79 | outline: none; /* Remove Blue Outline on Click*/ | |
80 | outline: 0; | |
81 | } | |
e14852b4 | 82 | |
be6a4802 C |
83 | .vjs-control-bar { |
84 | height: $control-bar-height; | |
e14852b4 | 85 | |
be6a4802 C |
86 | .vjs-progress-control { |
87 | bottom: 34px; | |
88 | width: 100%; | |
89 | position: absolute; | |
90 | height: 5px; | |
e14852b4 | 91 | |
be6a4802 C |
92 | .vjs-progress-holder { |
93 | margin: 0; | |
94 | border-radius: 0; | |
95 | } | |
96 | } | |
e14852b4 | 97 | |
be6a4802 C |
98 | .vjs-play-control { |
99 | font-size: $font-size; | |
100 | padding: 0 17px; | |
101 | margin-right: 5px; | |
102 | } | |
e14852b4 | 103 | |
be6a4802 C |
104 | .vjs-time-control { |
105 | &.vjs-current-time { | |
106 | font-size: $font-size; | |
107 | display: inline-block; | |
108 | padding: 0; | |
109 | ||
110 | .vjs-current-time-display { | |
111 | line-height: $control-bar-height; | |
112 | ||
113 | &::after { | |
114 | content: "/"; | |
115 | margin: 0 1px 0 2px; | |
116 | } | |
117 | } | |
118 | } | |
119 | ||
120 | &.vjs-duration { | |
121 | font-size: $font-size; | |
122 | display: inline-block; | |
123 | padding: 0; | |
124 | ||
125 | .vjs-duration-display { | |
126 | line-height: $control-bar-height; | |
127 | } | |
128 | } | |
129 | ||
130 | &.vjs-remaining-time { | |
131 | display: none; | |
132 | } | |
133 | } | |
e14852b4 | 134 | |
be6a4802 C |
135 | .vjs-webtorrent { |
136 | width: 100%; | |
137 | line-height: $control-bar-height; | |
138 | text-align: right; | |
139 | padding-right: 60px; | |
140 | ||
a86309b4 C |
141 | .vjs-webtorrent-displayed { |
142 | display: block; | |
143 | } | |
144 | ||
145 | .vjs-webtorrent-hidden { | |
146 | display: none; | |
147 | } | |
148 | ||
be6a4802 C |
149 | .download-speed-number, .upload-speed-number, .peers-number { |
150 | font-weight: $font-semibold; | |
151 | } | |
152 | ||
153 | .download-speed-text, .upload-speed-text, .peers-text { | |
154 | margin-right: 15px; | |
155 | } | |
156 | ||
157 | .icon { | |
158 | display: inline-block; | |
159 | width: 15px; | |
160 | height: 15px; | |
161 | background-size: contain; | |
162 | vertical-align: middle; | |
163 | background-repeat: no-repeat; | |
164 | margin-right: 6px; | |
165 | position: relative; | |
166 | top: -1px; | |
167 | ||
168 | &.icon-download { | |
169 | background-image: url('../assets/player/images/arrow-down.svg'); | |
170 | } | |
171 | ||
172 | &.icon-upload { | |
173 | background-image: url('../assets/player/images/arrow-up.svg'); | |
174 | } | |
175 | } | |
176 | } | |
e14852b4 | 177 | |
be6a4802 C |
178 | .vjs-mute-control { |
179 | .vjs-icon-placeholder { | |
180 | display: inline-block; | |
181 | width: 22px; | |
182 | height: 22px; | |
183 | vertical-align: middle; | |
184 | background: url('../assets/player/images/volume.svg') no-repeat; | |
185 | background-size: contain; | |
186 | ||
187 | &::before { | |
188 | content: ''; | |
189 | } | |
190 | } | |
191 | ||
192 | &.vjs-vol-0 .vjs-icon-placeholder { | |
193 | background: url('../assets/player/images/volume-mute.svg') no-repeat; | |
194 | background-size: contain; | |
195 | } | |
196 | } | |
e14852b4 | 197 | |
be6a4802 C |
198 | .vjs-volume-menu-button, |
199 | .vjs-volume-panel { | |
200 | width: 6em; | |
201 | position: absolute; | |
202 | right: 0; | |
203 | margin-right: 65px; | |
204 | } | |
e14852b4 | 205 | |
be6a4802 C |
206 | .vjs-volume-bar { |
207 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAcCAQAAACw95UnAAAAMElEQVRIx2NgoBL4n4YKGUYNHkEG4zJg1OCRYDCpBowaPJwMppbLRg0eNXjUYBLEAXWNUA6QNm1lAAAAAElFTkSuQmCC) no-repeat; | |
208 | background-size: 22px 14px; | |
209 | height: 100%; | |
210 | width: 100%; | |
211 | max-width: 22px; | |
212 | max-height: 14px; | |
213 | margin: 7px 4px; | |
214 | border-radius: 0; | |
215 | top: 3px; | |
216 | ||
217 | .vjs-volume-level { | |
218 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAcAQAAAAAyhWABAAAAAnRSTlMAAHaTzTgAAAAZSURBVHgBYwAB/g9EUv+JokCqiaT+U4MCAPKPS7WUUOc1AAAAAElFTkSuQmCC) no-repeat; | |
219 | background-size: 22px 14px; | |
220 | max-width: 22px; | |
221 | max-height: 14px; | |
222 | height: 100%; | |
223 | } | |
224 | } | |
e14852b4 | 225 | |
be6a4802 C |
226 | .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active, |
227 | .vjs-volume-panel.vjs-volume-panel-horizontal:active, | |
228 | .vjs-volume-panel.vjs-volume-panel-horizontal:focus, | |
229 | .vjs-volume-panel.vjs-volume-panel-horizontal:hover { | |
230 | width: 6em; | |
231 | transition-property: none; | |
232 | } | |
e14852b4 | 233 | |
be6a4802 C |
234 | .vjs-volume-panel .vjs-mute-control:hover ~ .vjs-volume-control.vjs-volume-horizontal { |
235 | width: 3em; | |
236 | height: auto; | |
237 | } | |
e14852b4 | 238 | |
be6a4802 C |
239 | .vjs-volume-panel .vjs-mute-control:hover ~ .vjs-volume-control { |
240 | transition-property: none; | |
241 | } | |
e14852b4 | 242 | |
be6a4802 C |
243 | .vjs-volume-panel { |
244 | .vjs-mute-control { | |
245 | width: 2em; | |
246 | z-index: 1; | |
247 | padding: 0; | |
248 | } | |
249 | ||
250 | .vjs-volume-control { | |
251 | display: inline-block; | |
252 | position: relative; | |
253 | left: 5px; | |
254 | opacity: 1; | |
255 | width: 3em; | |
256 | height: auto; | |
257 | } | |
258 | } | |
e14852b4 | 259 | |
be6a4802 C |
260 | .vjs-fullscreen-control { |
261 | width: 37px; | |
262 | ||
263 | .vjs-icon-placeholder { | |
264 | display: inline-block; | |
265 | width: 22px; | |
266 | height: 22px; | |
267 | vertical-align: middle; | |
268 | background: url('../assets/player/images/fullscreen.svg') no-repeat; | |
269 | background-size: contain; | |
270 | ||
271 | &::before { | |
272 | content: ''; | |
273 | } | |
274 | } | |
275 | } | |
e14852b4 | 276 | |
be6a4802 C |
277 | .vjs-menu-button-popup { |
278 | font-size: 13px; | |
279 | font-weight: $font-semibold; | |
280 | width: 42px; | |
281 | ||
282 | // Thanks: https://github.com/kmoskwiak/videojs-resolution-switcher/pull/92/files | |
283 | .vjs-resolution-button-label { | |
284 | line-height: $control-bar-height; | |
285 | position: absolute; | |
286 | top: 0; | |
287 | left: -1px; | |
288 | width: 100%; | |
289 | height: 100%; | |
290 | text-align: center; | |
291 | box-sizing: inherit; | |
292 | } | |
293 | ||
294 | .vjs-resolution-button { | |
295 | outline: 0 !important; | |
296 | } | |
297 | ||
298 | .vjs-menu { | |
299 | top: 20px; | |
300 | ||
301 | .vjs-menu-content { | |
302 | width: 4em; | |
303 | left: 50%; /* Center the menu, in it's parent */ | |
304 | margin-left: -2em; /* half of width, to center */ | |
305 | } | |
306 | ||
307 | li { | |
308 | text-transform: none; | |
309 | font-size: 13px; | |
310 | } | |
311 | } | |
312 | } | |
313 | } | |
a86309b4 C |
314 | |
315 | @media screen and (max-width: 450px) { | |
316 | .vjs-webtorrent-displayed { | |
317 | display: none !important; | |
318 | } | |
319 | } | |
e14852b4 | 320 | } |
b7a48512 C |
321 | |
322 | // Thanks: https://projects.lukehaas.me/css-loaders/ | |
323 | .vjs-loading-spinner { | |
81de1948 | 324 | margin: 0 !important; |
be6a4802 | 325 | //position: absolute; |
81de1948 C |
326 | // 15px is the nav bar height |
327 | top: calc(50% - 15px); | |
fd45e8f4 | 328 | left: 50%; |
b7a48512 | 329 | font-size: 10px; |
b7a48512 | 330 | position: relative; |
fd45e8f4 C |
331 | text-indent: -9999em; |
332 | border: 0.7em solid rgba(255, 255, 255, 0.2); | |
333 | border-left-color: #ffffff; | |
b7a48512 | 334 | transform: translateZ(0); |
fd45e8f4 | 335 | animation: spinner 1.4s infinite linear; |
b7a48512 C |
336 | |
337 | &:before { | |
b7a48512 | 338 | animation: none !important; |
b7a48512 C |
339 | } |
340 | ||
341 | &:after { | |
b7a48512 | 342 | border-radius: 50%; |
fd45e8f4 C |
343 | width: 6em; |
344 | height: 6em; | |
b7a48512 C |
345 | animation: none !important; |
346 | } | |
347 | ||
fd45e8f4 | 348 | @keyframes spinner { |
b7a48512 | 349 | 0% { |
b7a48512 C |
350 | transform: rotate(0deg); |
351 | } | |
352 | 100% { | |
b7a48512 C |
353 | transform: rotate(360deg); |
354 | } | |
355 | } | |
356 | } | |
a86309b4 | 357 |