]>
Commit | Line | Data |
---|---|---|
8cbc40b2 C |
1 | @use 'sass:math'; |
2 | @use '_variables' as *; | |
3 | @use '_mixins' as *; | |
fa12eacc | 4 | @use '_bootstrap-variables'; |
8cbc40b2 | 5 | @use '_miniature' as *; |
19f22055 | 6 | |
931d3430 | 7 | @function getPlayerHeight ($width) { |
b0c43e36 | 8 | @return calc(#{$width} / #{$video-watch-player-factor}); |
9a18a625 C |
9 | } |
10 | ||
931d3430 | 11 | @function getPlayerWidth ($height) { |
b0c43e36 | 12 | @return calc(#{$height} * #{$video-watch-player-factor}); |
9a18a625 C |
13 | } |
14 | ||
15 | @mixin playlist-below-player { | |
72675ebe C |
16 | width: 100% !important; |
17 | height: auto !important; | |
18 | max-height: 300px !important; | |
67c68723 | 19 | max-width: initial; |
72675ebe | 20 | border-bottom: 1px solid $separator-border-color !important; |
9a18a625 C |
21 | } |
22 | ||
23 | .root { | |
9a18a625 | 24 | &.theater-enabled #video-wrapper { |
931d3430 C |
25 | $height: calc(100vh - #{$header-height} - #{$theater-bottom-space}); |
26 | ||
9a18a625 C |
27 | flex-direction: column; |
28 | justify-content: center; | |
29 | ||
30 | #videojs-wrapper { | |
31 | width: 100%; | |
f8c00564 | 32 | height: $height; |
9a18a625 C |
33 | } |
34 | ||
03652b31 | 35 | ::ng-deep .video-js { |
9a18a625 C |
36 | height: $height; |
37 | width: 100%; | |
466e3f20 | 38 | max-width: initial; |
9a18a625 C |
39 | } |
40 | ||
03652b31 | 41 | my-video-watch-playlist ::ng-deep .playlist { |
9a18a625 C |
42 | @include playlist-below-player; |
43 | } | |
44 | } | |
191764f3 C |
45 | } |
46 | ||
5baee5fc | 47 | .blocked-label { |
191764f3 C |
48 | font-weight: $font-semibold; |
49 | } | |
50 | ||
0114ee15 C |
51 | .placeholder-image { |
52 | height: 100%; | |
53 | } | |
54 | ||
e2f01c47 | 55 | #video-wrapper { |
a5cf76af C |
56 | $video-height: 66vh; |
57 | ||
be6a4802 C |
58 | background-color: #000; |
59 | display: flex; | |
60 | justify-content: center; | |
6d88de72 | 61 | |
3143ae17 C |
62 | #videojs-wrapper { |
63 | display: flex; | |
64 | justify-content: center; | |
65 | flex-grow: 1; | |
a5cf76af | 66 | height: $video-height; |
3143ae17 C |
67 | } |
68 | ||
6d88de72 C |
69 | .remote-server-down { |
70 | color: #fff; | |
71 | display: flex; | |
72 | flex-direction: column; | |
73 | align-items: center; | |
74 | text-align: center; | |
75 | justify-content: center; | |
76 | background-color: #141313; | |
77 | width: 100%; | |
6d88de72 | 78 | font-size: 24px; |
3b492bff | 79 | height: 500px; |
6d88de72 C |
80 | |
81 | @media screen and (max-width: 1000px) { | |
82 | font-size: 20px; | |
83 | } | |
7b272fd7 | 84 | |
acbffe9c | 85 | @media screen and (max-width: 600px) { |
6d88de72 | 86 | font-size: 16px; |
b9828abe | 87 | } |
6d88de72 C |
88 | } |
89 | ||
03652b31 | 90 | ::ng-deep .video-js { |
58f3c3f1 C |
91 | width: 100%; |
92 | max-width: getPlayerWidth(66vh); | |
a5cf76af | 93 | height: $video-height; |
3b492bff | 94 | |
7b272fd7 C |
95 | // VideoJS create an inner video player |
96 | video { | |
97 | outline: 0; | |
b9828abe | 98 | position: relative !important; |
7b272fd7 | 99 | } |
be6a4802 | 100 | } |
054a103b | 101 | |
3b492bff | 102 | @media screen and (max-width: 600px) { |
dc13623b C |
103 | #videojs-wrapper { |
104 | height: getPlayerHeight(100vw) !important; | |
105 | } | |
106 | ||
3b492bff | 107 | .remote-server-down, |
03652b31 | 108 | ::ng-deep .video-js { |
3b492bff | 109 | width: 100vw; |
dc13623b | 110 | height: getPlayerHeight(100vw) !important; |
3b492bff | 111 | } |
054a103b | 112 | } |
e56b20f5 C |
113 | } |
114 | ||
bbe0f064 | 115 | .alert { |
2186386c | 116 | text-align: center; |
2b3f1919 | 117 | border-radius: 0; |
2186386c C |
118 | } |
119 | ||
7fc441cc RK |
120 | .flex-direction-column { |
121 | flex-direction: column; | |
122 | } | |
123 | ||
9c89a45c C |
124 | #video-not-found { |
125 | height: 300px; | |
126 | line-height: 300px; | |
127 | margin-top: 50px; | |
128 | text-align: center; | |
fb4fd623 C |
129 | font-weight: $font-semibold; |
130 | font-size: 15px; | |
9c89a45c C |
131 | } |
132 | ||
b1fa3eba | 133 | .video-bottom { |
9a18a625 | 134 | display: flex; |
46788f21 | 135 | margin-top: 1.5rem; |
d1992b93 | 136 | |
b1fa3eba C |
137 | .video-info { |
138 | flex-grow: 1; | |
20acba1c C |
139 | // Set min width for flex item |
140 | min-width: 1px; | |
e452d2e2 | 141 | max-width: 100%; |
3eeeb87f | 142 | |
1f788f20 | 143 | .video-info-first-row { |
b1fa3eba | 144 | display: flex; |
1f788f20 | 145 | |
931d3430 | 146 | > div:first-child { |
1f788f20 C |
147 | flex-grow: 1; |
148 | } | |
d1992b93 | 149 | |
b1fa3eba | 150 | .video-info-name { |
b45afe12 C |
151 | @include peertube-word-wrap; |
152 | ||
27bc9586 | 153 | @include margin-right(30px); |
196b7790 | 154 | min-height: 40px; // Align with the action buttons |
b1fa3eba C |
155 | font-size: 27px; |
156 | font-weight: $font-semibold; | |
157 | flex-grow: 1; | |
158 | } | |
09223546 | 159 | |
7fc441cc | 160 | .video-info-first-row-bottom { |
5def76eb RK |
161 | display: flex; |
162 | flex-wrap: wrap; | |
7fc441cc RK |
163 | align-items: center; |
164 | width: 100%; | |
165 | } | |
166 | ||
1f788f20 | 167 | .video-info-date-views { |
27bc9586 C |
168 | @include margin-right(10px); |
169 | ||
8ff3f883 | 170 | margin-bottom: 10px; |
27bc9586 | 171 | align-self: start; |
a0dedc02 | 172 | font-size: 1em; |
1f788f20 C |
173 | } |
174 | ||
175 | .video-info-channel { | |
176 | font-weight: $font-semibold; | |
177 | font-size: 15px; | |
95166f9a C |
178 | |
179 | a { | |
180 | @include disable-default-a-behaviour; | |
b45afe12 | 181 | @include peertube-word-wrap; |
95166f9a | 182 | |
e66883b3 | 183 | color: pvar(--mainForegroundColor); |
95166f9a C |
184 | |
185 | &:hover { | |
186 | opacity: 0.8; | |
187 | } | |
188 | } | |
22a16e36 | 189 | |
dd4f25ee RK |
190 | .video-info-channel-left { |
191 | flex-grow: 1; | |
1f788f20 | 192 | |
dd4f25ee RK |
193 | .video-info-channel-left-links { |
194 | display: flex; | |
195 | flex-direction: column; | |
196 | position: relative; | |
9d45db29 | 197 | line-height: 1.37; |
b7f5b524 | 198 | |
dd4f25ee | 199 | a:nth-of-type(2) { |
26171379 | 200 | font-weight: $font-regular; |
dd4f25ee RK |
201 | font-size: 90%; |
202 | } | |
b40a2193 K |
203 | |
204 | a.single-link { | |
205 | margin-top: 7px; | |
206 | } | |
b7f5b524 C |
207 | } |
208 | } | |
6e33bf28 | 209 | |
dd4f25ee | 210 | my-subscribe-button { |
27bc9586 | 211 | @include margin-left(5px); |
6e33bf28 | 212 | } |
1f788f20 | 213 | } |
b2731bff | 214 | |
1f788f20 | 215 | .video-actions-rates { |
27bc9586 C |
216 | @include margin-left(auto); |
217 | @include margin-right(0); | |
218 | ||
219 | margin-top: 0; | |
220 | margin-bottom: 10px; | |
221 | ||
2303a803 | 222 | align-items: start; |
7fc441cc | 223 | width: max-content; |
09223546 | 224 | |
1f788f20 C |
225 | .video-actions { |
226 | height: 40px; // Align with the title | |
1f788f20 C |
227 | display: flex; |
228 | align-items: center; | |
09223546 | 229 | |
3a0fb65c C |
230 | .action-button:not(:first-child), |
231 | .action-dropdown, | |
232 | my-video-actions-dropdown { | |
27bc9586 | 233 | @include margin-left(5px); |
1f788f20 | 234 | } |
0727cab0 | 235 | |
0240da5c | 236 | ::ng-deep.action-button { |
1f788f20 | 237 | @include peertube-button; |
457bb213 | 238 | @include button-with-icon(21px, 0, -1px); |
7b272fd7 | 239 | |
0240da5c | 240 | font-size: 100%; |
1f788f20 C |
241 | font-weight: $font-semibold; |
242 | display: inline-block; | |
931d3430 | 243 | padding: 0 10px; |
07fa4c97 | 244 | white-space: nowrap; |
0240da5c | 245 | background-color: transparent !important; |
e66883b3 | 246 | color: pvar(--actionButtonColor); |
0240da5c | 247 | text-transform: uppercase; |
7b272fd7 | 248 | |
63347a0f C |
249 | &::after { |
250 | display: none; | |
251 | } | |
252 | ||
0240da5c RK |
253 | &:hover { |
254 | opacity: 0.9; | |
255 | } | |
256 | ||
2fcc2294 | 257 | &.action-button-support { |
e66883b3 | 258 | color: pvar(--supportButtonColor); |
2fcc2294 | 259 | |
0240da5c | 260 | my-global-icon { |
e66883b3 | 261 | @include apply-svg-color(pvar(--supportButtonColor)); |
2fcc2294 | 262 | } |
0240da5c | 263 | } |
2fcc2294 | 264 | |
0240da5c | 265 | &.action-button-support { |
2fcc2294 | 266 | my-global-icon { |
0240da5c | 267 | ::ng-deep path:first-child { |
e66883b3 | 268 | fill: pvar(--supportButtonHeartColor) !important; |
0240da5c | 269 | } |
2fcc2294 C |
270 | } |
271 | } | |
272 | ||
f0a39880 C |
273 | &.action-button-save { |
274 | my-global-icon { | |
275 | top: 0 !important; | |
276 | right: -1px; | |
277 | } | |
278 | } | |
279 | ||
457bb213 | 280 | .icon-text { |
27bc9586 | 281 | @include margin-left(3px); |
457bb213 | 282 | } |
b1fa3eba | 283 | } |
4e1b0973 | 284 | } |
6a9e1d42 | 285 | |
223b24e6 | 286 | .video-info-likes-dislikes-bar-outer-container { |
2de7f588 RK |
287 | position: relative; |
288 | } | |
289 | ||
223b24e6 | 290 | .video-info-likes-dislikes-bar-inner-container { |
2de7f588 | 291 | position: absolute; |
223b24e6 | 292 | height: 20px; |
2de7f588 RK |
293 | } |
294 | ||
1f788f20 | 295 | .video-info-likes-dislikes-bar { |
2d9fea16 RK |
296 | $likes-bar-height: 2px; |
297 | height: $likes-bar-height; | |
298 | margin-top: -$likes-bar-height; | |
0240da5c RK |
299 | width: 120px; |
300 | background-color: #ccc; | |
2d9fea16 RK |
301 | position: relative; |
302 | top: 10px; | |
6a9e1d42 | 303 | |
1f788f20 C |
304 | .likes-bar { |
305 | height: 100%; | |
0240da5c RK |
306 | background-color: #909090; |
307 | ||
308 | &.liked { | |
e66883b3 | 309 | background-color: pvar(--activatedActionButtonColor); |
0240da5c | 310 | } |
1f788f20 | 311 | } |
6a9e1d42 C |
312 | } |
313 | } | |
d1992b93 C |
314 | } |
315 | ||
dd4f25ee | 316 | .video-attributes { |
b0c43e36 | 317 | @include margin-left($video-watch-info-margin-left); |
dd4f25ee RK |
318 | } |
319 | ||
1f788f20 C |
320 | .video-attributes .video-attribute { |
321 | font-size: 13px; | |
322 | display: block; | |
323 | margin-bottom: 12px; | |
324 | ||
325 | .video-attribute-label { | |
27bc9586 C |
326 | @include padding-right(5px); |
327 | ||
adb115f5 | 328 | min-width: 142px; |
1f788f20 | 329 | display: inline-block; |
e66883b3 | 330 | color: pvar(--greyForegroundColor); |
1f788f20 | 331 | font-weight: $font-bold; |
3eeeb87f | 332 | } |
4278710d C |
333 | |
334 | a.video-attribute-value { | |
335 | @include disable-default-a-behaviour; | |
e66883b3 | 336 | color: pvar(--mainForegroundColor); |
4278710d C |
337 | |
338 | &:hover { | |
339 | opacity: 0.9; | |
340 | } | |
341 | } | |
342 | ||
343 | &.video-attribute-tags { | |
344 | .video-attribute-value:not(:nth-child(2)) { | |
345 | &::before { | |
931d3430 | 346 | content: ', '; |
4278710d C |
347 | } |
348 | } | |
349 | } | |
3eeeb87f | 350 | } |
41c3dfac | 351 | } |
0f7407d9 | 352 | } |
41c3dfac | 353 | |
0f7407d9 | 354 | my-recommended-videos { |
27bc9586 C |
355 | @include padding-left(15px); |
356 | ||
0f7407d9 | 357 | display: block; |
0f7407d9 | 358 | min-width: 250px; |
d1992b93 | 359 | } |
41c3dfac | 360 | |
1d6587aa C |
361 | my-video-comments { |
362 | display: inline-block; | |
66467298 | 363 | width: 100%; |
1d6587aa C |
364 | margin-bottom: 20px; |
365 | } | |
366 | ||
07fa4c97 | 367 | @media screen and (max-width: 1600px) { |
8ff3f883 C |
368 | .video-bottom .video-info .video-attributes .video-attribute { |
369 | margin-bottom: 5px; | |
b9828abe C |
370 | } |
371 | } | |
b2731bff | 372 | |
0f7407d9 | 373 | // Use the same breakpoint than in the typescript component to display the other video miniatures as row |
9a18a625 | 374 | @media screen and (max-width: 1100px) { |
3143ae17 C |
375 | #video-wrapper { |
376 | flex-direction: column; | |
377 | justify-content: center; | |
378 | ||
03652b31 | 379 | my-video-watch-playlist ::ng-deep .playlist { |
3143ae17 C |
380 | @include playlist-below-player; |
381 | } | |
382 | } | |
383 | ||
9a18a625 C |
384 | .video-bottom { |
385 | flex-direction: column; | |
0f7407d9 | 386 | } |
9a18a625 | 387 | |
0f7407d9 | 388 | my-recommended-videos { |
27bc9586 | 389 | @include padding-left(0); |
9a18a625 C |
390 | } |
391 | } | |
392 | ||
1f788f20 | 393 | @media screen and (max-width: 600px) { |
b2731bff | 394 | .video-bottom { |
c2a89b70 | 395 | margin-top: 20px !important; |
46788f21 | 396 | padding-bottom: 20px !important; |
1f788f20 C |
397 | |
398 | .video-info { | |
93ea9c47 | 399 | padding: 0; |
1f788f20 C |
400 | |
401 | .video-info-first-row { | |
402 | ||
403 | .video-info-name { | |
404 | font-size: 20px; | |
405 | height: auto; | |
406 | } | |
407 | } | |
408 | } | |
b2731bff C |
409 | } |
410 | } | |
07fa4c97 C |
411 | |
412 | @media screen and (max-width: 450px) { | |
93ea9c47 C |
413 | .video-bottom { |
414 | .action-button .icon-text { | |
415 | display: none !important; | |
416 | } | |
417 | ||
418 | .video-info .video-info-first-row { | |
419 | .video-info-name { | |
420 | font-size: 18px; | |
421 | } | |
422 | ||
423 | .video-info-date-views { | |
424 | font-size: 14px; | |
425 | } | |
426 | ||
427 | .video-actions-rates { | |
428 | margin-top: 10px; | |
429 | } | |
430 | } | |
07fa4c97 C |
431 | } |
432 | } | |
d45f3641 C |
433 | |
434 | ||
435 | // Special case for iOS, that takes into account the width for fullscreens | |
436 | #video-wrapper ::ng-deep .video-js.vjs-fullscreen { | |
437 | max-width: unset; | |
438 | } |