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