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