Skip to content

Commit ca6ca1d

Browse files
authored
refactor: home page style updates (#183)
1 parent 3981a8d commit ca6ca1d

File tree

3 files changed

+67
-15
lines changed

3 files changed

+67
-15
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
"devDependencies": {
1515
"prettier": "^3.8.1"
1616
},
17-
"packageManager": "pnpm@10.5.2+sha512.da9dc28cd3ff40d0592188235ab25d3202add8a207afbedc682220e4a0029ffbff4562102b9e6e46b4e3f9e8bd53e6d05de48544b0c57d4b0179e22c76d1199b"
17+
"packageManager": "pnpm@10.28.1+sha512.7d7dbbca9e99447b7c3bf7a73286afaaf6be99251eb9498baefa7d406892f67b879adb3a1d7e687fc4ccc1a388c7175fbaae567a26ab44d1067b54fcb0d6a316"
1818
}

website/src/components/HomepageFeatures/index.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,20 @@ const FeatureList: FeatureItem[] = [
4040
},
4141
];
4242

43-
function Feature({ title, imgSrc, img, description, buttonHref, buttonText }: FeatureItem) {
43+
function Feature({ title, imgSrc, img, description, buttonHref, buttonText }: FeatureItem): JSX.Element {
4444
return (
45-
<div className={clsx('col col--4')}>
46-
<div className="text--center">{img ? img : <img src={imgSrc} className={styles.featureSvg} role="img" />}</div>
47-
<div className="padding-horiz--md">
48-
<Heading as="h3">{title}</Heading>
45+
<div className={styles.featureCol}>
46+
<div>
47+
{img ? img : <img src={imgSrc} className={styles.featureSvg} role="img" />}
48+
<Heading as="h3" className={styles.featureHeading}>
49+
{title}
50+
</Heading>
4951
<p>{description}</p>
50-
<div className={styles.buttons}>
51-
<Link href={buttonHref} className="button button--secondary button--lg">
52-
{buttonText}
53-
</Link>
54-
</div>
52+
</div>
53+
<div className={styles.buttons}>
54+
<Link href={buttonHref} className="button button--secondary button--lg">
55+
{buttonText}
56+
</Link>
5557
</div>
5658
</div>
5759
);
@@ -61,7 +63,7 @@ export default function HomepageFeatures(): JSX.Element {
6163
return (
6264
<section className={styles.features}>
6365
<div className="container">
64-
<div className="row">
66+
<div className={styles.featureList}>
6567
{FeatureList.map((props, idx) => (
6668
<Feature key={idx} {...props} />
6769
))}
Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.features {
2+
width: 100%;
23
display: flex;
34
align-items: center;
4-
padding: 2rem 0;
5-
width: 100%;
5+
padding-bottom: 2rem;
66
}
77

88
.featureSvg {
@@ -11,6 +11,56 @@
1111
}
1212

1313
.featureImg {
14-
height: 400px;
1514
width: 400px;
15+
height: 400px;
16+
border-radius: 0.75rem;
17+
}
18+
19+
.featureCol {
20+
display: flex;
21+
flex-direction: column;
22+
justify-content: space-between;
23+
max-width: 400px;
24+
width: 100%;
25+
}
26+
27+
.featureList {
28+
gap: 0.5rem;
29+
display: flex;
30+
padding-top: 2rem;
31+
}
32+
33+
.featureCol > div:first-child {
34+
display: flex;
35+
width: 100%;
36+
flex-direction: column;
37+
}
38+
39+
.featureCol h3,
40+
.featureCol p {
41+
width: 100%;
42+
text-align: left;
43+
}
44+
45+
.featureHeading {
46+
font-size: 1.5rem;
47+
padding-top: 0.75rem;
48+
}
49+
50+
.buttons {
51+
width: 100%;
52+
margin-top: 1rem;
53+
}
54+
55+
@media screen and (max-width: 768px) {
56+
.featureList {
57+
flex-direction: column;
58+
align-items: center;
59+
gap: 2rem;
60+
}
61+
62+
.featureCol {
63+
width: 100%;
64+
max-width: 400px;
65+
}
1666
}

0 commit comments

Comments
 (0)