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