]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/player/peertube-skin.scss
Replace "overview" by "discover" in client titles
[github/Chocobozzz/PeerTube.git] / client / src / sass / player / peertube-skin.scss
CommitLineData
3ec8dc09
C
1@import '_variables';
2@import '_mixins';
2a19a1e4 3@import './_player-variables';
3ec8dc09 4
864e782b
C
5@mixin big-play-button-triangle-size($triangle-size) {
6 width: $triangle-size;
7 height: $triangle-size;
8 top: calc(50% - #{$triangle-size / 2});
9 left: calc(53% - #{($triangle-size / 2)});
10}
11
be6a4802
C
12.video-js.vjs-peertube-skin {
13 font-size: $font-size;
5efab546 14 color: var(--embedForegroundColor);
aa8b6df4 15
22b59e80
C
16 .vjs-dock-text {
17 padding-right: 10px;
18 }
19
20 .vjs-dock-description {
21 font-size: 11px;
22
31b6ddf8 23 .text::before {
22b59e80
C
24 margin-right: 4px;
25 }
26
31b6ddf8 27 .text::after {
22b59e80
C
28 margin-left: 4px;
29 transform: scale(-1, 1);
30 }
31 }
32
be6a4802
C
33 .vjs-button > .vjs-icon-placeholder::before {
34 line-height: $control-bar-height;
aa8b6df4 35 }
e14852b4 36
c6352f2c 37 .vjs-volume-level::before {
be6a4802
C
38 content: ''; /* Remove Circle From Progress Bar */
39 }
e14852b4 40
be6a4802
C
41 .vjs-audio-button {
42 display: none;
43 }
e14852b4 44
be6a4802 45 .vjs-big-play-button {
9e6b41cc 46 outline: 0;
07fa4c97 47 font-size: 6em;
e14852b4 48
33d78552
C
49 $big-play-width: 1.2em;
50 $big-play-height: 1.2em;
e14852b4 51
e0812403 52 border: 4px solid #fff;
33d78552 53 border-radius: 100%;
e14852b4 54
e14852b4
C
55 left: 50%;
56 top: 50%;
8cac1b64
C
57 width: $big-play-width;
58 height: $big-play-height;
59 line-height: $big-play-height;
e14852b4
C
60 margin-left: -($big-play-width / 2);
61 margin-top: -($big-play-height / 2);
864e782b 62 transition: 0.4s opacity;
adcaf1a8
C
63
64 &::-moz-focus-inner {
65 border: 0;
66 padding: 0
67 }
80d1057b
C
68
69 .vjs-icon-placeholder::before {
864e782b
C
70 @include big-play-button-triangle-size(45px);
71
72 content: '';
2a19a1e4 73 background-image: url('#{$assets-path}/player/images/big-play-button.svg');
80d1057b
C
74 }
75
8cac1b64 76 &:hover {
33d78552 77 opacity: 0.8;
80d1057b 78 }
be6a4802 79 }
e14852b4 80
864e782b
C
81 // Small effect when we click on the play button
82 &.vjs-has-big-play-button-clicked {
33d78552 83
864e782b
C
84 .vjs-big-play-button, .vjs-poster {
85 display: block;
86 visibility: hidden;
33d78552 87
864e782b 88 &.vjs-big-play-button, &.vjs-big-play-button::before {
33d78552 89 opacity: 0;
864e782b 90 transition: visibility 0.2s, opacity 0.2s;
33d78552 91 }
864e782b
C
92
93 &.vjs-poster, &.vjs-poster::before {
94 opacity: 0;
95 transition: visibility 0.3s, opacity 0.3s;
96 transition-delay: 0.05s;
33d78552
C
97 }
98 }
8fa5653a
C
99 }
100
e6f62797
C
101 // Hide the big play button on autoplay
102 &.vjs-has-autoplay {
103 .vjs-big-play-button {
104 display: none !important;
105 }
106 }
107
be6a4802
C
108 .vjs-control-bar,
109 .vjs-big-play-button,
c6352f2c 110 .vjs-settings-dialog {
5efab546 111 background-color: var(--embedBigPlayBackgroundColor);
be6a4802 112 }
e14852b4 113
be6a4802
C
114 .vjs-poster {
115 outline: none; /* Remove Blue Outline on Click*/
116 outline: 0;
117 }
e14852b4 118
be6a4802
C
119 .vjs-control-bar {
120 height: $control-bar-height;
fc16f981
C
121 background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6));
122 box-shadow: 0 -15px 40px 10px rgba(0, 0, 0, 0.2);
0aabe3f6 123 text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
e14852b4 124
6b9af129
C
125 .vjs-progress-control,
126 .vjs-play-control,
127 .vjs-playback-rate,
128 .vjs-mute-control,
129 .vjs-volume-control,
130 .vjs-resolution-control,
c6352f2c
C
131 .vjs-fullscreen-control,
132 .vjs-peertube-link,
054a103b 133 .vjs-theater-control,
c6352f2c 134 .vjs-settings
6b9af129 135 {
5efab546
C
136 color: var(--embedForegroundColor) !important;
137
6b9af129
C
138 opacity: $primary-foreground-opacity;
139 transition: opacity .1s;
140
141 &:hover {
142 opacity: $primary-foreground-opacity-hover;
143 }
144 }
145
146 .vjs-current-time,
147 .vjs-duration,
148 .vjs-peertube {
5efab546 149 color: var(--embedForegroundColor);
c6352f2c 150 opacity: $primary-foreground-opacity;
6b9af129
C
151 }
152
2ce2fd7f
C
153 .vjs-progress-control {
154 position: absolute;
155 z-index: 100; // On top of the progress bar
156 bottom: 29px;
157 width: calc(100% - (2 * #{$progress-margin}));
158 margin-left: $progress-margin;
159 height: 14px;
77728efa 160
2ce2fd7f
C
161 .vjs-slider {
162 margin: 0;
163 border-radius: 0;
164 background-color: rgba(255, 255, 255, .2);
165 height: 3px;
166 transition: none;
77728efa 167
2ce2fd7f 168 .vjs-play-progress {
5efab546 169 background: var(--embedForegroundColor);
77728efa 170
2ce2fd7f
C
171 // Not display the circle if the progress is not hovered
172 &::before {
173 opacity: 0;
174 transition: opacity 0.1s ease;
175 font-size: 14px;
77728efa 176
2ce2fd7f
C
177 top: -0.3em;
178 }
77728efa 179
2ce2fd7f
C
180 .vjs-time-tooltip {
181 display: none;
182 }
183 }
77728efa 184
2ce2fd7f
C
185 .vjs-load-progress {
186 &, & div {
187 background: rgba(255, 255, 255, .2);
188 }
189 }
77728efa
C
190 }
191 }
192
2ce2fd7f 193 .vjs-progress-control:hover .vjs-slider,
3d5de919 194 .vjs-progress-control .vjs-slider.vjs-sliding {
be6a4802 195 height: 5px;
e14852b4 196
2ce2fd7f
C
197 .vjs-play-progress::before {
198 opacity: 1;
be6a4802
C
199 }
200 }
e14852b4 201
2ce2fd7f 202
be6a4802 203 .vjs-play-control {
3ec8dc09
C
204 @include disable-outline;
205
c6352f2c 206 cursor: pointer;
be6a4802 207 font-size: $font-size;
be6a4802
C
208 margin-right: 5px;
209 }
e14852b4 210
be6a4802 211 .vjs-time-control {
8e53163f
C
212 line-height: inherit;
213
be6a4802
C
214 &.vjs-current-time {
215 font-size: $font-size;
216 display: inline-block;
217 padding: 0;
218
219 .vjs-current-time-display {
86f278cb 220 line-height: calc(#{$control-bar-height} + 1px);
be6a4802
C
221
222 &::after {
223 content: "/";
224 margin: 0 1px 0 2px;
225 }
226 }
227 }
228
229 &.vjs-duration {
230 font-size: $font-size;
231 display: inline-block;
232 padding: 0;
be6a4802 233 .vjs-duration-display {
86f278cb 234 line-height: calc(#{$control-bar-height} + 1px);
be6a4802
C
235 }
236 }
237
238 &.vjs-remaining-time {
239 display: none;
240 }
241 }
e14852b4 242
bf5685f0 243 .vjs-peertube {
be6a4802
C
244 width: 100%;
245 line-height: $control-bar-height;
246 text-align: right;
be6a4802 247
bf5685f0 248 .vjs-peertube-displayed {
a86309b4
C
249 display: block;
250 }
251
bf5685f0 252 .vjs-peertube-hidden {
a86309b4
C
253 display: none;
254 }
255
1ee156b2 256 .download-speed-number, .upload-speed-number, .peers-number, .http-fallback {
be6a4802
C
257 font-weight: $font-semibold;
258 }
259
1ee156b2 260 .download-speed-text, .upload-speed-text, .peers-text, .http-fallback {
be6a4802
C
261 margin-right: 15px;
262 }
263
264 .icon {
265 display: inline-block;
266 width: 15px;
267 height: 15px;
268 background-size: contain;
269 vertical-align: middle;
270 background-repeat: no-repeat;
271 margin-right: 6px;
272 position: relative;
273 top: -1px;
274
275 &.icon-download {
2a19a1e4 276 background-image: url('#{$assets-path}/player/images/arrow-down.svg');
be6a4802
C
277 }
278
279 &.icon-upload {
2a19a1e4 280 background-image: url('#{$assets-path}/player/images/arrow-up.svg');
be6a4802
C
281 }
282 }
283 }
e14852b4 284
57886d66 285 .vjs-playback-rate {
286 font-size: 10px;
3ec8dc09 287 width: 37px !important;
a73c582e
C
288
289 .vjs-playback-rate-value {
290 font-size: 13px;
291 line-height: $control-bar-height;
292 }
3ec8dc09
C
293
294 .vjs-menu .vjs-menu-content {
295 width: 37px !important;
296 }
57886d66 297 }
298
be6a4802 299 .vjs-mute-control {
3ec8dc09
C
300 @include disable-outline;
301
302 line-height: $control-bar-height;
303 padding: 0;
304 width: 30px;
d7701449 305
be6a4802
C
306 .vjs-icon-placeholder {
307 display: inline-block;
308 width: 22px;
309 height: 22px;
310 vertical-align: middle;
2a19a1e4 311 background: url('#{$assets-path}/player/images/volume.svg') no-repeat;
be6a4802
C
312 background-size: contain;
313
314 &::before {
315 content: '';
316 }
317 }
318
319 &.vjs-vol-0 .vjs-icon-placeholder {
2a19a1e4 320 background: url('#{$assets-path}/player/images/volume-mute.svg') no-repeat;
be6a4802
C
321 background-size: contain;
322 }
323 }
e14852b4 324
3ec8dc09
C
325 .vjs-volume-control {
326 width: 30px;
c6352f2c 327 margin: 0 5px 0 0;
be6a4802 328 }
e14852b4 329
be6a4802
C
330 .vjs-volume-bar {
331 background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAcCAQAAACw95UnAAAAMElEQVRIx2NgoBL4n4YKGUYNHkEG4zJg1OCRYDCpBowaPJwMppbLRg0eNXjUYBLEAXWNUA6QNm1lAAAAAElFTkSuQmCC) no-repeat;
332 background-size: 22px 14px;
333 height: 100%;
334 width: 100%;
335 max-width: 22px;
336 max-height: 14px;
337 margin: 7px 4px;
338 border-radius: 0;
339 top: 3px;
340
341 .vjs-volume-level {
342 background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAcAQAAAAAyhWABAAAAAnRSTlMAAHaTzTgAAAAZSURBVHgBYwAB/g9EUv+JokCqiaT+U4MCAPKPS7WUUOc1AAAAAElFTkSuQmCC) no-repeat;
343 background-size: 22px 14px;
344 max-width: 22px;
345 max-height: 14px;
346 height: 100%;
347 }
3d5de919
C
348
349 &:focus {
350 text-shadow: none;
351 box-shadow: none;
352 }
be6a4802 353 }
e14852b4 354
be6a4802
C
355 .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,
356 .vjs-volume-panel.vjs-volume-panel-horizontal:active,
357 .vjs-volume-panel.vjs-volume-panel-horizontal:focus,
358 .vjs-volume-panel.vjs-volume-panel-horizontal:hover {
359 width: 6em;
360 transition-property: none;
361 }
e14852b4 362
be6a4802
C
363 .vjs-volume-panel .vjs-mute-control:hover ~ .vjs-volume-control.vjs-volume-horizontal {
364 width: 3em;
365 height: auto;
366 }
e14852b4 367
be6a4802
C
368 .vjs-volume-panel .vjs-mute-control:hover ~ .vjs-volume-control {
369 transition-property: none;
370 }
e14852b4 371
be6a4802
C
372 .vjs-volume-panel {
373 .vjs-mute-control {
374 width: 2em;
375 z-index: 1;
376 padding: 0;
377 }
378
379 .vjs-volume-control {
380 display: inline-block;
381 position: relative;
382 left: 5px;
383 opacity: 1;
384 width: 3em;
385 height: auto;
386 }
387 }
e14852b4 388
c6352f2c
C
389 .vjs-peertube-link {
390 @include disable-outline;
391 @include disable-default-a-behaviour;
392
393 text-decoration: none;
394 line-height: $control-bar-height;
395 font-weight: $font-semibold;
396 padding: 0 5px;
397 }
398
054a103b
C
399 .vjs-theater-control {
400 @include disable-outline;
401
402 width: 37px;
403 margin-right: 1px;
b335ccec 404 cursor: pointer;
054a103b
C
405
406 .vjs-icon-placeholder {
4555697f 407 transition: transform 0.2s ease;
054a103b
C
408 display: inline-block;
409 width: 22px;
410 height: 22px;
411 vertical-align: middle;
412 background: url('#{$assets-path}/player/images/theater.svg') no-repeat;
413 background-size: contain;
414
415 &::before {
416 content: '';
417 }
418 }
419 }
420
be6a4802 421 .vjs-fullscreen-control {
3ec8dc09
C
422 @include disable-outline;
423
be6a4802 424 width: 37px;
2ce2fd7f 425 margin-right: 11px;
be6a4802
C
426
427 .vjs-icon-placeholder {
428 display: inline-block;
429 width: 22px;
430 height: 22px;
431 vertical-align: middle;
2a19a1e4 432 background: url('#{$assets-path}/player/images/fullscreen.svg') no-repeat;
be6a4802
C
433 background-size: contain;
434
435 &::before {
436 content: '';
437 }
438 }
439 }
e14852b4 440
be6a4802 441 .vjs-menu-button-popup {
be6a4802 442 font-weight: $font-semibold;
86f278cb 443 width: 50px;
be6a4802 444
be6a4802 445 .vjs-resolution-button {
3ec8dc09 446 @include disable-outline;
be6a4802
C
447 }
448
449 .vjs-menu {
450 top: 20px;
3ec8dc09 451 left: 0;
be6a4802
C
452
453 .vjs-menu-content {
86f278cb 454 width: 50px;
3ec8dc09 455 bottom: 20px;
be6a4802
C
456 }
457
458 li {
459 text-transform: none;
460 font-size: 13px;
461 }
462 }
463 }
464 }
a86309b4 465
6cf57b44 466 @media screen and (max-width: 750px) {
054a103b
C
467 .vjs-theater-control {
468 display: none;
469 }
470
6cf57b44
C
471 .vjs-dock-text {
472 font-size: 16px;
473 }
474
475 .vjs-dock-description {
3c40590d 476 font-size: 9px;
6cf57b44
C
477 }
478
479 .vjs-big-play-button {
480 font-size: 5em;
e0812403 481 border-width: 3px;
6cf57b44
C
482
483 .vjs-icon-placeholder::before {
484 @include big-play-button-triangle-size(32px);
485 }
486 }
487 }
488
e700d33b 489 @media screen and (max-width: 570px) {
869968d7
C
490 .vjs-dock-text {
491 font-size: 14px;
492 }
493
8fa5653a 494 .vjs-big-play-button {
869968d7 495 font-size: 4.5em;
e0812403 496 border-width: 2.5px;
864e782b
C
497
498 .vjs-icon-placeholder::before {
499 @include big-play-button-triangle-size(27px);
500 }
8fa5653a
C
501 }
502
7ccfb37f 503 .vjs-peertube {
86f278cb
C
504 padding: 0 !important;
505
7ccfb37f 506 .vjs-peertube-displayed {
86f278cb
C
507 display: none !important;
508 }
509 }
510 }
511
512 @media screen and (max-width: 300px) {
8fa5653a 513 .vjs-dock-text {
22b59e80
C
514 font-size: 13px;
515 }
516
8fa5653a 517 .vjs-big-play-button {
586f7c1b 518 font-size: 3em;
e0812403 519 border-width: 2px;
864e782b
C
520
521 .vjs-icon-placeholder::before {
522 @include big-play-button-triangle-size(20px);
523 }
8fa5653a
C
524 }
525
86f278cb 526 .vjs-volume-control {
a86309b4
C
527 display: none !important;
528 }
86f278cb 529
ea20306f
C
530 .vjs-peertube-link {
531 padding: 0 !important;
532 }
533
534 .vjs-settings {
535 width: 33px;
86f278cb 536 }
a86309b4 537 }
4555697f
C
538
539 // Theater mode is enabled
540 &.vjs-theater-enabled {
541 .vjs-theater-control {
542 width: 30px;
543
544 .vjs-icon-placeholder {
545 transform: scale(0.8);
546 }
547 }
548 }
549
550 // On fullscreen, hide theater control
551 &.vjs-fullscreen {
552 .vjs-theater-control {
553 display: none;
554 }
555 }
e14852b4 556}
b7a48512 557
c6352f2c
C
558// Play/pause animations
559.vjs-has-started .vjs-play-control {
560 &.vjs-playing {
561 animation: remove-pause-button 0.25s ease;
562 }
563
564 &.vjs-paused {
565 animation: add-play-button 0.25s ease;
566 }
567
568 @keyframes remove-pause-button {
569 0% {
570 transform: rotate(90deg);
571 }
572 100% {
573 transform: rotate(0deg);
574 }
575 }
576
577 @keyframes add-play-button {
578 0% {
579 transform: rotate(-90deg);
580 }
581 100% {
582 transform: rotate(0deg);
583 }
584 }
585}
586
bf5685f0
C
587// Error display disabled
588.vjs-error:not(.vjs-error-display-enabled) {
589 .vjs-error-display {
590 display: none;
591 }
592
593 .vjs-loading-spinner {
594 display: block;
595 }
596}
597
598// Error display enabled
599.vjs-error.vjs-error-display-enabled {
600 .vjs-error-display {
601 display: block;
602 }
e0812403 603}