Skip to content

Commit 221f8f9

Browse files
authored
Merge branch 'master' into rozwader/form-implementation
2 parents 850befe + 997fc5d commit 221f8f9

21 files changed

+431
-274
lines changed

.prettierrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"plugins": ["prettier-plugin-astro"],
3+
"endOfLine": "lf",
4+
"tabWidth": 4,
5+
"useTabs": false,
6+
"printWidth": 120,
7+
"trailingComma": "es5",
8+
"semi": true,
9+
"overrides": [
10+
{
11+
"files": "*.astro",
12+
"options": {
13+
"parser": "astro"
14+
}
15+
}
16+
]
17+
}

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}

package-lock.json

Lines changed: 44 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"embla-carousel-auto-scroll": "^8.6.0"
1818
},
1919
"devDependencies": {
20-
"prettier": "^3.6.2"
20+
"prettier": "^3.6.2",
21+
"prettier-plugin-astro": "^0.14.1"
2122
}
2223
}

src/components/Button.astro

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
interface Props{
2+
interface Props {
33
id: string;
44
fontSize?: string;
55
variant: "primary" | "secondary" | "outlined";
@@ -10,34 +10,34 @@ const { id, variant, fontSize = "1em" } = Astro.props as Props;
1010
const variantClassMap: Record<string, string> = {
1111
primary: "dark",
1212
secondary: "light",
13-
}
13+
};
1414
1515
const buttonClass = variantClassMap[variant] ?? "outlined";
16-
1716
---
17+
1818
<button type="button" id={id} class={`button ${buttonClass}`}>
19-
<slot/>
19+
<slot />
2020
</button>
2121

22-
<style define:vars={{fontSize}}>
23-
.dark{
22+
<style define:vars={{ fontSize }}>
23+
.dark {
2424
color: var(--light);
2525
background-color: var(--dark);
2626
box-shadow: 0px 5px 5px rgba(12, 12, 12, 0.33);
2727
}
2828

29-
.light{
29+
.light {
3030
color: var(--dark);
3131
background-color: var(--secondary);
3232
}
3333

34-
.outlined{
34+
.outlined {
3535
color: var(--primary);
3636
background-color: transparent;
3737
border: 2px solid var(--primary);
3838
}
3939

40-
.button{
40+
.button {
4141
border-radius: 10px;
4242
border: none;
4343
padding: 15px 30px;
@@ -48,4 +48,4 @@ const buttonClass = variantClassMap[variant] ?? "outlined";
4848
font-size: var(--fontSize);
4949
font-family: var(--font-ubuntu);
5050
}
51-
</style>
51+
</style>

src/components/Card.astro

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
2-
import { undefined } from 'astro:schema';
3-
2+
import { undefined } from "astro:schema";
43
54
interface Props {
65
variant: "light" | "dark";
@@ -11,41 +10,37 @@ interface Props {
1110
}
1211
1312
const { variant, title = undefined, styles = "" } = Astro.props as Props;
14-
1513
---
1614

1715
<div class={`wrapper ${variant}`} style={styles}>
1816
<div class="circlesBar">
19-
<div class="circle green" />
20-
<div class="circle yellow" />
21-
<div class="circle red" />
17+
<div class="circle green"></div>
18+
<div class="circle yellow"></div>
19+
<div class="circle red"></div>
2220
</div>
2321

2422
<div class="infoContainer">
25-
{title && (
26-
<span class="title">{title}</span>
27-
)}
23+
{title && <span class="title">{title}</span>}
2824

2925
<slot />
3026
</div>
31-
3227
</div>
3328

3429
<style>
35-
.wrapper{
30+
.wrapper {
3631
display: flex;
3732
flex-direction: column;
3833
border-radius: 12px;
3934
padding: 0px 20px 30px 20px;
4035
border: 2px solid var(--secondary);
4136
overflow-y: hidden;
4237
backdrop-filter: blur(32px);
43-
box-shadow: 0px 10px 5px rgba(0,0,0,0.1);
38+
box-shadow: 0px 10px 5px rgba(0, 0, 0, 0.1);
4439
width: 100%;
4540
height: auto;
4641
}
4742

48-
.circlesBar{
43+
.circlesBar {
4944
display: flex;
5045
flex-direction: row;
5146
align-items: center;
@@ -55,44 +50,44 @@ const { variant, title = undefined, styles = "" } = Astro.props as Props;
5550
padding-top: 20px;
5651
}
5752

58-
.circle{
53+
.circle {
5954
width: 10px;
6055
height: 10px;
6156
border-radius: 50%;
6257
}
6358

64-
.red{
59+
.red {
6560
background-color: var(--danger);
6661
}
6762

68-
.yellow{
63+
.yellow {
6964
background-color: var(--warning);
7065
}
7166

72-
.green{
67+
.green {
7368
background-color: var(--success);
7469
}
7570

76-
.infoContainer{
71+
.infoContainer {
7772
width: 100%;
7873
padding: 10px 0px;
7974
display: flex;
8075
flex-direction: column;
8176
gap: 10px;
8277
}
8378

84-
.title{
79+
.title {
8580
font-weight: 700;
8681
font-size: 20px;
8782
}
8883

89-
.light{
84+
.light {
9085
background-color: var(--lightDimmed);
9186
color: var(--light);
9287
}
9388

94-
.dark{
89+
.dark {
9590
background-color: var(--darkDimmed);
9691
color: var(--light);
9792
}
98-
</style>
93+
</style>

src/components/Input.astro

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
---
2-
import type { JSX } from 'astro/jsx-runtime';
2+
import type { JSX } from "astro/jsx-runtime";
33
import { Icon } from "astro-icon/components";
44
5-
6-
type InputProps = JSX.IntrinsicElements['input'];
5+
type InputProps = JSX.IntrinsicElements["input"];
76
87
const props = Astro.props as InputProps;
98
---
9+
1010
<div class="input-container">
11-
<input {...props}>
11+
<input {...props} />
1212
<div class="icon-container" aria-hidden="true">
13-
<Icon name="tabler:alert-circle" class="icon-error"/>
13+
<Icon name="tabler:alert-circle" class="icon-error" />
1414
</div>
1515
</div>
1616
<style>
17-
1817
input {
1918
outline: 0;
2019
border: 0;
@@ -37,7 +36,7 @@ const props = Astro.props as InputProps;
3736
width: 100%;
3837
}
3938

40-
.input-container:focus-within {
39+
.input-container:focus-within {
4140
outline: var(--primary);
4241
color: black;
4342
border: none;
@@ -54,13 +53,13 @@ const props = Astro.props as InputProps;
5453
width: 13px;
5554
}
5655

57-
.input-container:has(input:invalid){
58-
outline: var(--danger) ;
59-
color: var(--danger) ;
60-
caret-color: var(--danger) ;
56+
.input-container:has(input:invalid) {
57+
outline: var(--danger);
58+
color: var(--danger);
59+
caret-color: var(--danger);
6160
border: none;
6261
border-bottom: 2px var(--danger) solid;
63-
62+
6463
input {
6564
color: var(--danger);
6665
}
@@ -69,5 +68,4 @@ const props = Astro.props as InputProps;
6968
visibility: visible;
7069
}
7170
}
72-
73-
</style>
71+
</style>

src/components/Link.astro

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
2-
import { undefined } from 'astro:schema';
2+
import { undefined } from "astro:schema";
33
4-
5-
interface Props{
4+
interface Props {
65
href: string | URL;
76
variant: "blank" | "primary" | "outlined";
87
fullWidth?: boolean;
@@ -14,11 +13,11 @@ const isFullWidth = fullWidth ? "100%" : "fit-content";
1413
---
1514

1615
<a class=`link ${variant}` href={href}>
17-
<slot/>
16+
<slot />
1817
</a>
1918

20-
<style define:vars={{isFullWidth}}>
21-
.link{
19+
<style define:vars={{ isFullWidth }}>
20+
.link {
2221
text-decoration: none;
2322
cursor: pointer;
2423
padding: 10px 20px;
@@ -31,23 +30,24 @@ const isFullWidth = fullWidth ? "100%" : "fit-content";
3130
justify-content: center;
3231
gap: 5px;
3332
min-width: 80px;
34-
33+
3534
width: var(--isFullWidth);
3635
}
3736

38-
.primary{ /* dark */
37+
.primary {
38+
/* dark */
3939
color: var(--light);
4040
background-color: var(--dark);
4141
box-shadow: 0px 5px 5px rgba(12, 12, 12, 0.33);
4242
}
4343

44-
.outlined{
44+
.outlined {
4545
color: var(--primary);
4646
background-color: transparent;
4747
border: 2px solid var(--primary);
4848
}
49-
50-
.blank{
49+
50+
.blank {
5151
color: var(--dark);
5252
}
53-
</style>
53+
</style>

0 commit comments

Comments
 (0)