]>
Commit | Line | Data |
---|---|---|
63c4db6d C |
1 | @import '_variables'; |
2 | ||
26c6ee80 | 3 | @mixin disable-default-a-behaviour { |
cadb46d8 | 4 | &:hover, &:focus, &:active { |
26c6ee80 C |
5 | text-decoration: none !important; |
6 | outline: none !important; | |
7 | } | |
8 | } | |
c30745f3 | 9 | |
3ec8dc09 | 10 | @mixin disable-outline { |
e78980eb RK |
11 | &:focus:not(.focus-visible) { |
12 | outline: none; | |
13 | } | |
3ec8dc09 C |
14 | } |
15 | ||
ef80c66c C |
16 | @mixin ellipsis { |
17 | white-space: nowrap; | |
18 | overflow: hidden; | |
19 | text-overflow: ellipsis; | |
20 | } | |
0c9945d9 C |
21 | |
22 | @mixin ellipsis-multiline($font-size: 16px, $number-of-lines: 2) { | |
769ac6c1 RK |
23 | display: block; |
24 | /* Fallback for non-webkit */ | |
25 | display: -webkit-box; | |
0c9945d9 | 26 | max-height: $font-size * $number-of-lines; |
769ac6c1 RK |
27 | /* Fallback for non-webkit */ |
28 | font-size: $font-size; | |
8fc02e47 | 29 | line-height: $font-size; |
769ac6c1 RK |
30 | overflow: hidden; |
31 | text-overflow: ellipsis; | |
32 | } | |
33 | ||
34 | @mixin prefix($property, $parameters...) { | |
35 | @each $prefix in -webkit-, -moz-, -ms-, -o-, "" { | |
36 | #{$prefix}#{$property}: $parameters; | |
37 | } | |
38 | } | |
39 | ||
7a14004b | 40 | @mixin peertube-word-wrap { |
fc641ded | 41 | word-break: break-word; |
7a14004b C |
42 | word-wrap: break-word; |
43 | overflow-wrap: break-word; | |
44 | -webkit-hyphens: auto; | |
45 | -ms-hyphens: auto; | |
46 | -moz-hyphens: auto; | |
47 | hyphens: auto; | |
7a14004b C |
48 | } |
49 | ||
457bb213 | 50 | @mixin apply-svg-color ($color) { |
c41c0e28 RK |
51 | ::ng-deep .feather, |
52 | ::ng-deep .material { | |
53 | color: $color; | |
54 | } | |
55 | ||
03652b31 | 56 | ::ng-deep svg { |
81fe3c67 RK |
57 | path[fill="#000"], |
58 | g[fill="#000"], | |
59 | rect[fill="#000"], | |
60 | circle[fill="#000"], | |
61 | polygon[fill="#000"] { | |
457bb213 C |
62 | fill: $color; |
63 | } | |
64 | ||
81fe3c67 RK |
65 | path[stroke="#000"], |
66 | g[stroke="#000"], | |
67 | rect[stroke="#000"], | |
68 | circle[stroke="#000"], | |
69 | polygon[stroke="#000"] { | |
457bb213 C |
70 | stroke: $color; |
71 | } | |
a55052c9 | 72 | |
81fe3c67 | 73 | stop[stop-color="#000"] { |
a55052c9 C |
74 | stop-color: $color; |
75 | } | |
457bb213 C |
76 | } |
77 | } | |
78 | ||
d3217560 RK |
79 | @mixin fill-svg-color ($color) { |
80 | ::ng-deep svg { | |
81 | path { | |
82 | fill: $color; | |
83 | } | |
84 | } | |
85 | } | |
86 | ||
a6d5ff76 RK |
87 | @mixin button-focus($color) { |
88 | &:focus, | |
e40afb5b | 89 | &.focus-visible { |
6a4c30de | 90 | box-shadow: #{$focus-box-shadow-form} $color; |
e40afb5b RK |
91 | } |
92 | } | |
93 | ||
c30745f3 C |
94 | @mixin peertube-input-text($width) { |
95 | display: inline-block; | |
96 | height: $button-height; | |
97 | width: $width; | |
e66883b3 RK |
98 | color: pvar(--inputForegroundColor); |
99 | background-color: pvar(--inputBackgroundColor); | |
c30745f3 C |
100 | border: 1px solid #C6C6C6; |
101 | border-radius: 3px; | |
102 | padding-left: 15px; | |
15ca2e87 | 103 | padding-right: 15px; |
17bb716b | 104 | font-size: 15px; |
9a0fc840 RK |
105 | |
106 | &::placeholder { | |
e66883b3 | 107 | color: pvar(--inputPlaceholderColor); |
9a0fc840 | 108 | } |
2860e62e | 109 | |
767bb14a C |
110 | &[readonly] { |
111 | opacity: 0.7; | |
112 | } | |
113 | ||
2860e62e C |
114 | @media screen and (max-width: $width) { |
115 | width: 100%; | |
116 | } | |
8a19bee1 | 117 | } |
c30745f3 | 118 | |
8a19bee1 C |
119 | @mixin peertube-input-group($width) { |
120 | width: $width; | |
2a53942d | 121 | min-height: $button-height; |
8a19bee1 C |
122 | padding-top: 0; |
123 | padding-bottom: 0; | |
832a12b0 | 124 | flex-wrap: nowrap; |
8a19bee1 C |
125 | |
126 | .input-group-text{ | |
127 | font-size: 14px; | |
9a0fc840 | 128 | color: gray; |
c30745f3 C |
129 | } |
130 | } | |
131 | ||
5f0805d3 C |
132 | @mixin peertube-textarea ($width, $height) { |
133 | @include peertube-input-text($width); | |
134 | ||
e66883b3 RK |
135 | color: pvar(--textareaForegroundColor); |
136 | background-color: pvar(--textareaBackgroundColor); | |
5f0805d3 C |
137 | height: $height; |
138 | padding: 5px 15px; | |
139 | font-size: 15px; | |
140 | } | |
141 | ||
7b272fd7 | 142 | @mixin orange-button { |
e66883b3 | 143 | @include button-focus(pvar(--mainColorLightest)); |
e40afb5b | 144 | |
15a7387d C |
145 | &, &:active, &:focus { |
146 | color: #fff; | |
e66883b3 | 147 | background-color: pvar(--mainColor); |
15a7387d | 148 | } |
7b272fd7 | 149 | |
15a7387d | 150 | &:hover { |
0727cab0 | 151 | color: #fff; |
e66883b3 | 152 | background-color: pvar(--mainHoverColor); |
7b272fd7 | 153 | } |
4cc66133 C |
154 | |
155 | &[disabled], &.disabled { | |
156 | cursor: default; | |
cadb46d8 C |
157 | color: #fff; |
158 | background-color: #C6C6C6; | |
4cc66133 | 159 | } |
457bb213 C |
160 | |
161 | my-global-icon { | |
162 | @include apply-svg-color(#fff) | |
163 | } | |
7b272fd7 C |
164 | } |
165 | ||
54e78847 | 166 | @mixin tertiary-button { |
a6d5ff76 RK |
167 | @include button-focus($grey-button-outline-color); |
168 | ||
e66883b3 | 169 | color: pvar(--greyForegroundColor); |
54e78847 RK |
170 | background-color: transparent; |
171 | ||
172 | &[disabled], &.disabled { | |
173 | cursor: default; | |
174 | } | |
175 | ||
176 | my-global-icon { | |
177 | @include apply-svg-color(transparent) | |
178 | } | |
179 | } | |
180 | ||
7b272fd7 | 181 | @mixin grey-button { |
a6d5ff76 | 182 | @include button-focus($grey-button-outline-color); |
1fe1e14c RK |
183 | background-color: $grey-background-color; |
184 | color: pvar(--greyForegroundColor); | |
7b272fd7 | 185 | |
4cc66133 | 186 | &:hover, &:active, &:focus, &[disabled], &.disabled { |
e66883b3 | 187 | color: pvar(--greyForegroundColor); |
457bb213 | 188 | background-color: $grey-background-hover-color; |
7b272fd7 | 189 | } |
4cc66133 C |
190 | |
191 | &[disabled], &.disabled { | |
192 | cursor: default; | |
193 | } | |
457bb213 C |
194 | |
195 | my-global-icon { | |
e66883b3 | 196 | @include apply-svg-color(pvar(--greyForegroundColor)) |
457bb213 | 197 | } |
7b272fd7 C |
198 | } |
199 | ||
1fe1e14c RK |
200 | @mixin danger-button { |
201 | $color: lighten($color: #c54130, $amount: 10); | |
202 | $text: #fff6f5; | |
203 | ||
204 | @include button-focus(scale-color($color, $alpha: -95%)); | |
205 | background-color: $color; | |
206 | color: $text; | |
207 | ||
208 | &:hover, &:active, &:focus, &[disabled], &.disabled { | |
209 | background-color: lighten($color: $color, $amount: 10); | |
210 | } | |
211 | ||
212 | &[disabled], &.disabled { | |
213 | cursor: default; | |
214 | } | |
215 | ||
216 | my-global-icon { | |
217 | @include apply-svg-color($text) | |
218 | } | |
219 | } | |
220 | ||
c30745f3 C |
221 | @mixin peertube-button { |
222 | border: none; | |
c30745f3 C |
223 | font-weight: $font-semibold; |
224 | font-size: 15px; | |
225 | height: $button-height; | |
226 | line-height: $button-height; | |
227 | border-radius: 3px; | |
228 | text-align: center; | |
5beb89f2 | 229 | padding: 0 17px 0 13px; |
c30745f3 C |
230 | cursor: pointer; |
231 | } | |
232 | ||
233 | @mixin peertube-button-link { | |
234 | display: inline-block; | |
235 | ||
c30745f3 | 236 | @include disable-default-a-behaviour; |
ce0e281d | 237 | @include peertube-button; |
c30745f3 | 238 | } |
2295ce6c | 239 | |
aa0f1963 RK |
240 | @mixin peertube-button-outline { |
241 | display: inline-block; | |
242 | ||
243 | @include disable-default-a-behaviour; | |
244 | @include peertube-button; | |
245 | ||
246 | border: 1px solid; | |
247 | } | |
248 | ||
457bb213 C |
249 | @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) { |
250 | my-global-icon { | |
251 | position: relative; | |
252 | width: $width; | |
253 | margin-right: $margin-right; | |
254 | top: $top; | |
255 | } | |
256 | } | |
257 | ||
c5911fd3 C |
258 | @mixin peertube-button-file ($width) { |
259 | position: relative; | |
260 | overflow: hidden; | |
261 | display: inline-block; | |
262 | width: $width; | |
e61151b0 | 263 | min-height: 30px; |
c5911fd3 C |
264 | |
265 | @include peertube-button; | |
c5911fd3 C |
266 | |
267 | input[type=file] { | |
268 | position: absolute; | |
269 | top: 0; | |
270 | right: 0; | |
e61151b0 RK |
271 | width: 100%; |
272 | height: 100%; | |
c5911fd3 C |
273 | font-size: 100px; |
274 | text-align: right; | |
275 | filter: alpha(opacity=0); | |
276 | opacity: 0; | |
277 | outline: none; | |
278 | background: white; | |
279 | cursor: inherit; | |
280 | display: block; | |
281 | } | |
282 | } | |
283 | ||
0727cab0 C |
284 | @mixin icon ($size) { |
285 | display: inline-block; | |
286 | background-repeat: no-repeat; | |
287 | background-size: contain; | |
288 | width: $size; | |
289 | height: $size; | |
290 | vertical-align: middle; | |
291 | cursor: pointer; | |
292 | } | |
4cc66133 | 293 | |
3caf77d3 C |
294 | @mixin select-arrow-down { |
295 | top: 50%; | |
296 | right: calc(0% + 15px); | |
297 | content: " "; | |
298 | height: 0; | |
299 | width: 0; | |
300 | position: absolute; | |
301 | pointer-events: none; | |
302 | border: 5px solid rgba(0, 0, 0, 0); | |
303 | border-top-color: #000; | |
304 | margin-top: -2px; | |
305 | z-index: 100; | |
306 | } | |
307 | ||
52c4976f C |
308 | |
309 | @mixin ng-select ($width) { | |
c9bc850e C |
310 | ::ng-deep &.ng-select, |
311 | ::ng-deep .ng-select { | |
52c4976f C |
312 | width: $width; |
313 | ||
314 | @media screen and (max-width: $width) { | |
315 | width: 100%; | |
316 | } | |
317 | } | |
318 | } | |
319 | ||
15a7387d C |
320 | @mixin peertube-select-container ($width) { |
321 | padding: 0; | |
322 | margin: 0; | |
4cc66133 C |
323 | width: $width; |
324 | border-radius: 3px; | |
e66883b3 RK |
325 | color: pvar(--inputForegroundColor); |
326 | background: pvar(--inputBackgroundColor); | |
15a7387d | 327 | position: relative; |
5f0805d3 | 328 | font-size: 15px; |
15a7387d | 329 | |
2f4c784a C |
330 | &.disabled { |
331 | background-color: #E5E5E5; | |
332 | ||
333 | select { | |
334 | cursor: default; | |
335 | } | |
336 | } | |
337 | ||
2c3abc4f C |
338 | @media screen and (max-width: $width) { |
339 | width: 100%; | |
340 | } | |
341 | ||
15a7387d | 342 | &:after { |
3caf77d3 | 343 | @include select-arrow-down; |
15a7387d C |
344 | } |
345 | ||
346 | select { | |
108af661 | 347 | padding: 0 35px 0 12px; |
15a7387d | 348 | position: relative; |
a6d5ff76 | 349 | border: 1px solid #C6C6C6; |
15a7387d C |
350 | background: transparent none; |
351 | appearance: none; | |
352 | cursor: pointer; | |
353 | height: $button-height; | |
108af661 | 354 | text-overflow: ellipsis; |
e66883b3 | 355 | color: pvar(--mainForegroundColor); |
15a7387d C |
356 | |
357 | &:focus { | |
358 | outline: none; | |
359 | } | |
360 | ||
361 | &:-moz-focusring { | |
362 | color: transparent; | |
363 | text-shadow: 0 0 0 #000; | |
364 | } | |
aa879092 C |
365 | |
366 | option { | |
367 | color: #000; | |
368 | } | |
15a7387d | 369 | } |
654a188f RK |
370 | |
371 | &.peertube-select-button { | |
372 | @include grey-button; | |
373 | ||
374 | select, | |
375 | option { | |
376 | font-weight: $font-semibold; | |
377 | color: pvar(--greyForegroundColor); | |
378 | border: none; | |
379 | } | |
380 | } | |
15a7387d C |
381 | } |
382 | ||
5f0805d3 C |
383 | // Thanks: https://codepen.io/triss90/pen/XNEdRe/ |
384 | @mixin peertube-radio-container { | |
385 | input[type="radio"] { | |
386 | display: none; | |
387 | ||
388 | & + label { | |
389 | font-weight: $font-regular; | |
390 | cursor: pointer; | |
391 | ||
392 | &:before { | |
393 | position: relative; | |
394 | top: -2px; | |
395 | content: ''; | |
396 | background: #fff; | |
397 | border-radius: 100%; | |
398 | border: 1px solid #000; | |
399 | display: inline-block; | |
400 | width: 15px; | |
401 | height: 15px; | |
402 | vertical-align: middle; | |
403 | cursor: pointer; | |
404 | text-align: center; | |
405 | margin-right: 10px; | |
406 | } | |
407 | } | |
408 | ||
409 | &:checked + label:before { | |
410 | background-color: #000; | |
411 | box-shadow: inset 0 0 0 4px #fff; | |
412 | } | |
413 | ||
414 | &:focus + label:before { | |
415 | outline: none; | |
416 | border-color: #000; | |
417 | } | |
418 | } | |
419 | } | |
420 | ||
a0d69908 | 421 | @mixin peertube-checkbox ($border-width) { |
1d5342ab | 422 | opacity: 0; |
776ca9b1 | 423 | position: absolute; |
1d5342ab C |
424 | |
425 | &:focus + span { | |
e66883b3 | 426 | box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest); |
1d5342ab | 427 | } |
a0d69908 | 428 | |
0f7fedc3 | 429 | & + span { |
a0d69908 C |
430 | position: relative; |
431 | width: 18px; | |
bc20aaed | 432 | min-width: 18px; |
a0d69908 | 433 | height: 18px; |
5fd3e00a | 434 | border: $border-width solid #C6C6C6; |
a0d69908 C |
435 | border-radius: 3px; |
436 | vertical-align: middle; | |
437 | cursor: pointer; | |
438 | ||
439 | &:after { | |
440 | content: ''; | |
441 | position: absolute; | |
442 | top: calc(2px - #{$border-width}); | |
443 | left: 5px; | |
444 | width: 5px; | |
445 | height: 12px; | |
446 | opacity: 0; | |
447 | transform: rotate(45deg) scale(0); | |
18c97728 C |
448 | border-right: 2px solid $bg-color; |
449 | border-bottom: 2px solid $bg-color; | |
a0d69908 C |
450 | } |
451 | } | |
452 | ||
0f7fedc3 | 453 | &:checked + span { |
a0d69908 | 454 | border-color: transparent; |
e66883b3 | 455 | background: pvar(--mainColor); |
a0d69908 C |
456 | animation: jelly 0.6s ease; |
457 | ||
458 | &:after { | |
459 | opacity: 1; | |
460 | transform: rotate(45deg) scale(1); | |
461 | } | |
462 | } | |
463 | ||
0f7fedc3 | 464 | & + span + span { |
a0d69908 C |
465 | font-size: 15px; |
466 | font-weight: $font-regular; | |
467 | margin-left: 5px; | |
468 | cursor: pointer; | |
6693df9d | 469 | display: inline; |
a0d69908 | 470 | } |
bbe0f064 | 471 | |
0f7fedc3 C |
472 | &[disabled] + span, |
473 | &[disabled] + span + span{ | |
bbe0f064 C |
474 | opacity: 0.5; |
475 | cursor: default; | |
476 | } | |
a0d69908 C |
477 | } |
478 | ||
654a188f RK |
479 | @mixin table-badge { |
480 | border-radius: 2px; | |
481 | padding: 1/4em 1/2em; | |
482 | text-transform: uppercase; | |
483 | font-weight: $font-bold; | |
484 | font-size: 12px; | |
485 | letter-spacing: 1/3px; | |
486 | ||
487 | &.badge-banned, | |
488 | &.badge-red { | |
489 | background-color: #ffcdd2; | |
490 | color: #c63737; | |
491 | } | |
492 | ||
493 | &.badge-banned { | |
494 | text-decoration: line-through; | |
495 | } | |
496 | ||
497 | &.badge-yellow { | |
498 | background-color: #feedaf; | |
499 | color: #8a5340; | |
500 | } | |
501 | ||
502 | &.badge-brown { | |
503 | background-color: #ffd8b2; | |
504 | color: #805b36; | |
505 | } | |
506 | ||
507 | &.badge-green { | |
508 | background-color: #c8e6c9; | |
509 | color: #256029; | |
510 | } | |
511 | ||
512 | &.badge-blue { | |
513 | background-color: #b3e5fc; | |
514 | color: #23547b; | |
515 | } | |
516 | ||
517 | &.badge-purple { | |
518 | background-color: #eccfff; | |
519 | color: #694382; | |
520 | } | |
521 | } | |
4e8c8728 C |
522 | |
523 | @mixin avatar ($size) { | |
524 | object-fit: cover; | |
a4f99a76 | 525 | border-radius: 50%; |
4e8c8728 C |
526 | width: $size; |
527 | height: $size; | |
6051946e | 528 | min-width: $size; |
fc641ded | 529 | min-height: $size; |
4e8c8728 | 530 | } |
c6352f2c C |
531 | |
532 | @mixin chevron ($size, $border-width) { | |
533 | border-style: solid; | |
534 | border-width: $border-width $border-width 0 0; | |
535 | content: ''; | |
536 | display: inline-block; | |
537 | transform: rotate(-45deg); | |
538 | height: $size; | |
539 | width: $size; | |
540 | } | |
541 | ||
542 | @mixin chevron-right ($size, $border-width) { | |
543 | @include chevron($size, $border-width); | |
544 | ||
545 | left: 0; | |
546 | transform: rotate(45deg); | |
547 | } | |
548 | ||
549 | @mixin chevron-left ($size, $border-width) { | |
550 | @include chevron($size, $border-width); | |
551 | ||
552 | left: 0.25em; | |
553 | transform: rotate(-135deg); | |
554 | } | |
0626e7af C |
555 | |
556 | @mixin in-content-small-title { | |
557 | text-transform: uppercase; | |
e66883b3 | 558 | color: pvar(--mainColor); |
0626e7af C |
559 | font-weight: $font-bold; |
560 | font-size: 13px; | |
170726f5 C |
561 | } |
562 | ||
482fa503 RK |
563 | @mixin settings-big-title { |
564 | text-transform: uppercase; | |
e66883b3 | 565 | color: pvar(--mainColor); |
482fa503 RK |
566 | font-weight: $font-bold; |
567 | font-size: 110%; | |
568 | margin-bottom: 10px; | |
569 | } | |
570 | ||
22a16e36 C |
571 | @mixin actor-owner { |
572 | @include disable-default-a-behaviour; | |
573 | ||
22a16e36 C |
574 | font-size: 13px; |
575 | margin-top: 4px; | |
e66883b3 | 576 | color: pvar(--mainForegroundColor); |
22a16e36 C |
577 | |
578 | span:hover { | |
579 | opacity: 0.8; | |
580 | } | |
581 | ||
582 | img { | |
583 | @include avatar(18px); | |
584 | ||
585 | margin-left: 7px; | |
586 | position: relative; | |
587 | top: -2px; | |
588 | } | |
589 | } | |
590 | ||
170726f5 | 591 | @mixin sub-menu-with-actor { |
e13d7ae4 RK |
592 | position: initial; |
593 | z-index: unset; | |
aa0f1963 | 594 | height: max-content; |
170726f5 C |
595 | display: flex; |
596 | flex-direction: column; | |
41d71344 | 597 | align-items: flex-start; |
170726f5 C |
598 | |
599 | .actor { | |
600 | display: flex; | |
601 | margin-top: 20px; | |
602 | margin-bottom: 20px; | |
603 | ||
604 | img { | |
605 | @include avatar(80px); | |
606 | ||
607 | margin-right: 20px; | |
608 | } | |
609 | ||
610 | .actor-info { | |
611 | display: flex; | |
612 | flex-direction: column; | |
613 | justify-content: center; | |
614 | ||
7de6afdf C |
615 | .actor-names { |
616 | display: flex; | |
617 | align-items: center; | |
9b8a7aa8 | 618 | flex-wrap: wrap; |
7de6afdf C |
619 | |
620 | .actor-display-name { | |
621 | font-size: 23px; | |
622 | font-weight: $font-bold; | |
9b8a7aa8 | 623 | margin-right: 7px; |
7de6afdf C |
624 | } |
625 | ||
626 | .actor-name { | |
7de6afdf C |
627 | position: relative; |
628 | top: 3px; | |
629 | font-size: 14px; | |
22a16e36 | 630 | color: $grey-actor-name; |
7de6afdf | 631 | } |
170726f5 C |
632 | } |
633 | ||
9b8a7aa8 RK |
634 | .actor-lower { |
635 | grid-area: lower; | |
636 | } | |
637 | ||
170726f5 C |
638 | .actor-followers { |
639 | font-size: 15px; | |
640 | } | |
a4f99a76 C |
641 | |
642 | .actor-owner { | |
22a16e36 | 643 | @include actor-owner; |
a4f99a76 | 644 | } |
170726f5 C |
645 | } |
646 | } | |
647 | ||
648 | .links { | |
649 | margin-top: 0; | |
de702865 | 650 | margin-bottom: 15px; |
170726f5 C |
651 | |
652 | a { | |
653 | margin-top: 0; | |
654 | margin-bottom: 0; | |
b061c8ed RK |
655 | text-transform: uppercase; |
656 | font-weight: 600; | |
9b8a7aa8 RK |
657 | font-size: 110%; |
658 | ||
659 | @media screen and (max-width: $mobile-view) { | |
660 | font-size: 130%; | |
661 | } | |
170726f5 C |
662 | } |
663 | } | |
08c1efbe C |
664 | } |
665 | ||
457bb213 | 666 | @mixin create-button { |
08c1efbe C |
667 | @include peertube-button-link; |
668 | @include orange-button; | |
457bb213 | 669 | @include button-with-icon(20px, 5px, -1px); |
a4f99a76 | 670 | } |
22a16e36 C |
671 | |
672 | @mixin row-blocks { | |
673 | display: flex; | |
674 | min-height: 130px; | |
675 | padding-bottom: 20px; | |
676 | margin-bottom: 20px; | |
677 | border-bottom: 1px solid #C6C6C6; | |
678 | ||
679 | @media screen and (max-width: 800px) { | |
680 | flex-direction: column; | |
681 | height: auto; | |
22a16e36 C |
682 | align-items: center; |
683 | } | |
6aff854c | 684 | } |
c5a1ae50 C |
685 | |
686 | @mixin dropdown-with-icon-item { | |
bc584963 | 687 | padding: 6px 15px; |
c5a1ae50 C |
688 | |
689 | my-global-icon { | |
bc584963 RK |
690 | width: 22px; |
691 | opacity: .7; | |
c5a1ae50 C |
692 | |
693 | margin-right: 10px; | |
694 | position: relative; | |
695 | top: -2px; | |
696 | } | |
697 | } | |
e61151b0 | 698 | |
66927c05 | 699 | @mixin progressbar($small: false) { |
e61151b0 RK |
700 | background-color: $grey-background-color; |
701 | display: flex; | |
702 | height: 1rem; | |
703 | overflow: hidden; | |
704 | font-size: 0.75rem; | |
705 | border-radius: 0.25rem; | |
bc99dfe5 RK |
706 | position: relative; |
707 | ||
708 | span { | |
709 | position: absolute; | |
4f5d0459 | 710 | color: $grey-foreground-color; |
66927c05 RK |
711 | @if $small { |
712 | top: -1px; | |
713 | } | |
bc99dfe5 RK |
714 | |
715 | &:nth-of-type(1) { | |
716 | left: .2rem; | |
717 | } | |
718 | &:nth-of-type(2) { | |
719 | right: .2rem; | |
720 | } | |
721 | } | |
e61151b0 RK |
722 | |
723 | .progress-bar { | |
e66883b3 RK |
724 | color: pvar(--mainBackgroundColor); |
725 | background-color: pvar(--mainColor); | |
e61151b0 RK |
726 | display: flex; |
727 | flex-direction: column; | |
728 | justify-content: center; | |
729 | text-align: center; | |
730 | white-space: nowrap; | |
731 | transition: width 0.6s ease; | |
732 | ||
733 | &.secondary { | |
e66883b3 | 734 | background-color: pvar(--secondaryColor); |
e61151b0 | 735 | } |
d4132d3f RK |
736 | |
737 | &.red { | |
738 | background-color: lighten($color: #c54130, $amount: 10); | |
739 | } | |
e61151b0 RK |
740 | } |
741 | } | |
76314386 RK |
742 | |
743 | @mixin breadcrumb { | |
744 | display: flex; | |
745 | flex-wrap: wrap; | |
746 | padding: 0.75rem 1rem; | |
747 | margin-bottom: 1rem; | |
748 | list-style: none; | |
e66883b3 | 749 | background-color: pvar(--submenuColor); |
76314386 RK |
750 | border-radius: 0.25rem; |
751 | ||
752 | .breadcrumb-item { | |
753 | display: flex; | |
754 | ||
755 | a { | |
e66883b3 | 756 | color: pvar(--mainColor); |
76314386 RK |
757 | } |
758 | ||
759 | & + .breadcrumb-item { | |
760 | padding-left: 0.5rem; | |
761 | &::before { | |
762 | display: inline-block; | |
763 | padding-right: 0.5rem; | |
764 | color: #6c757d; | |
765 | content: "/"; | |
766 | } | |
767 | } | |
768 | ||
769 | &.active { | |
770 | color: #6c757d; | |
771 | } | |
772 | } | |
773 | } | |
774 | ||
775 | @mixin dashboard { | |
776 | display: flex; | |
777 | flex-wrap: wrap; | |
778 | margin: 0 -5px; | |
779 | ||
780 | & > div { | |
781 | box-sizing: border-box; | |
782 | flex: 0 0 percentage(1/3); | |
783 | padding: 0 5px; | |
784 | margin-bottom: 10px; | |
785 | ||
786 | & > a { | |
d1261d9a RK |
787 | @include disable-default-a-behaviour; |
788 | ||
76314386 RK |
789 | text-decoration: none; |
790 | color: inherit; | |
791 | display: block; | |
792 | font-size: 18px; | |
793 | ||
794 | &:active, | |
795 | &:focus, | |
796 | &:hover { | |
797 | opacity: .8; | |
798 | } | |
799 | } | |
800 | ||
801 | & > a, | |
802 | & > div { | |
803 | padding: 20px; | |
e66883b3 | 804 | background: pvar(--submenuColor); |
76314386 RK |
805 | border-radius: 4px; |
806 | box-sizing: border-box; | |
807 | height: 100%; | |
808 | } | |
809 | } | |
810 | ||
811 | .dashboard-num, .dashboard-text { | |
812 | text-align: center; | |
813 | font-size: 130%; | |
814 | line-height: 21px; | |
e66883b3 | 815 | color: pvar(--mainForegroundColor); |
76314386 RK |
816 | line-height: 30px; |
817 | margin-bottom: 20px; | |
818 | } | |
819 | ||
820 | .dashboard-label { | |
821 | font-size: 90%; | |
e66883b3 | 822 | color: pvar(--inputPlaceholderColor); |
76314386 RK |
823 | text-align: center; |
824 | } | |
825 | } | |
a6d5ff76 | 826 | |
e66883b3 | 827 | @mixin divider($color: pvar(--submenuColor), $background: pvar(--mainBackgroundColor)) { |
b515c98c RK |
828 | width: 95%; |
829 | border-top: .05rem solid $color; | |
830 | height: .05rem; | |
831 | text-align: center; | |
832 | display: block; | |
833 | position: relative; | |
834 | ||
835 | &[data-content] { | |
836 | margin: .8rem 0; | |
837 | ||
838 | &::after { | |
839 | background: $background; | |
840 | color: $color; | |
841 | content: attr(data-content); | |
842 | display: inline-block; | |
843 | font-size: .7rem; | |
844 | padding: 0 .4rem; | |
845 | transform: translateY(-.65rem); | |
846 | } | |
847 | } | |
848 | } | |
d6af8146 RK |
849 | |
850 | @mixin chip { | |
1ebddadd RK |
851 | --chip-radius: 5rem; |
852 | --chip-padding: .2rem .4rem; | |
d6af8146 RK |
853 | $avatar-height: 1.2rem; |
854 | ||
855 | align-items: center; | |
1ebddadd | 856 | border-radius: var(--chip-radius); |
d6af8146 RK |
857 | display: inline-flex; |
858 | font-size: 90%; | |
e66883b3 | 859 | color: pvar(--mainForegroundColor); |
d6af8146 | 860 | height: $avatar-height; |
06827932 | 861 | line-height: 1rem; |
d6af8146 RK |
862 | margin: .1rem; |
863 | max-width: 320px; | |
864 | overflow: hidden; | |
1ebddadd | 865 | padding: var(--chip-padding); |
d6af8146 RK |
866 | text-decoration: none; |
867 | text-overflow: ellipsis; | |
868 | vertical-align: middle; | |
869 | white-space: nowrap; | |
870 | ||
1ebddadd RK |
871 | &.rectangular { |
872 | --chip-radius: .2rem; | |
873 | --chip-padding: .2rem .3rem; | |
874 | } | |
875 | ||
d6af8146 RK |
876 | .avatar { |
877 | margin-left: -.4rem; | |
878 | margin-right: .2rem; | |
879 | height: $avatar-height; | |
880 | width: $avatar-height; | |
881 | ||
882 | border-radius: 50%; | |
883 | display: inline-block; | |
884 | line-height: 1.25; | |
885 | position: relative; | |
886 | vertical-align: middle; | |
887 | } | |
888 | ||
889 | &.two-lines { | |
36f772fd | 890 | $avatar-height: 2rem; |
d6af8146 RK |
891 | |
892 | height: $avatar-height; | |
893 | ||
894 | .avatar { | |
895 | height: $avatar-height; | |
896 | width: $avatar-height; | |
897 | } | |
898 | ||
899 | div { | |
900 | display: flex; | |
901 | flex-direction: column; | |
d6af8146 RK |
902 | height: $avatar-height; |
903 | margin-left: .1rem; | |
904 | margin-right: .1rem; | |
905 | justify-content: center; | |
906 | } | |
907 | } | |
908 | } | |
7a03209d K |
909 | |
910 | @mixin admin-sub-header-responsive ($horizontal-margins) { | |
911 | flex-direction: column; | |
912 | ||
913 | .form-sub-title { | |
914 | margin-right: 0px !important; | |
915 | margin-bottom: 10px; | |
916 | text-align: center; | |
917 | } | |
918 | ||
919 | .admin-sub-nav { | |
920 | display: block; | |
921 | overflow-x: auto; | |
922 | white-space: nowrap; | |
923 | height: 50px; | |
924 | padding: 10px 0; | |
925 | width: calc(100vw - #{$horizontal-margins*2}); | |
926 | ||
927 | a { | |
928 | margin-left: 5px; | |
929 | } | |
930 | } | |
931 | } | |
e66883b3 RK |
932 | |
933 | // applies 16:9 ratio to a child element (using $selector) only using | |
934 | // an immediate's parent size. This allows 16:9 ratio without explicit | |
935 | // dimensions, as width/height cannot be computed from each other. | |
936 | @mixin large-screen-ratio ($selector: 'div') { | |
937 | position: relative; | |
938 | height: 0; | |
939 | width: 100%; | |
940 | padding-top: 56%; | |
941 | ||
942 | #{$selector} { | |
943 | position: absolute; | |
944 | width: 100%; | |
945 | height: 100%; | |
946 | top: 0; | |
947 | @content; | |
948 | } | |
949 | } | |
ed5bb517 K |
950 | |
951 | @mixin sub-menu-h1 { | |
952 | ::ng-deep h1 { | |
953 | font-size: 1.3rem; | |
954 | border-bottom: 2px solid $grey-background-color; | |
955 | padding-bottom: 15px; | |
956 | margin-bottom: $sub-menu-margin-bottom; | |
957 | ||
958 | my-global-icon { | |
959 | margin-right: 10px; | |
960 | vertical-align: bottom; | |
961 | width: 24px; | |
962 | height: 24px; | |
963 | } | |
964 | ||
965 | .badge { | |
966 | margin-left: 7px; | |
967 | } | |
968 | } | |
969 | } | |
4572c3d0 C |
970 | |
971 | @mixin play-icon ($width, $height) { | |
972 | width: 0; | |
973 | height: 0; | |
974 | ||
975 | position: absolute; | |
976 | left: 50%; | |
977 | top: 50%; | |
978 | transform: translate(-50%, -50%) scale(0.5); | |
979 | ||
980 | border-top: ($height / 2) solid transparent; | |
981 | border-bottom: ($height / 2) solid transparent; | |
982 | ||
983 | border-left: $width solid rgba(255, 255, 255, 0.95); | |
984 | } |