From e15080c62a8062a58bda6ac31149daefe6341872 Mon Sep 17 00:00:00 2001 From: NahuelTG Date: Sun, 5 Oct 2025 19:24:11 -0400 Subject: [PATCH] add: section questions --- src/components/Questions.astro | 37 ++++++++++++++++++++++++++++++++++ src/pages/index.astro | 15 ++++++++------ 2 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 src/components/Questions.astro diff --git a/src/components/Questions.astro b/src/components/Questions.astro new file mode 100644 index 0000000..bf07c94 --- /dev/null +++ b/src/components/Questions.astro @@ -0,0 +1,37 @@ +--- +interface Question { + question: string; + answer: string; +} + +export interface Props { + id?: string; + title?: string; + subtitle?: string; + questions: Question[]; +} + +const { id = 'questions', questions } = Astro.props as Props; +--- + +
+
+ { + questions.map((question) => ( +
+ + {question.question} + + + + + + + +
+

{question.answer}

+
+
+ )) + } +
+
diff --git a/src/pages/index.astro b/src/pages/index.astro index ade224b..f6e7b9b 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -2,7 +2,8 @@ import Layout from '../layouts/Layout.astro'; import Hero from '../components/Hero.astro'; import Sponsors from '../components/Sponsors.astro'; -import AboutUs from "../components/AboutUs.astro"; +import AboutUs from '../components/AboutUs.astro'; +import Questions from '../components/Questions.astro'; // Welcome to Astro! Wondering what to do next? Check out the Astro documentation at https://docs.astro.build // Don't want to use any of this? Delete everything in this file, the `assets`, `components`, and `layouts` directories, and start fresh. @@ -12,14 +13,16 @@ const sponsors = [ // { name: 'Sponsor3', image: '/', url: '#' }, // { name: 'Sponsor4', image: '/', url: '#' }, ]; + +const questions = [ + { question: 'Pregunta?', answer: 'Respuesta meticulosamente pensada ' }, + { question: 'Pregunta?', answer: 'Respuesta meticulosamente pensada ' }, +]; --- - + + -