Skip to content

Commit a96243d

Browse files
committed
update features section
1 parent c5d825f commit a96243d

6 files changed

Lines changed: 82 additions & 29 deletions

File tree

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
import styles from './index.module.css';
2+
import useBaseUrl from '@docusaurus/useBaseUrl';
23

34
const features = [
45
{
5-
title: "Asset Injection",
6-
description: "Replace in-game assets like textures, sounds, shaders, and more with a simple drag and drop.",
7-
},
8-
{
9-
title: "Custom Events",
10-
description: "Code your own events and notes into the game and use them in your levels.",
6+
title: "Easy Mod Installation",
7+
description: "Install mods with just a drag and drop.",
8+
image: "drag-and-drop.png"
119
},
1210
{
1311
title: "Mod Menu",
14-
description: "Toggle and configure your mods with the Beatblock Plus in-game mod menu.",
12+
description: "Toggle and configure your mods with the BeatblockPlus in-game mod menu.",
13+
image: "mod-menu.png"
1514
},
1615
{
17-
title: "Custom Languages",
18-
description: "Easily create translations for the game with a single file.",
16+
title: "Enhanced Gameplay",
17+
description: "Modify the game's code, textures, sounds and more!",
18+
image: "gameplay.png"
1919
},
2020
{
21-
title: "Debug Console",
22-
description: "Use the debug console for quickly debugging your code.",
23-
},
21+
title: "Community Creations",
22+
description: "Access a growing collection of mods and content created by the community.",
23+
image: "community.png"
24+
}
2425
]
2526

2627
export default function Features() {
@@ -29,18 +30,29 @@ export default function Features() {
2930
<h1 className={['center', styles.tagline].join(' ')}>The complete toolkit for Beatblock mod development</h1>
3031
<div className={styles.features}>
3132
{features.map((props, idx) => (
32-
<Feature key={idx} {...props} />
33+
<Feature key={idx} index={idx} {...props} />
3334
))}
3435
</div>
3536
</section>
3637
);
3738
}
3839

39-
function Feature({ title, description }) {
40+
function Feature({ title, description, image, index }) {
41+
const isEven = index % 2 === 0;
42+
const featureClass = [styles.feature, isEven ? styles.normalRow : styles.reversedRow].join(' ');
43+
4044
return (
41-
<div className={styles.feature}>
42-
<p className={styles.title}>{ title }</p>
43-
<p className={styles.description}>{ description }</p>
45+
<div className={featureClass}>
46+
{/* Image Box Container */}
47+
<div className={styles.visualBox}>
48+
<img src={useBaseUrl(`/img/features/${image}`)} alt={title} className={styles.boxImage} />
49+
</div>
50+
51+
{/* Text Content */}
52+
<div className={styles.textContent}>
53+
<p className={styles.title}>{ title }</p>
54+
<p className={styles.description}>{ description }</p>
55+
</div>
4456
</div>
45-
)
46-
}
57+
);
58+
}

src/components/homepage/features/index.module.css

Lines changed: 51 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,61 @@
66
width: 75%;
77
height: auto;
88
display: flex;
9-
justify-content: center;
10-
align-items: center;
11-
text-align: center;
12-
flex-wrap: wrap;
13-
gap: 30px;
9+
flex-direction: column;
10+
gap: 50px;
1411
}
1512

1613
.feature {
17-
margin: 10px;
18-
padding: 10px;
14+
display: flex;
15+
align-items: center;
16+
justify-content: space-between;
17+
gap: 40px;
18+
width: 100%;
19+
}
20+
21+
.normalRow {
22+
flex-direction: row;
23+
}
24+
25+
.reversedRow {
26+
flex-direction: row-reverse;
27+
}
28+
29+
/* The box container (keeps your original background & shadow) */
30+
.visualBox {
31+
flex: 1;
32+
min-width: 300px;
33+
height: 275px;
1934
border-radius: 25px;
2035
background-color: rgb(43, 43, 43);
2136
box-shadow: 0 0 20px 5px rgb(43, 43, 43);
22-
max-width: 300px;
37+
overflow: hidden; /* Prevents the image from spilling past the rounded corners */
38+
display: flex;
39+
justify-content: center;
40+
align-items: center;
41+
}
42+
43+
/* New: Rules to make the image fit cleanly inside the box */
44+
.boxImage {
45+
width: 100%;
46+
height: 100%;
47+
object-fit: cover; /* Crops/scales the image nicely to fit the 180px height */
48+
}
49+
50+
.textContent {
51+
flex: 1;
52+
text-align: left;
2353
}
2454

2555
.title {
26-
font-size: 30px;
56+
font-size: 35px;
2757
margin: 0;
58+
margin-bottom: 10px;
2859
}
2960

3061
.description {
3162
margin: 0;
32-
font-size: 15px;
63+
font-size: 20px;
3364
color: rgba(255, 255, 255, 0.6)
3465
}
3566

@@ -38,6 +69,7 @@
3869
font-weight: 300;
3970
font-style: normal;
4071
margin-bottom: 0;
72+
text-align: center;
4173
}
4274

4375
.section p {
@@ -46,3 +78,12 @@
4678
font-style: normal;
4779
margin-bottom: 0;
4880
}
81+
82+
@media (max-width: 768px) {
83+
.normalRow, .reversedRow {
84+
flex-direction: column;
85+
}
86+
.textContent {
87+
text-align: center;
88+
}
89+
}

static/img/features/community.png

124 KB
Loading
101 KB
Loading

static/img/features/gameplay.png

72 KB
Loading

static/img/features/mod-menu.png

21.9 KB
Loading

0 commit comments

Comments
 (0)