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