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