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