Skip to content

Commit b703775

Browse files
committed
refactor!: Rename and parametrize AboutUs.astro to create reusable AboutSection.astro
- Renamed `AboutUs.astro` to `AboutSection.astro` (a more descriptive name) - Made AboutSection parametric: replaced hardcoded content with props for title, description, image, and call to action (CTA) - Updated styles according latest design mockup
1 parent 0366fec commit b703775

File tree

3 files changed

+31
-36
lines changed

3 files changed

+31
-36
lines changed

src/assets/home-sections.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"aboutUs": {
33
"id": "about-us",
4-
"title": "Somos la metacomunidad que conecta y potencia a las comunidades tech.",
4+
"title": "Somos la metacomunidad que conecta y potencia a las comunidades tech",
55
"subtitle": "",
66
"description": "En nuestra metacomunidad, unimos fuerzas, compartimos conocimientos y crecemos juntos. Conectamos comunidades tech para impulsar el futuro de la innovación y la colaboración. Únete a nosotros y sé parte del cambio.",
77
"image": {
@@ -29,7 +29,7 @@
2929
},
3030
"exploreEvents": {
3131
"id": "explore-events",
32-
"title": "Únete a nuestros próximos eventos y amplía tus horizontes.",
32+
"title": "Únete a nuestros próximos eventos y amplía tus horizontes",
3333
"subtitle": "",
3434
"description": "Nos encanta aprender, compartir y expandir nuestros horizontes constantemente. ¡Anímate a explorar todas las actividades que las comunidades tech tienen para ti!",
3535
"image": {

src/components/AboutSection.astro

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
//import heroImage from "../assets/hacktoberfest.jpg";
3+
import Button from "./shared/Button.astro";
4+
5+
const {id, title, description, image, cta} = Astro.props;
6+
---
7+
8+
<section id={id} class="py-16 bg-gray-50">
9+
<div class="container mx-auto px-4">
10+
<div class="w-[88%] lg:w-[92%] mx-auto grid grid-cols-1 lg:grid-cols-2 gap-12 items-start">
11+
<div class="order-2 lg:order-1">
12+
<h2 class="text-3xl font-bold mb-6">
13+
{title}
14+
</h2>
15+
<p class="text-gray-600 mb-6">
16+
{description}
17+
</p>
18+
<Button text={cta.text} link={cta.link} style="primary"/>
19+
</div>
20+
<div class="bg-gray-200 order-1 lg:order-2 rounded-lg">
21+
<img
22+
src={image.link}
23+
alt={image.alt}
24+
class="w-full object-cover h-64 rounded-xl transform hover:scale-105 transition-transform duration-300"
25+
/>
26+
</div>
27+
</div>
28+
</div>
29+
</section>

src/components/AboutUs.astro

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)