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