]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/videos/+video-watch/video-watch.component.scss
Improve abstract videos list
[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
f0a39880 260 .action-button:not(:first-child), .action-dropdown {
1f788f20
C
261 margin-left: 10px;
262 }
0727cab0 263
1f788f20
C
264 .action-button {
265 @include peertube-button;
266 @include grey-button;
457bb213
C
267 @include button-with-icon(21px, 0, -1px);
268 @include apply-svg-color($grey-foreground-color);
7b272fd7 269
1f788f20
C
270 font-size: 15px;
271 font-weight: $font-semibold;
272 display: inline-block;
273 padding: 0 10px 0 10px;
07fa4c97 274 white-space: nowrap;
7b272fd7 275
63347a0f
C
276 &::after {
277 display: none;
278 }
279
1f788f20 280 &.action-button-like.activated {
41a676db 281 background-color: $green;
4e1b0973 282
457bb213
C
283 my-global-icon {
284 @include apply-svg-color(#fff);
1f788f20 285 }
7b272fd7 286 }
6e33bf28 287
1f788f20 288 &.action-button-dislike.activated {
41a676db 289 background-color: $red;
d38b8281 290
457bb213
C
291 my-global-icon {
292 @include apply-svg-color(#fff);
1f788f20 293 }
7b272fd7 294 }
457bb213 295
f0a39880
C
296 &.action-button-save {
297 my-global-icon {
298 top: 0 !important;
299 right: -1px;
300 }
301 }
302
457bb213
C
303 .icon-text {
304 margin-left: 3px;
305 }
b1fa3eba 306 }
d38b8281 307
f0a39880 308 .action-dropdown {
1f788f20 309 display: inline-block;
4f8c0eb0 310
1f788f20 311 .dropdown-menu .dropdown-item {
c5a1ae50 312 @include dropdown-with-icon-item;
7b272fd7 313 }
b1fa3eba 314 }
4e1b0973 315 }
6a9e1d42 316
1f788f20 317 .video-info-likes-dislikes-bar {
2d9fea16
RK
318 $likes-bar-height: 2px;
319 height: $likes-bar-height;
320 margin-top: -$likes-bar-height;
1f788f20 321 width: 186px;
1d6587aa 322 background-color: $red;
2d9fea16
RK
323 position: relative;
324 top: 10px;
6a9e1d42 325
1f788f20
C
326 .likes-bar {
327 height: 100%;
1d6587aa 328 background-color: $green;
1f788f20 329 }
6a9e1d42
C
330 }
331 }
d1992b93
C
332 }
333
b1fa3eba
C
334 .video-info-description {
335 margin: 20px 0;
336 font-size: 15px;
d1992b93 337
54a932e8 338 .video-info-description-html {
7a14004b 339 @include peertube-word-wrap;
54a932e8
C
340 }
341
9e9afa45
C
342 .glyphicon, .description-loading {
343 margin-left: 3px;
344 }
345
80958c78
C
346 .description-loading {
347 display: inline-block;
348 }
349
b1fa3eba 350 .video-info-description-more {
2de96f4d 351 cursor: pointer;
b1fa3eba 352 font-weight: $font-semibold;
457bb213 353 color: $grey-foreground-color;
b1fa3eba 354 font-size: 14px;
2de96f4d
C
355
356 .glyphicon {
357 position: relative;
358 top: 2px;
359 }
360 }
09223546
C
361 }
362
1f788f20
C
363 .video-attributes .video-attribute {
364 font-size: 13px;
365 display: block;
366 margin-bottom: 12px;
367
368 .video-attribute-label {
adb115f5 369 min-width: 142px;
c6c357ac 370 padding-right: 5px;
1f788f20 371 display: inline-block;
457bb213 372 color: $grey-foreground-color;
1f788f20 373 font-weight: $font-bold;
3eeeb87f 374 }
4278710d
C
375
376 a.video-attribute-value {
377 @include disable-default-a-behaviour;
9a0fc840 378 color: var(--mainForegroundColor);
4278710d
C
379
380 &:hover {
381 opacity: 0.9;
382 }
383 }
384
385 &.video-attribute-tags {
386 .video-attribute-value:not(:nth-child(2)) {
387 &::before {
388 content: ', '
389 }
390 }
391 }
3eeeb87f 392 }
41c3dfac
C
393 }
394
9a2f7ea7 395 /deep/ .other-videos {
1c66c35c 396 padding-left: 15px;
9a18a625 397 flex-basis: $other-videos-width;
f7ecffa4 398
41c3dfac 399 .title-page {
9a2f7ea7 400 margin-top: 0 !important;
41c3dfac
C
401 }
402
8ff3f883 403 .video-miniature {
41c3dfac 404 display: flex;
9a18a625 405 width: $other-videos-width;
41c3dfac
C
406 height: 100%;
407 margin-bottom: 20px;
9e01e510 408 flex-wrap: wrap;
a01f107b 409
22a16e36
C
410 .video-thumbnail {
411 margin-right: 10px
41c3dfac
C
412 }
413 }
a01f107b 414 }
d1992b93 415}
41c3dfac 416
1d6587aa
C
417my-video-comments {
418 display: inline-block;
66467298 419 width: 100%;
1d6587aa
C
420 margin-bottom: 20px;
421}
422
2b3b76ab
C
423// If the view is not expanded, take into account the menu
424.privacy-concerns {
425 width: calc(100% - #{$menu-width});
426}
427
8ff3f883
C
428@media screen and (max-width: $small-view) {
429 .privacy-concerns {
430 margin-left: $menu-width;
431 }
432}
433
2b3b76ab
C
434:host-context(.expanded) {
435 .privacy-concerns {
436 width: 100%;
8ff3f883 437 margin-left: 0;
2b3b76ab
C
438 }
439}
440
441.privacy-concerns {
442 position: fixed;
443 bottom: 0;
444
445 padding: 5px 15px;
446
447 display: flex;
448 align-items: center;
449 justify-content: flex-start;
450 background-color: rgba(0, 0, 0, 0.9);
451 color: #fff;
452
453 .privacy-concerns-text {
454 margin: 0 5px;
455 }
456
457 a {
458 @include disable-default-a-behaviour;
459
9a0fc840 460 color: var(--mainColor);
2b3b76ab
C
461 transition: color 0.3s;
462
463 &:hover {
464 color: #fff;
465 }
466 }
467
468 .privacy-concerns-okay {
9a0fc840 469 background-color: var(--mainColor);
2b3b76ab
C
470 padding: 5px 8px 5px 7px;
471 margin-left: auto;
472 border-radius: 3px;
473 cursor: pointer;
474 transition: background-color 0.3s;
475 font-weight: $font-semibold;
476
477 &:hover {
478 background-color: #000;
479 }
480 }
481}
482
07fa4c97 483@media screen and (max-width: 1600px) {
8ff3f883
C
484 .video-bottom .video-info .video-attributes .video-attribute {
485 margin-bottom: 5px;
b9828abe
C
486 }
487}
b2731bff 488
23f4c3d4 489@media screen and (max-width: 1300px) {
2b3b76ab
C
490 .privacy-concerns {
491 font-size: 12px;
492 padding: 2px 5px;
493
494 .privacy-concerns-text {
495 margin: 0;
496 }
497 }
07fa4c97
C
498}
499
9a18a625
C
500@media screen and (max-width: 1100px) {
501 .video-bottom {
502 flex-direction: column;
503
504 /deep/ .other-videos {
505 padding-left: 0 !important;
506
507 /deep/ .video-miniature {
508 flex-direction: row;
509 width: auto;
510 }
511 }
512 }
513}
514
515@media screen and (max-width: 900px) {
516 #video-wrapper {
517 flex-direction: column;
518 justify-content: center;
519
520 #videojs-wrapper {
521 display: flex;
522 justify-content: center;
523 }
524
525 .playlist {
526 @include playlist-below-player;
527 }
528 }
529}
530
1f788f20 531@media screen and (max-width: 600px) {
b2731bff 532 .video-bottom {
11dd0c2e 533 margin: 20px 0 0 0 !important;
1f788f20
C
534
535 .video-info {
93ea9c47 536 padding: 0;
1f788f20
C
537
538 .video-info-first-row {
539
540 .video-info-name {
541 font-size: 20px;
542 height: auto;
543 }
544 }
545 }
b2731bff 546 }
2b3b76ab 547
9a18a625
C
548 /deep/ .other-videos .video-miniature {
549 flex-direction: column;
a8981e0b
C
550 }
551
2b3b76ab
C
552 .privacy-concerns {
553 width: 100%;
554
555 strong {
556 display: none;
557 }
558 }
b2731bff 559}
07fa4c97
C
560
561@media screen and (max-width: 450px) {
93ea9c47
C
562 .video-bottom {
563 .action-button .icon-text {
564 display: none !important;
565 }
566
567 .video-info .video-info-first-row {
568 .video-info-name {
569 font-size: 18px;
570 }
571
572 .video-info-date-views {
573 font-size: 14px;
574 }
575
576 .video-actions-rates {
577 margin-top: 10px;
578 }
579 }
580
581 .video-info-description {
582 font-size: 14px !important;
583 }
07fa4c97
C
584 }
585}