]>
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 | @function getPlayerHeight ($width) { | |
8 | @return calc(#{$width} / #{$video-watch-player-factor}); | |
9 | } | |
10 | ||
11 | @function getPlayerWidth ($height) { | |
12 | @return calc(#{$height} * #{$video-watch-player-factor}); | |
13 | } | |
14 | ||
15 | @mixin playlist-below-player { | |
16 | width: 100% !important; | |
17 | height: auto !important; | |
18 | max-height: 300px !important; | |
19 | max-width: initial; | |
20 | border-bottom: 1px solid $separator-border-color !important; | |
21 | } | |
22 | ||
23 | .root { | |
24 | &.theater-enabled #video-wrapper { | |
25 | $height: calc(100vh - #{$header-height} - #{$theater-bottom-space}); | |
26 | ||
27 | flex-direction: column; | |
28 | justify-content: center; | |
29 | ||
30 | #videojs-wrapper { | |
31 | width: 100%; | |
32 | height: $height; | |
33 | } | |
34 | ||
35 | ::ng-deep .video-js { | |
36 | height: $height; | |
37 | width: 100%; | |
38 | max-width: initial; | |
39 | } | |
40 | ||
41 | my-video-watch-playlist ::ng-deep .playlist { | |
42 | @include playlist-below-player; | |
43 | } | |
44 | } | |
45 | } | |
46 | ||
47 | .blocked-label { | |
48 | font-weight: $font-semibold; | |
49 | } | |
50 | ||
51 | .placeholder-image { | |
52 | height: 100%; | |
53 | } | |
54 | ||
55 | #video-wrapper { | |
56 | $video-height: 66vh; | |
57 | ||
58 | background-color: #000; | |
59 | display: flex; | |
60 | justify-content: center; | |
61 | ||
62 | #videojs-wrapper { | |
63 | display: flex; | |
64 | justify-content: center; | |
65 | flex-grow: 1; | |
66 | height: $video-height; | |
67 | } | |
68 | ||
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%; | |
78 | font-size: 24px; | |
79 | height: 500px; | |
80 | ||
81 | @media screen and (max-width: 1000px) { | |
82 | font-size: 20px; | |
83 | } | |
84 | ||
85 | @media screen and (max-width: 600px) { | |
86 | font-size: 16px; | |
87 | } | |
88 | } | |
89 | ||
90 | ::ng-deep .video-js { | |
91 | width: 100%; | |
92 | max-width: getPlayerWidth(66vh); | |
93 | height: $video-height; | |
94 | ||
95 | // VideoJS create an inner video player | |
96 | video { | |
97 | outline: 0; | |
98 | position: relative !important; | |
99 | } | |
100 | } | |
101 | ||
102 | @media screen and (max-width: 600px) { | |
103 | #videojs-wrapper { | |
104 | height: getPlayerHeight(100vw) !important; | |
105 | } | |
106 | ||
107 | .remote-server-down, | |
108 | ::ng-deep .video-js { | |
109 | width: 100vw; | |
110 | height: getPlayerHeight(100vw) !important; | |
111 | } | |
112 | } | |
113 | } | |
114 | ||
115 | .alert { | |
116 | text-align: center; | |
117 | border-radius: 0; | |
118 | } | |
119 | ||
120 | .flex-direction-column { | |
121 | flex-direction: column; | |
122 | } | |
123 | ||
124 | #video-not-found { | |
125 | height: 300px; | |
126 | line-height: 300px; | |
127 | margin-top: 50px; | |
128 | text-align: center; | |
129 | font-weight: $font-semibold; | |
130 | font-size: 15px; | |
131 | } | |
132 | ||
133 | .video-bottom { | |
134 | display: flex; | |
135 | margin-top: 1.5rem; | |
136 | ||
137 | .video-info { | |
138 | flex-grow: 1; | |
139 | // Set min width for flex item | |
140 | min-width: 1px; | |
141 | max-width: 100%; | |
142 | ||
143 | .video-info-first-row { | |
144 | display: flex; | |
145 | ||
146 | > div:first-child { | |
147 | flex-grow: 1; | |
148 | } | |
149 | ||
150 | .video-info-name { | |
151 | @include peertube-word-wrap; | |
152 | ||
153 | @include margin-right(30px); | |
154 | min-height: 40px; // Align with the action buttons | |
155 | font-size: 27px; | |
156 | font-weight: $font-semibold; | |
157 | flex-grow: 1; | |
158 | } | |
159 | ||
160 | .video-info-first-row-bottom { | |
161 | display: flex; | |
162 | flex-wrap: wrap; | |
163 | align-items: center; | |
164 | width: 100%; | |
165 | } | |
166 | ||
167 | .video-info-date-views { | |
168 | @include margin-right(10px); | |
169 | ||
170 | margin-bottom: 10px; | |
171 | align-self: start; | |
172 | font-size: 1em; | |
173 | } | |
174 | ||
175 | .video-info-channel { | |
176 | font-weight: $font-semibold; | |
177 | font-size: 15px; | |
178 | ||
179 | a { | |
180 | @include disable-default-a-behaviour; | |
181 | @include peertube-word-wrap; | |
182 | ||
183 | color: pvar(--mainForegroundColor); | |
184 | ||
185 | &:hover { | |
186 | opacity: 0.8; | |
187 | } | |
188 | } | |
189 | ||
190 | .video-info-channel-left { | |
191 | flex-grow: 1; | |
192 | ||
193 | .video-info-channel-left-links { | |
194 | display: flex; | |
195 | flex-direction: column; | |
196 | position: relative; | |
197 | line-height: 1.37; | |
198 | ||
199 | a:nth-of-type(2) { | |
200 | font-weight: $font-regular; | |
201 | font-size: 90%; | |
202 | } | |
203 | ||
204 | a.single-link { | |
205 | margin-top: 7px; | |
206 | } | |
207 | } | |
208 | } | |
209 | ||
210 | my-subscribe-button { | |
211 | @include margin-left(5px); | |
212 | } | |
213 | } | |
214 | ||
215 | .video-actions-rates { | |
216 | @include margin-left(auto); | |
217 | @include margin-right(0); | |
218 | ||
219 | margin-top: 0; | |
220 | margin-bottom: 10px; | |
221 | ||
222 | align-items: start; | |
223 | width: max-content; | |
224 | ||
225 | .video-actions { | |
226 | height: 40px; // Align with the title | |
227 | display: flex; | |
228 | align-items: center; | |
229 | ||
230 | .action-button:not(:first-child), | |
231 | .action-dropdown, | |
232 | my-video-actions-dropdown { | |
233 | @include margin-left(5px); | |
234 | } | |
235 | ||
236 | ::ng-deep.action-button { | |
237 | @include peertube-button; | |
238 | @include button-with-icon(21px, 0, -1px); | |
239 | ||
240 | font-size: 100%; | |
241 | font-weight: $font-semibold; | |
242 | display: inline-block; | |
243 | padding: 0 10px; | |
244 | white-space: nowrap; | |
245 | background-color: transparent !important; | |
246 | color: pvar(--actionButtonColor); | |
247 | text-transform: uppercase; | |
248 | ||
249 | &::after { | |
250 | display: none; | |
251 | } | |
252 | ||
253 | &:hover { | |
254 | opacity: 0.9; | |
255 | } | |
256 | ||
257 | &.action-button-support { | |
258 | color: pvar(--supportButtonColor); | |
259 | ||
260 | my-global-icon { | |
261 | @include apply-svg-color(pvar(--supportButtonColor)); | |
262 | } | |
263 | } | |
264 | ||
265 | &.action-button-support { | |
266 | my-global-icon { | |
267 | ::ng-deep path:first-child { | |
268 | fill: pvar(--supportButtonHeartColor) !important; | |
269 | } | |
270 | } | |
271 | } | |
272 | ||
273 | &.action-button-save { | |
274 | my-global-icon { | |
275 | top: 0 !important; | |
276 | right: -1px; | |
277 | } | |
278 | } | |
279 | ||
280 | .icon-text { | |
281 | @include margin-left(3px); | |
282 | } | |
283 | } | |
284 | } | |
285 | ||
286 | .video-info-likes-dislikes-bar-outer-container { | |
287 | position: relative; | |
288 | } | |
289 | ||
290 | .video-info-likes-dislikes-bar-inner-container { | |
291 | position: absolute; | |
292 | height: 20px; | |
293 | } | |
294 | ||
295 | .video-info-likes-dislikes-bar { | |
296 | $likes-bar-height: 2px; | |
297 | height: $likes-bar-height; | |
298 | margin-top: -$likes-bar-height; | |
299 | width: 120px; | |
300 | background-color: #ccc; | |
301 | position: relative; | |
302 | top: 10px; | |
303 | ||
304 | .likes-bar { | |
305 | height: 100%; | |
306 | background-color: #909090; | |
307 | ||
308 | &.liked { | |
309 | background-color: pvar(--activatedActionButtonColor); | |
310 | } | |
311 | } | |
312 | } | |
313 | } | |
314 | } | |
315 | ||
316 | .video-attributes { | |
317 | @include margin-left($video-watch-info-margin-left); | |
318 | } | |
319 | ||
320 | .video-attributes .video-attribute { | |
321 | font-size: 13px; | |
322 | display: block; | |
323 | margin-bottom: 12px; | |
324 | ||
325 | .video-attribute-label { | |
326 | @include padding-right(5px); | |
327 | ||
328 | min-width: 142px; | |
329 | display: inline-block; | |
330 | color: pvar(--greyForegroundColor); | |
331 | font-weight: $font-bold; | |
332 | } | |
333 | ||
334 | a.video-attribute-value { | |
335 | @include disable-default-a-behaviour; | |
336 | color: pvar(--mainForegroundColor); | |
337 | ||
338 | &:hover { | |
339 | opacity: 0.9; | |
340 | } | |
341 | } | |
342 | ||
343 | &.video-attribute-tags { | |
344 | .video-attribute-value:not(:nth-child(2)) { | |
345 | &::before { | |
346 | content: ', '; | |
347 | } | |
348 | } | |
349 | } | |
350 | } | |
351 | } | |
352 | } | |
353 | ||
354 | my-recommended-videos { | |
355 | @include padding-left(15px); | |
356 | ||
357 | display: block; | |
358 | min-width: 250px; | |
359 | } | |
360 | ||
361 | my-video-comments { | |
362 | display: inline-block; | |
363 | width: 100%; | |
364 | margin-bottom: 20px; | |
365 | } | |
366 | ||
367 | @media screen and (max-width: 1600px) { | |
368 | .video-bottom .video-info .video-attributes .video-attribute { | |
369 | margin-bottom: 5px; | |
370 | } | |
371 | } | |
372 | ||
373 | // Use the same breakpoint than in the typescript component to display the other video miniatures as row | |
374 | @media screen and (max-width: 1100px) { | |
375 | #video-wrapper { | |
376 | flex-direction: column; | |
377 | justify-content: center; | |
378 | ||
379 | my-video-watch-playlist ::ng-deep .playlist { | |
380 | @include playlist-below-player; | |
381 | } | |
382 | } | |
383 | ||
384 | .video-bottom { | |
385 | flex-direction: column; | |
386 | } | |
387 | ||
388 | my-recommended-videos { | |
389 | @include padding-left(0); | |
390 | } | |
391 | } | |
392 | ||
393 | @media screen and (max-width: 600px) { | |
394 | .video-bottom { | |
395 | margin-top: 20px !important; | |
396 | padding-bottom: 20px !important; | |
397 | ||
398 | .video-info { | |
399 | padding: 0; | |
400 | ||
401 | .video-info-first-row { | |
402 | ||
403 | .video-info-name { | |
404 | font-size: 20px; | |
405 | height: auto; | |
406 | } | |
407 | } | |
408 | } | |
409 | } | |
410 | } | |
411 | ||
412 | @media screen and (max-width: 450px) { | |
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 | } | |
431 | } | |
432 | } | |
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 | } |