]>
Commit | Line | Data |
---|---|---|
1 | @use 'sass:math'; | |
2 | @use '_variables' as *; | |
3 | @use '_mixins' as *; | |
4 | @use '_bootstrap-variables'; | |
5 | @use '_miniature' as *; | |
6 | ||
7 | $player-factor: math.div(16, 9); | |
8 | $video-info-margin-left: 44px; | |
9 | ||
10 | @function getPlayerHeight ($width) { | |
11 | @return calc(#{$width} / #{$player-factor}); | |
12 | } | |
13 | ||
14 | @function getPlayerWidth ($height) { | |
15 | @return calc(#{$height} * #{$player-factor}); | |
16 | } | |
17 | ||
18 | @mixin playlist-below-player { | |
19 | width: 100% !important; | |
20 | height: auto !important; | |
21 | max-height: 300px !important; | |
22 | max-width: initial; | |
23 | border-bottom: 1px solid $separator-border-color !important; | |
24 | } | |
25 | ||
26 | .root { | |
27 | &.theater-enabled #video-wrapper { | |
28 | $height: calc(100vh - #{$header-height} - #{$theater-bottom-space}); | |
29 | ||
30 | flex-direction: column; | |
31 | justify-content: center; | |
32 | ||
33 | #videojs-wrapper { | |
34 | width: 100%; | |
35 | height: $height; | |
36 | } | |
37 | ||
38 | ::ng-deep .video-js { | |
39 | height: $height; | |
40 | width: 100%; | |
41 | max-width: initial; | |
42 | } | |
43 | ||
44 | my-video-watch-playlist ::ng-deep .playlist { | |
45 | @include playlist-below-player; | |
46 | } | |
47 | } | |
48 | } | |
49 | ||
50 | .blocked-label { | |
51 | font-weight: $font-semibold; | |
52 | } | |
53 | ||
54 | .placeholder-image { | |
55 | height: 100%; | |
56 | } | |
57 | ||
58 | #video-wrapper { | |
59 | $video-height: 66vh; | |
60 | ||
61 | background-color: #000; | |
62 | display: flex; | |
63 | justify-content: center; | |
64 | ||
65 | #videojs-wrapper { | |
66 | display: flex; | |
67 | justify-content: center; | |
68 | flex-grow: 1; | |
69 | height: $video-height; | |
70 | } | |
71 | ||
72 | .remote-server-down { | |
73 | color: #fff; | |
74 | display: flex; | |
75 | flex-direction: column; | |
76 | align-items: center; | |
77 | text-align: center; | |
78 | justify-content: center; | |
79 | background-color: #141313; | |
80 | width: 100%; | |
81 | font-size: 24px; | |
82 | height: 500px; | |
83 | ||
84 | @media screen and (max-width: 1000px) { | |
85 | font-size: 20px; | |
86 | } | |
87 | ||
88 | @media screen and (max-width: 600px) { | |
89 | font-size: 16px; | |
90 | } | |
91 | } | |
92 | ||
93 | ::ng-deep .video-js { | |
94 | width: 100%; | |
95 | max-width: getPlayerWidth(66vh); | |
96 | height: $video-height; | |
97 | ||
98 | // VideoJS create an inner video player | |
99 | video { | |
100 | outline: 0; | |
101 | position: relative !important; | |
102 | } | |
103 | } | |
104 | ||
105 | @media screen and (max-width: 600px) { | |
106 | #videojs-wrapper { | |
107 | height: getPlayerHeight(100vw) !important; | |
108 | } | |
109 | ||
110 | .remote-server-down, | |
111 | ::ng-deep .video-js { | |
112 | width: 100vw; | |
113 | height: getPlayerHeight(100vw) !important; | |
114 | } | |
115 | } | |
116 | } | |
117 | ||
118 | .alert { | |
119 | text-align: center; | |
120 | border-radius: 0; | |
121 | } | |
122 | ||
123 | .flex-direction-column { | |
124 | flex-direction: column; | |
125 | } | |
126 | ||
127 | #video-not-found { | |
128 | height: 300px; | |
129 | line-height: 300px; | |
130 | margin-top: 50px; | |
131 | text-align: center; | |
132 | font-weight: $font-semibold; | |
133 | font-size: 15px; | |
134 | } | |
135 | ||
136 | .video-bottom { | |
137 | display: flex; | |
138 | margin-top: 1.5rem; | |
139 | ||
140 | .video-info { | |
141 | flex-grow: 1; | |
142 | // Set min width for flex item | |
143 | min-width: 1px; | |
144 | max-width: 100%; | |
145 | ||
146 | .video-info-first-row { | |
147 | display: flex; | |
148 | ||
149 | > div:first-child { | |
150 | flex-grow: 1; | |
151 | } | |
152 | ||
153 | .video-info-name { | |
154 | @include peertube-word-wrap; | |
155 | ||
156 | @include margin-right(30px); | |
157 | min-height: 40px; // Align with the action buttons | |
158 | font-size: 27px; | |
159 | font-weight: $font-semibold; | |
160 | flex-grow: 1; | |
161 | } | |
162 | ||
163 | .video-info-first-row-bottom { | |
164 | display: flex; | |
165 | flex-wrap: wrap; | |
166 | align-items: center; | |
167 | width: 100%; | |
168 | } | |
169 | ||
170 | .video-info-date-views { | |
171 | @include margin-right(10px); | |
172 | ||
173 | margin-bottom: 10px; | |
174 | align-self: start; | |
175 | font-size: 1em; | |
176 | } | |
177 | ||
178 | .video-info-channel { | |
179 | font-weight: $font-semibold; | |
180 | font-size: 15px; | |
181 | ||
182 | a { | |
183 | @include disable-default-a-behaviour; | |
184 | @include peertube-word-wrap; | |
185 | ||
186 | color: pvar(--mainForegroundColor); | |
187 | ||
188 | &:hover { | |
189 | opacity: 0.8; | |
190 | } | |
191 | } | |
192 | ||
193 | .video-info-channel-left { | |
194 | flex-grow: 1; | |
195 | ||
196 | .video-info-channel-left-links { | |
197 | display: flex; | |
198 | flex-direction: column; | |
199 | position: relative; | |
200 | line-height: 1.37; | |
201 | ||
202 | a:nth-of-type(2) { | |
203 | font-weight: $font-regular; | |
204 | font-size: 90%; | |
205 | } | |
206 | ||
207 | a.single-link { | |
208 | margin-top: 7px; | |
209 | } | |
210 | } | |
211 | } | |
212 | ||
213 | my-subscribe-button { | |
214 | @include margin-left(5px); | |
215 | } | |
216 | } | |
217 | ||
218 | .video-actions-rates { | |
219 | @include margin-left(auto); | |
220 | @include margin-right(0); | |
221 | ||
222 | margin-top: 0; | |
223 | margin-bottom: 10px; | |
224 | ||
225 | align-items: start; | |
226 | width: max-content; | |
227 | ||
228 | .video-actions { | |
229 | height: 40px; // Align with the title | |
230 | display: flex; | |
231 | align-items: center; | |
232 | ||
233 | .action-button:not(:first-child), | |
234 | .action-dropdown, | |
235 | my-video-actions-dropdown { | |
236 | @include margin-left(5px); | |
237 | } | |
238 | ||
239 | ::ng-deep.action-button { | |
240 | @include peertube-button; | |
241 | @include button-with-icon(21px, 0, -1px); | |
242 | ||
243 | font-size: 100%; | |
244 | font-weight: $font-semibold; | |
245 | display: inline-block; | |
246 | padding: 0 10px; | |
247 | white-space: nowrap; | |
248 | background-color: transparent !important; | |
249 | color: pvar(--actionButtonColor); | |
250 | text-transform: uppercase; | |
251 | ||
252 | &::after { | |
253 | display: none; | |
254 | } | |
255 | ||
256 | &:hover { | |
257 | opacity: 0.9; | |
258 | } | |
259 | ||
260 | &.action-button-support { | |
261 | color: pvar(--supportButtonColor); | |
262 | ||
263 | my-global-icon { | |
264 | @include apply-svg-color(pvar(--supportButtonColor)); | |
265 | } | |
266 | } | |
267 | ||
268 | &.action-button-support { | |
269 | my-global-icon { | |
270 | ::ng-deep path:first-child { | |
271 | fill: pvar(--supportButtonHeartColor) !important; | |
272 | } | |
273 | } | |
274 | } | |
275 | ||
276 | &.action-button-save { | |
277 | my-global-icon { | |
278 | top: 0 !important; | |
279 | right: -1px; | |
280 | } | |
281 | } | |
282 | ||
283 | .icon-text { | |
284 | @include margin-left(3px); | |
285 | } | |
286 | } | |
287 | } | |
288 | ||
289 | .video-info-likes-dislikes-bar-outer-container { | |
290 | position: relative; | |
291 | } | |
292 | ||
293 | .video-info-likes-dislikes-bar-inner-container { | |
294 | position: absolute; | |
295 | height: 20px; | |
296 | } | |
297 | ||
298 | .video-info-likes-dislikes-bar { | |
299 | $likes-bar-height: 2px; | |
300 | height: $likes-bar-height; | |
301 | margin-top: -$likes-bar-height; | |
302 | width: 120px; | |
303 | background-color: #ccc; | |
304 | position: relative; | |
305 | top: 10px; | |
306 | ||
307 | .likes-bar { | |
308 | height: 100%; | |
309 | background-color: #909090; | |
310 | ||
311 | &.liked { | |
312 | background-color: pvar(--activatedActionButtonColor); | |
313 | } | |
314 | } | |
315 | } | |
316 | } | |
317 | } | |
318 | ||
319 | .video-info-description { | |
320 | @include margin-left($video-info-margin-left); | |
321 | @include margin-right(0); | |
322 | ||
323 | margin-top: 20px; | |
324 | margin-bottom: 20px; | |
325 | font-size: 15px; | |
326 | ||
327 | .video-info-description-html { | |
328 | @include peertube-word-wrap; | |
329 | ||
330 | ::ng-deep a { | |
331 | text-decoration: none; | |
332 | } | |
333 | } | |
334 | ||
335 | .glyphicon, | |
336 | .description-loading { | |
337 | @include margin-left(3px); | |
338 | } | |
339 | ||
340 | .description-loading { | |
341 | display: inline-block; | |
342 | } | |
343 | ||
344 | .video-info-description-more { | |
345 | cursor: pointer; | |
346 | font-weight: $font-semibold; | |
347 | color: pvar(--greyForegroundColor); | |
348 | font-size: 14px; | |
349 | ||
350 | .glyphicon { | |
351 | position: relative; | |
352 | top: 2px; | |
353 | } | |
354 | } | |
355 | } | |
356 | ||
357 | .video-attributes { | |
358 | @include margin-left($video-info-margin-left); | |
359 | } | |
360 | ||
361 | .video-attributes .video-attribute { | |
362 | font-size: 13px; | |
363 | display: block; | |
364 | margin-bottom: 12px; | |
365 | ||
366 | .video-attribute-label { | |
367 | @include padding-right(5px); | |
368 | ||
369 | min-width: 142px; | |
370 | display: inline-block; | |
371 | color: pvar(--greyForegroundColor); | |
372 | font-weight: $font-bold; | |
373 | } | |
374 | ||
375 | a.video-attribute-value { | |
376 | @include disable-default-a-behaviour; | |
377 | color: pvar(--mainForegroundColor); | |
378 | ||
379 | &:hover { | |
380 | opacity: 0.9; | |
381 | } | |
382 | } | |
383 | ||
384 | &.video-attribute-tags { | |
385 | .video-attribute-value:not(:nth-child(2)) { | |
386 | &::before { | |
387 | content: ', '; | |
388 | } | |
389 | } | |
390 | } | |
391 | } | |
392 | } | |
393 | } | |
394 | ||
395 | my-recommended-videos { | |
396 | @include padding-left(15px); | |
397 | ||
398 | display: block; | |
399 | min-width: 250px; | |
400 | } | |
401 | ||
402 | my-video-comments { | |
403 | display: inline-block; | |
404 | width: 100%; | |
405 | margin-bottom: 20px; | |
406 | } | |
407 | ||
408 | // If the view is not expanded, take into account the menu | |
409 | .privacy-concerns { | |
410 | z-index: z(dropdown) + 1; | |
411 | width: calc(100% - #{$menu-width}); | |
412 | } | |
413 | ||
414 | @media screen and (max-width: $small-view) { | |
415 | .privacy-concerns { | |
416 | @include margin-left($menu-width - 15px); // Menu is absolute | |
417 | } | |
418 | } | |
419 | ||
420 | :host-context(.expanded) { | |
421 | .privacy-concerns { | |
422 | @include margin-left(-15px); | |
423 | ||
424 | width: 100%; | |
425 | } | |
426 | } | |
427 | ||
428 | .privacy-concerns { | |
429 | position: fixed; | |
430 | bottom: 0; | |
431 | z-index: z(privacymsg); | |
432 | ||
433 | padding: 5px 15px; | |
434 | ||
435 | display: flex; | |
436 | flex-wrap: nowrap; | |
437 | align-items: center; | |
438 | justify-content: space-between; | |
439 | background-color: rgba(0, 0, 0, 0.9); | |
440 | color: #fff; | |
441 | ||
442 | .privacy-concerns-text { | |
443 | margin: 0 5px; | |
444 | } | |
445 | ||
446 | a { | |
447 | @include disable-default-a-behaviour; | |
448 | ||
449 | color: pvar(--mainColor); | |
450 | transition: color 0.3s; | |
451 | ||
452 | &:hover { | |
453 | color: #fff; | |
454 | } | |
455 | } | |
456 | ||
457 | .privacy-concerns-button { | |
458 | @include margin-left(auto); | |
459 | ||
460 | padding: 5px 8px 5px 7px; | |
461 | border-radius: 3px; | |
462 | white-space: nowrap; | |
463 | cursor: pointer; | |
464 | transition: background-color 0.3s; | |
465 | font-weight: $font-semibold; | |
466 | ||
467 | &:hover { | |
468 | background-color: #000; | |
469 | } | |
470 | } | |
471 | ||
472 | .privacy-concerns-okay { | |
473 | @include margin-left(10px); | |
474 | ||
475 | background-color: pvar(--mainColor); | |
476 | } | |
477 | } | |
478 | ||
479 | @media screen and (max-width: 1600px) { | |
480 | .video-bottom .video-info .video-attributes .video-attribute { | |
481 | margin-bottom: 5px; | |
482 | } | |
483 | } | |
484 | ||
485 | @media screen and (max-width: 1300px) { | |
486 | .privacy-concerns { | |
487 | font-size: 12px; | |
488 | padding: 2px 5px; | |
489 | ||
490 | .privacy-concerns-text { | |
491 | margin: 0; | |
492 | } | |
493 | } | |
494 | } | |
495 | ||
496 | // Use the same breakpoint than in the typescript component to display the other video miniatures as row | |
497 | @media screen and (max-width: 1100px) { | |
498 | #video-wrapper { | |
499 | flex-direction: column; | |
500 | justify-content: center; | |
501 | ||
502 | my-video-watch-playlist ::ng-deep .playlist { | |
503 | @include playlist-below-player; | |
504 | } | |
505 | } | |
506 | ||
507 | .video-bottom { | |
508 | flex-direction: column; | |
509 | } | |
510 | ||
511 | my-recommended-videos { | |
512 | @include padding-left(0); | |
513 | } | |
514 | } | |
515 | ||
516 | @media screen and (max-width: 600px) { | |
517 | .video-bottom { | |
518 | margin-top: 20px !important; | |
519 | padding-bottom: 20px !important; | |
520 | ||
521 | .video-info { | |
522 | padding: 0; | |
523 | ||
524 | .video-info-first-row { | |
525 | ||
526 | .video-info-name { | |
527 | font-size: 20px; | |
528 | height: auto; | |
529 | } | |
530 | } | |
531 | } | |
532 | } | |
533 | ||
534 | .privacy-concerns { | |
535 | width: 100%; | |
536 | } | |
537 | } | |
538 | ||
539 | @media screen and (max-width: 450px) { | |
540 | .video-bottom { | |
541 | .action-button .icon-text { | |
542 | display: none !important; | |
543 | } | |
544 | ||
545 | .video-info .video-info-first-row { | |
546 | .video-info-name { | |
547 | font-size: 18px; | |
548 | } | |
549 | ||
550 | .video-info-date-views { | |
551 | font-size: 14px; | |
552 | } | |
553 | ||
554 | .video-actions-rates { | |
555 | margin-top: 10px; | |
556 | } | |
557 | } | |
558 | ||
559 | .video-info-description { | |
560 | font-size: 14px !important; | |
561 | } | |
562 | } | |
563 | } | |
564 | ||
565 | ||
566 | // Special case for iOS, that takes into account the width for fullscreens | |
567 | #video-wrapper ::ng-deep .video-js.vjs-fullscreen { | |
568 | max-width: unset; | |
569 | } |