]>
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 | |
d4f0b2ec C |
7 | $video-height: 66vh; |
8 | ||
931d3430 | 9 | @function getPlayerHeight ($width) { |
b0c43e36 | 10 | @return calc(#{$width} / #{$video-watch-player-factor}); |
9a18a625 C |
11 | } |
12 | ||
931d3430 | 13 | @function getPlayerWidth ($height) { |
b0c43e36 | 14 | @return calc(#{$height} * #{$video-watch-player-factor}); |
9a18a625 C |
15 | } |
16 | ||
17 | @mixin playlist-below-player { | |
72675ebe C |
18 | width: 100% !important; |
19 | height: auto !important; | |
20 | max-height: 300px !important; | |
67c68723 | 21 | max-width: initial; |
72675ebe | 22 | border-bottom: 1px solid $separator-border-color !important; |
9a18a625 C |
23 | } |
24 | ||
d4f0b2ec C |
25 | .blocked-label { |
26 | font-weight: $font-semibold; | |
27 | } | |
28 | ||
29 | .placeholder-image { | |
30 | height: 100%; | |
31 | } | |
32 | ||
33 | .alert { | |
34 | text-align: center; | |
35 | border-radius: 0; | |
36 | } | |
37 | ||
38 | .flex-direction-column { | |
39 | flex-direction: column; | |
40 | } | |
41 | ||
9a18a625 | 42 | .root { |
9a18a625 | 43 | &.theater-enabled #video-wrapper { |
931d3430 C |
44 | $height: calc(100vh - #{$header-height} - #{$theater-bottom-space}); |
45 | ||
9a18a625 C |
46 | flex-direction: column; |
47 | justify-content: center; | |
48 | ||
49 | #videojs-wrapper { | |
50 | width: 100%; | |
f8c00564 | 51 | height: $height; |
9a18a625 C |
52 | } |
53 | ||
03652b31 | 54 | ::ng-deep .video-js { |
9a18a625 C |
55 | height: $height; |
56 | width: 100%; | |
466e3f20 | 57 | max-width: initial; |
9a18a625 C |
58 | } |
59 | ||
03652b31 | 60 | my-video-watch-playlist ::ng-deep .playlist { |
9a18a625 C |
61 | @include playlist-below-player; |
62 | } | |
63 | } | |
191764f3 C |
64 | } |
65 | ||
e2f01c47 | 66 | #video-wrapper { |
be6a4802 C |
67 | background-color: #000; |
68 | display: flex; | |
69 | justify-content: center; | |
6d88de72 | 70 | |
03652b31 | 71 | ::ng-deep .video-js { |
58f3c3f1 | 72 | width: 100%; |
d4f0b2ec | 73 | max-width: getPlayerWidth($video-height); |
a5cf76af | 74 | height: $video-height; |
3b492bff | 75 | |
7b272fd7 C |
76 | // VideoJS create an inner video player |
77 | video { | |
78 | outline: 0; | |
b9828abe | 79 | position: relative !important; |
7b272fd7 | 80 | } |
be6a4802 | 81 | } |
e56b20f5 C |
82 | } |
83 | ||
d4f0b2ec C |
84 | #videojs-wrapper { |
85 | display: flex; | |
86 | justify-content: center; | |
87 | flex-grow: 1; | |
88 | height: $video-height; | |
2186386c C |
89 | } |
90 | ||
d4f0b2ec C |
91 | .remote-server-down { |
92 | color: #fff; | |
93 | display: flex; | |
7fc441cc | 94 | flex-direction: column; |
d4f0b2ec C |
95 | align-items: center; |
96 | text-align: center; | |
97 | justify-content: center; | |
98 | background-color: #141313; | |
99 | width: 100%; | |
100 | font-size: 24px; | |
101 | height: 500px; | |
102 | ||
103 | @media screen and (max-width: 1000px) { | |
104 | font-size: 20px; | |
105 | } | |
106 | ||
107 | @media screen and (max-width: 600px) { | |
108 | font-size: 16px; | |
109 | } | |
7fc441cc RK |
110 | } |
111 | ||
9c89a45c C |
112 | #video-not-found { |
113 | height: 300px; | |
114 | line-height: 300px; | |
115 | margin-top: 50px; | |
116 | text-align: center; | |
fb4fd623 C |
117 | font-weight: $font-semibold; |
118 | font-size: 15px; | |
9c89a45c C |
119 | } |
120 | ||
b1fa3eba | 121 | .video-bottom { |
9a18a625 | 122 | display: flex; |
46788f21 | 123 | margin-top: 1.5rem; |
d4f0b2ec | 124 | } |
d1992b93 | 125 | |
d4f0b2ec C |
126 | .video-info { |
127 | flex-grow: 1; | |
128 | // Set min width for flex item | |
129 | min-width: 1px; | |
130 | max-width: 100%; | |
131 | } | |
132 | ||
133 | .video-info-first-row { | |
134 | display: flex; | |
135 | ||
136 | > div:first-child { | |
b1fa3eba | 137 | flex-grow: 1; |
d4f0b2ec C |
138 | } |
139 | } | |
140 | ||
141 | .video-info-name { | |
142 | @include peertube-word-wrap; | |
143 | ||
144 | @include margin-right(30px); | |
145 | ||
146 | min-height: 40px; // Align with the action buttons | |
147 | font-size: 27px; | |
148 | font-weight: $font-semibold; | |
149 | flex-grow: 1; | |
150 | } | |
151 | ||
152 | .video-info-first-row-bottom { | |
153 | display: flex; | |
154 | flex-wrap: wrap; | |
155 | align-items: center; | |
156 | width: 100%; | |
157 | } | |
158 | ||
159 | .video-info-date-views { | |
160 | @include margin-right(10px); | |
161 | ||
162 | margin-bottom: 10px; | |
163 | align-self: start; | |
164 | font-size: 1em; | |
165 | } | |
166 | ||
167 | .video-info-channel { | |
168 | font-weight: $font-semibold; | |
169 | font-size: 15px; | |
170 | ||
171 | a { | |
172 | @include disable-default-a-behaviour; | |
173 | @include peertube-word-wrap; | |
174 | ||
175 | color: pvar(--mainForegroundColor); | |
176 | ||
177 | &:hover { | |
178 | opacity: 0.8; | |
179 | } | |
180 | } | |
181 | } | |
182 | ||
183 | .video-info-channel-left { | |
184 | flex-grow: 1; | |
185 | ||
186 | .video-info-channel-left-links { | |
187 | display: flex; | |
188 | flex-direction: column; | |
189 | position: relative; | |
190 | line-height: 1.37; | |
191 | ||
192 | a:nth-of-type(2) { | |
193 | font-weight: $font-regular; | |
194 | font-size: 90%; | |
d1992b93 C |
195 | } |
196 | ||
d4f0b2ec C |
197 | a.single-link { |
198 | margin-top: 7px; | |
dd4f25ee | 199 | } |
d4f0b2ec C |
200 | } |
201 | } | |
202 | ||
203 | my-subscribe-button { | |
204 | @include margin-left(5px); | |
205 | } | |
206 | ||
207 | .video-attributes { | |
208 | @include margin-left($video-watch-info-margin-left); | |
209 | ||
210 | .video-attribute { | |
211 | font-size: 13px; | |
212 | display: block; | |
213 | margin-bottom: 12px; | |
214 | } | |
215 | } | |
216 | ||
217 | .video-attribute-label { | |
218 | @include padding-right(5px); | |
dd4f25ee | 219 | |
d4f0b2ec C |
220 | min-width: 142px; |
221 | display: inline-block; | |
222 | color: pvar(--greyForegroundColor); | |
223 | font-weight: $font-bold; | |
224 | } | |
225 | ||
226 | a.video-attribute-value { | |
227 | @include disable-default-a-behaviour; | |
228 | color: pvar(--mainForegroundColor); | |
229 | ||
230 | &:hover { | |
231 | opacity: 0.9; | |
232 | } | |
233 | } | |
234 | ||
235 | .video-attribute-tags { | |
236 | .video-attribute-value:not(:nth-child(2)) { | |
237 | &::before { | |
238 | content: ', '; | |
3eeeb87f | 239 | } |
41c3dfac | 240 | } |
0f7407d9 | 241 | } |
41c3dfac | 242 | |
06a55579 C |
243 | my-action-buttons { |
244 | @include margin-left(auto); | |
245 | @include margin-right(0); | |
246 | ||
247 | display: block; | |
248 | margin-top: 0; | |
249 | margin-bottom: 10px; | |
250 | ||
251 | align-items: start; | |
252 | width: max-content; | |
253 | } | |
254 | ||
0f7407d9 | 255 | my-recommended-videos { |
27bc9586 C |
256 | @include padding-left(15px); |
257 | ||
0f7407d9 | 258 | display: block; |
0f7407d9 | 259 | min-width: 250px; |
d1992b93 | 260 | } |
41c3dfac | 261 | |
1d6587aa C |
262 | my-video-comments { |
263 | display: inline-block; | |
66467298 | 264 | width: 100%; |
1d6587aa C |
265 | margin-bottom: 20px; |
266 | } | |
267 | ||
07fa4c97 | 268 | @media screen and (max-width: 1600px) { |
d4f0b2ec | 269 | .video-attributes .video-attribute { |
8ff3f883 | 270 | margin-bottom: 5px; |
b9828abe C |
271 | } |
272 | } | |
b2731bff | 273 | |
0f7407d9 | 274 | // Use the same breakpoint than in the typescript component to display the other video miniatures as row |
9a18a625 | 275 | @media screen and (max-width: 1100px) { |
3143ae17 C |
276 | #video-wrapper { |
277 | flex-direction: column; | |
278 | justify-content: center; | |
279 | ||
03652b31 | 280 | my-video-watch-playlist ::ng-deep .playlist { |
3143ae17 C |
281 | @include playlist-below-player; |
282 | } | |
283 | } | |
284 | ||
9a18a625 C |
285 | .video-bottom { |
286 | flex-direction: column; | |
0f7407d9 | 287 | } |
9a18a625 | 288 | |
0f7407d9 | 289 | my-recommended-videos { |
27bc9586 | 290 | @include padding-left(0); |
9a18a625 C |
291 | } |
292 | } | |
293 | ||
1f788f20 | 294 | @media screen and (max-width: 600px) { |
d4f0b2ec C |
295 | #videojs-wrapper { |
296 | height: getPlayerHeight(100vw) !important; | |
297 | ||
298 | .remote-server-down, | |
299 | ::ng-deep .video-js { | |
300 | width: 100vw; | |
301 | height: getPlayerHeight(100vw) !important; | |
302 | } | |
303 | } | |
304 | ||
b2731bff | 305 | .video-bottom { |
c2a89b70 | 306 | margin-top: 20px !important; |
46788f21 | 307 | padding-bottom: 20px !important; |
d4f0b2ec | 308 | } |
1f788f20 | 309 | |
d4f0b2ec C |
310 | .video-info { |
311 | padding: 0; | |
312 | } | |
1f788f20 | 313 | |
d4f0b2ec C |
314 | .video-info-name { |
315 | font-size: 20px; | |
316 | height: auto; | |
b2731bff C |
317 | } |
318 | } | |
07fa4c97 C |
319 | |
320 | @media screen and (max-width: 450px) { | |
d4f0b2ec C |
321 | .video-info-name { |
322 | font-size: 18px; | |
323 | } | |
324 | ||
325 | .video-info-date-views { | |
326 | font-size: 14px; | |
07fa4c97 | 327 | } |
06a55579 C |
328 | |
329 | my-action-buttons { | |
330 | margin-top: 10px; | |
331 | } | |
07fa4c97 | 332 | } |
d45f3641 | 333 | |
d45f3641 C |
334 | // Special case for iOS, that takes into account the width for fullscreens |
335 | #video-wrapper ::ng-deep .video-js.vjs-fullscreen { | |
336 | max-width: unset; | |
337 | } |