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