]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - client/src/app/+videos/+video-watch/video-watch.component.scss
Move watch action buttons in a dedicated component
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-watch / video-watch.component.scss
... / ...
CommitLineData
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
155 min-height: 40px; // Align with the action buttons
156 font-size: 27px;
157 font-weight: $font-semibold;
158 flex-grow: 1;
159 }
160
161 .video-info-first-row-bottom {
162 display: flex;
163 flex-wrap: wrap;
164 align-items: center;
165 width: 100%;
166 }
167
168 .video-info-date-views {
169 @include margin-right(10px);
170
171 margin-bottom: 10px;
172 align-self: start;
173 font-size: 1em;
174 }
175
176 .video-info-channel {
177 font-weight: $font-semibold;
178 font-size: 15px;
179
180 a {
181 @include disable-default-a-behaviour;
182 @include peertube-word-wrap;
183
184 color: pvar(--mainForegroundColor);
185
186 &:hover {
187 opacity: 0.8;
188 }
189 }
190
191 .video-info-channel-left {
192 flex-grow: 1;
193
194 .video-info-channel-left-links {
195 display: flex;
196 flex-direction: column;
197 position: relative;
198 line-height: 1.37;
199
200 a:nth-of-type(2) {
201 font-weight: $font-regular;
202 font-size: 90%;
203 }
204
205 a.single-link {
206 margin-top: 7px;
207 }
208 }
209 }
210
211 my-subscribe-button {
212 @include margin-left(5px);
213 }
214 }
215 }
216
217 .video-attributes {
218 @include margin-left($video-watch-info-margin-left);
219 }
220
221 .video-attributes .video-attribute {
222 font-size: 13px;
223 display: block;
224 margin-bottom: 12px;
225
226 .video-attribute-label {
227 @include padding-right(5px);
228
229 min-width: 142px;
230 display: inline-block;
231 color: pvar(--greyForegroundColor);
232 font-weight: $font-bold;
233 }
234
235 a.video-attribute-value {
236 @include disable-default-a-behaviour;
237 color: pvar(--mainForegroundColor);
238
239 &:hover {
240 opacity: 0.9;
241 }
242 }
243
244 &.video-attribute-tags {
245 .video-attribute-value:not(:nth-child(2)) {
246 &::before {
247 content: ', ';
248 }
249 }
250 }
251 }
252 }
253}
254
255my-action-buttons {
256 @include margin-left(auto);
257 @include margin-right(0);
258
259 display: block;
260 margin-top: 0;
261 margin-bottom: 10px;
262
263 align-items: start;
264 width: max-content;
265}
266
267my-recommended-videos {
268 @include padding-left(15px);
269
270 display: block;
271 min-width: 250px;
272}
273
274my-video-comments {
275 display: inline-block;
276 width: 100%;
277 margin-bottom: 20px;
278}
279
280@media screen and (max-width: 1600px) {
281 .video-bottom .video-info .video-attributes .video-attribute {
282 margin-bottom: 5px;
283 }
284}
285
286// Use the same breakpoint than in the typescript component to display the other video miniatures as row
287@media screen and (max-width: 1100px) {
288 #video-wrapper {
289 flex-direction: column;
290 justify-content: center;
291
292 my-video-watch-playlist ::ng-deep .playlist {
293 @include playlist-below-player;
294 }
295 }
296
297 .video-bottom {
298 flex-direction: column;
299 }
300
301 my-recommended-videos {
302 @include padding-left(0);
303 }
304}
305
306@media screen and (max-width: 600px) {
307 .video-bottom {
308 margin-top: 20px !important;
309 padding-bottom: 20px !important;
310
311 .video-info {
312 padding: 0;
313
314 .video-info-first-row {
315
316 .video-info-name {
317 font-size: 20px;
318 height: auto;
319 }
320 }
321 }
322 }
323}
324
325@media screen and (max-width: 450px) {
326 .video-bottom {
327 .video-info .video-info-first-row {
328 .video-info-name {
329 font-size: 18px;
330 }
331
332 .video-info-date-views {
333 font-size: 14px;
334 }
335 }
336 }
337
338 my-action-buttons {
339 margin-top: 10px;
340 }
341}
342
343
344// Special case for iOS, that takes into account the width for fullscreens
345#video-wrapper ::ng-deep .video-js.vjs-fullscreen {
346 max-width: unset;
347}