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