]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+videos/+video-watch/video-watch.component.scss
Try to optimize sha segments fetching
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-watch / video-watch.component.scss
1 @import '_variables';
2 @import '_mixins';
3 @import '_bootstrap-variables';
4 @import '_miniature';
5
6 $player-factor: 1.7; // 16/9
7 $video-info-margin-left: 44px;
8
9 @function getPlayerHeight($width){
10 @return calc(#{$width} / #{$player-factor})
11 }
12
13 @function getPlayerWidth($height){
14 @return calc(#{$height} * #{$player-factor})
15 }
16
17 @mixin playlist-below-player {
18 width: 100% !important;
19 height: auto !important;
20 max-height: 300px !important;
21 max-width: initial;
22 border-bottom: 1px solid $separator-border-color !important;
23 }
24
25 .root {
26 &.theater-enabled #video-wrapper {
27 flex-direction: column;
28 justify-content: center;
29
30 $height: calc(100vh - #{$header-height} - #{$theater-bottom-space});
31
32 #videojs-wrapper {
33 width: 100%;
34 height: $height;
35 }
36
37 ::ng-deep .video-js {
38 height: $height;
39 width: 100%;
40 max-width: initial;
41 }
42
43 my-video-watch-playlist ::ng-deep .playlist {
44 @include playlist-below-player;
45 }
46 }
47 }
48
49 .blocked-label {
50 font-weight: $font-semibold;
51 }
52
53 #video-wrapper {
54 $video-height: 66vh;
55
56 background-color: #000;
57 display: flex;
58 justify-content: center;
59
60 #videojs-wrapper {
61 display: flex;
62 justify-content: center;
63 flex-grow: 1;
64 height: $video-height;
65 }
66
67 .remote-server-down {
68 color: #fff;
69 display: flex;
70 flex-direction: column;
71 align-items: center;
72 text-align: center;
73 justify-content: center;
74 background-color: #141313;
75 width: 100%;
76 font-size: 24px;
77 height: 500px;
78
79 @media screen and (max-width: 1000px) {
80 font-size: 20px;
81 }
82
83 @media screen and (max-width: 600px) {
84 font-size: 16px;
85 }
86 }
87
88 ::ng-deep .video-js {
89 width: 100%;
90 max-width: getPlayerWidth(66vh);
91 height: $video-height;
92
93 // VideoJS create an inner video player
94 video {
95 outline: 0;
96 position: relative !important;
97 }
98 }
99
100 @media screen and (max-width: 600px) {
101 .remote-server-down,
102 ::ng-deep .video-js {
103 width: 100vw;
104 height: getPlayerHeight(100vw)
105 }
106 }
107 }
108
109 .alert {
110 text-align: center;
111 border-radius: 0;
112 }
113
114 .flex-direction-column {
115 flex-direction: column;
116 }
117
118 #video-not-found {
119 height: 300px;
120 line-height: 300px;
121 margin-top: 50px;
122 text-align: center;
123 font-weight: $font-semibold;
124 font-size: 15px;
125 }
126
127 .video-bottom {
128 display: flex;
129 margin-top: 1.5rem;
130
131 .video-info {
132 flex-grow: 1;
133 // Set min width for flex item
134 min-width: 1px;
135 max-width: 100%;
136
137 .video-info-first-row {
138 display: flex;
139
140 & > div:first-child {
141 flex-grow: 1;
142 }
143
144 .video-info-name {
145 margin-right: 30px;
146 min-height: 40px; // Align with the action buttons
147 font-size: 27px;
148 font-weight: $font-semibold;
149 flex-grow: 1;
150 }
151
152 .video-info-first-row-bottom {
153 display: flex;
154 flex-wrap: wrap;
155 align-items: center;
156 width: 100%;
157 }
158
159 .video-info-date-views {
160 align-self: start;
161 margin-bottom: 10px;
162 margin-right: 10px;
163 font-size: 1em;
164 }
165
166 .video-info-channel {
167 font-weight: $font-semibold;
168 font-size: 15px;
169
170 a {
171 @include disable-default-a-behaviour;
172
173 color: pvar(--mainForegroundColor);
174
175 &:hover {
176 opacity: 0.8;
177 }
178
179 img {
180 @include avatar(18px);
181
182 margin: -2px 5px 0 0;
183 }
184 }
185
186 .video-info-channel-left {
187 flex-grow: 1;
188
189 .video-info-channel-left-links {
190 display: flex;
191 flex-direction: column;
192 position: relative;
193 line-height: 1.37;
194
195 a:nth-of-type(2) {
196 font-weight: 500;
197 font-size: 90%;
198 }
199
200 a.single-link {
201 margin-top: 7px;
202 }
203 }
204 }
205
206 my-subscribe-button {
207 margin-left: 5px;
208 }
209 }
210
211 my-feed {
212 margin-left: 5px;
213 margin-top: 1px;
214 }
215
216 .video-actions-rates {
217 margin: 0 0 10px 0;
218 align-items: start;
219 width: max-content;
220 margin-left: auto;
221
222 .video-actions {
223 height: 40px; // Align with the title
224 display: flex;
225 align-items: center;
226
227 .action-button:not(:first-child),
228 .action-dropdown,
229 my-video-actions-dropdown {
230 margin-left: 5px;
231 }
232
233 ::ng-deep.action-button {
234 @include peertube-button;
235 @include button-with-icon(21px, 0, -1px);
236 @include apply-svg-color(pvar(--actionButtonColor));
237
238 font-size: 100%;
239 font-weight: $font-semibold;
240 display: inline-block;
241 padding: 0 10px 0 10px;
242 white-space: nowrap;
243 background-color: transparent !important;
244 color: pvar(--actionButtonColor);
245 text-transform: uppercase;
246
247 &::after {
248 display: none;
249 }
250
251 &:hover {
252 opacity: 0.9;
253 }
254
255 &.action-button-like,
256 &.action-button-dislike {
257 filter: brightness(120%);
258
259 .count {
260 margin: 0 5px;
261 }
262 }
263
264 &.action-button-like.activated {
265 .count {
266 color: pvar(--activatedActionButtonColor);
267 }
268
269 my-global-icon {
270 @include apply-svg-color(pvar(--activatedActionButtonColor));
271 }
272 }
273
274 &.action-button-dislike.activated {
275 .count {
276 color: pvar(--activatedActionButtonColor);
277 }
278
279 my-global-icon {
280 @include apply-svg-color(pvar(--activatedActionButtonColor));
281 }
282 }
283
284 &.action-button-support {
285 color: pvar(--supportButtonColor);
286
287 my-global-icon {
288 @include apply-svg-color(pvar(--supportButtonColor));
289 }
290 }
291
292 &.action-button-support {
293 my-global-icon {
294 ::ng-deep path:first-child {
295 fill: pvar(--supportButtonHeartColor) !important;
296 }
297 }
298 }
299
300 &.action-button-save {
301 my-global-icon {
302 top: 0 !important;
303 right: -1px;
304 }
305 }
306
307 .icon-text {
308 margin-left: 3px;
309 }
310 }
311 }
312
313 .video-info-likes-dislikes-bar-outer-container {
314 position: relative;
315 }
316
317 .video-info-likes-dislikes-bar-inner-container {
318 position: absolute;
319 height: 20px;
320 }
321
322 .video-info-likes-dislikes-bar {
323 $likes-bar-height: 2px;
324 height: $likes-bar-height;
325 margin-top: -$likes-bar-height;
326 width: 120px;
327 background-color: #ccc;
328 position: relative;
329 top: 10px;
330
331 .likes-bar {
332 height: 100%;
333 background-color: #909090;
334
335 &.liked {
336 background-color: pvar(--activatedActionButtonColor);
337 }
338 }
339 }
340 }
341 }
342
343 .video-info-description {
344 margin: 20px 0;
345 margin-left: $video-info-margin-left;
346 font-size: 15px;
347
348 .video-info-description-html {
349 @include peertube-word-wrap;
350
351 /deep/ a {
352 text-decoration: none;
353 }
354 }
355
356 .glyphicon, .description-loading {
357 margin-left: 3px;
358 }
359
360 .description-loading {
361 display: inline-block;
362 }
363
364 .video-info-description-more {
365 cursor: pointer;
366 font-weight: $font-semibold;
367 color: pvar(--greyForegroundColor);
368 font-size: 14px;
369
370 .glyphicon {
371 position: relative;
372 top: 2px;
373 }
374 }
375 }
376
377 .video-attributes {
378 margin-left: $video-info-margin-left;
379 }
380
381 .video-attributes .video-attribute {
382 font-size: 13px;
383 display: block;
384 margin-bottom: 12px;
385
386 .video-attribute-label {
387 min-width: 142px;
388 padding-right: 5px;
389 display: inline-block;
390 color: pvar(--greyForegroundColor);
391 font-weight: $font-bold;
392 }
393
394 a.video-attribute-value {
395 @include disable-default-a-behaviour;
396 color: pvar(--mainForegroundColor);
397
398 &:hover {
399 opacity: 0.9;
400 }
401 }
402
403 &.video-attribute-tags {
404 .video-attribute-value:not(:nth-child(2)) {
405 &::before {
406 content: ', '
407 }
408 }
409 }
410 }
411 }
412
413 ::ng-deep .other-videos {
414 padding-left: 15px;
415 min-width: $video-miniature-width;
416
417 @media screen and (min-width: 1800px - (3* $video-miniature-width)) {
418 width: min-content;
419 }
420
421 .title-page {
422 margin: 0 !important;
423 }
424
425 .video-miniature {
426 display: flex;
427 width: max-content;
428 height: 100%;
429 padding-bottom: 20px;
430 flex-wrap: wrap;
431 }
432
433 .video-bottom {
434 @media screen and (max-width: 1800px - (3* $video-miniature-width)) {
435 margin-left: 1rem;
436 }
437 @media screen and (max-width: 500px) {
438 margin-left: 0;
439 margin-top: .5rem;
440 }
441 }
442 }
443 }
444
445 my-video-comments {
446 display: inline-block;
447 width: 100%;
448 margin-bottom: 20px;
449 }
450
451 // If the view is not expanded, take into account the menu
452 .privacy-concerns {
453 z-index: z(dropdown) + 1;
454 width: calc(100% - #{$menu-width});
455 }
456
457 @media screen and (max-width: $small-view) {
458 .privacy-concerns {
459 margin-left: $menu-width - 15px; // Menu is absolute
460 }
461 }
462
463 :host-context(.expanded) {
464 .privacy-concerns {
465 width: 100%;
466 margin-left: -15px;
467 }
468 }
469
470 .privacy-concerns {
471 position: fixed;
472 bottom: 0;
473 z-index: z(privacymsg);
474
475 padding: 5px 15px;
476
477 display: flex;
478 flex-wrap: nowrap;
479 align-items: center;
480 justify-content: space-between;
481 background-color: rgba(0, 0, 0, 0.9);
482 color: #fff;
483
484 .privacy-concerns-text {
485 margin: 0 5px;
486 }
487
488 a {
489 @include disable-default-a-behaviour;
490
491 color: pvar(--mainColor);
492 transition: color 0.3s;
493
494 &:hover {
495 color: #fff;
496 }
497 }
498
499 .privacy-concerns-button {
500 padding: 5px 8px 5px 7px;
501 margin-left: auto;
502 border-radius: 3px;
503 white-space: nowrap;
504 cursor: pointer;
505 transition: background-color 0.3s;
506 font-weight: $font-semibold;
507
508 &:hover {
509 background-color: #000;
510 }
511 }
512
513 .privacy-concerns-okay {
514 background-color: pvar(--mainColor);
515 margin-left: 10px;
516 }
517 }
518
519 @media screen and (max-width: 1600px) {
520 .video-bottom .video-info .video-attributes .video-attribute {
521 margin-bottom: 5px;
522 }
523 }
524
525 @media screen and (max-width: 1300px) {
526 .privacy-concerns {
527 font-size: 12px;
528 padding: 2px 5px;
529
530 .privacy-concerns-text {
531 margin: 0;
532 }
533 }
534 }
535
536 @media screen and (max-width: 1100px) {
537 #video-wrapper {
538 flex-direction: column;
539 justify-content: center;
540
541 my-video-watch-playlist ::ng-deep .playlist {
542 @include playlist-below-player;
543 }
544 }
545
546 .video-bottom {
547 flex-direction: column;
548
549 ::ng-deep .other-videos {
550 padding-left: 0 !important;
551
552 ::ng-deep .video-miniature {
553 flex-direction: row;
554 width: auto;
555 }
556 }
557 }
558 }
559
560 @media screen and (max-width: 600px) {
561 .video-bottom {
562 margin-top: 20px !important;
563 padding-bottom: 20px !important;
564
565 .video-info {
566 padding: 0;
567
568 .video-info-first-row {
569
570 .video-info-name {
571 font-size: 20px;
572 height: auto;
573 }
574 }
575 }
576 }
577
578 ::ng-deep .other-videos .video-miniature {
579 flex-direction: column;
580 }
581
582 .privacy-concerns {
583 width: 100%;
584 }
585 }
586
587 @media screen and (max-width: 450px) {
588 .video-bottom {
589 .action-button .icon-text {
590 display: none !important;
591 }
592
593 .video-info .video-info-first-row {
594 .video-info-name {
595 font-size: 18px;
596 }
597
598 .video-info-date-views {
599 font-size: 14px;
600 }
601
602 .video-actions-rates {
603 margin-top: 10px;
604 }
605 }
606
607 .video-info-description {
608 font-size: 14px !important;
609 }
610 }
611 }
612
613
614 // Special case for iOS, that takes into account the width for fullscreens
615 #video-wrapper ::ng-deep .video-js.vjs-fullscreen {
616 max-width: unset;
617 }