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