Skip to content

Commit c6f258e

Browse files
committed
Revamp feature section cards to use more modular approach
1 parent a09d8db commit c6f258e

File tree

1 file changed

+33
-18
lines changed

1 file changed

+33
-18
lines changed

src/components/sections/FeatureSection.astro

+33-18
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,46 @@ const { title, desc, image, color } = Astro.props;
33
import { Image } from "astro:assets";
44
---
55

6-
<div class="feature">
7-
<h3 style=`color: ${color};`>{title}</h3>
8-
<p>{desc}</p>
9-
<Image src={image} loading="lazy" alt="Mythic logo" />
6+
<div class="feature-card">
7+
<div class="feature-text">
8+
<h3 style={`color: ${color};`}>{title}</h3>
9+
<p>{desc}</p>
10+
</div>
11+
<div class="feature-image">
12+
<Image src={image} loading="lazy" alt="Mythic feature" />
13+
</div>
1014
</div>
1115

1216
<style>
13-
.feature {
14-
margin-top: 20px;
15-
margin-bottom: 20px;
16-
border-radius: 16px;
17-
padding: 20px;
18-
background-color: var(--secondary-nav-color);
19-
text-align: left;
17+
.feature-card {
18+
display: flex;
19+
flex-direction: column;
2020
align-items: center;
21+
background-color: var(--secondary-nav-color);
22+
padding: 20px;
23+
border-radius: 16px;
24+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
25+
text-align: center;
26+
margin-bottom: 20px;
2127
}
2228

23-
.feature p {
24-
max-width: 50%;
25-
}
26-
27-
.feature img {
29+
.feature-image {
2830
width: 100%;
2931
height: auto;
30-
object-fit: contain;
31-
max-height: 500px;
32+
}
33+
34+
.feature-text h3 {
35+
font-size: 1.5rem;
36+
margin-bottom: 10px;
37+
}
38+
39+
.feature-text p {
40+
font-size: 1rem;
41+
max-width: 80%;
42+
margin: 0 auto;
43+
}
44+
45+
.feature-text {
46+
padding-bottom: 24px;
3247
}
3348
</style>

0 commit comments

Comments
 (0)