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