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