Skip to content

Commit

Permalink
Merge pull request #33 from GDGCochabamba/feat/faq
Browse files Browse the repository at this point in the history
  • Loading branch information
combimauri authored Apr 29, 2024
2 parents c6aa0a8 + e76d50e commit a1e41e5
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/Navbar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ import header from "../assets/images/header.png"
<a href="/#organizadores" class="block py-1 px-4">Equipo</a>
</li>

<li class="flex justify-center items-center">
<a href="/#faqs" class="block py-1 px-4">Faqs</a>
</li>

<li class="flex justify-center items-center">
<a href="playground" class="block py-1 px-4">Playground ✨</a>
</li>
Expand Down
24 changes: 24 additions & 0 deletions src/components/faqs/FaqCard.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
const { question, answer } = Astro.props;
---

<details class="border py-8 [&_svg]:open:-rotate-180">
<summary class="flex justify-between px-8 cursor-pointer">
<span class="text-xl font-bold" title={question}>{question}</span>
<svg
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-6 h-6 transition-all duration-200"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="m19.5 8.25-7.5 7.5-7.5-7.5"></path>
</svg>
</summary>
<section class="px-8 mt-4 text-xl text-justify" title={answer}>
{answer}
</section>
</details>
16 changes: 16 additions & 0 deletions src/components/faqs/Faqs.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
import faqs from "./faqs.json";
import FaqCard from "./FaqCard.astro";
---

<section id="faqs" class="bg-black text-white">
<section class="max-w-screen-xl mx-auto px-4 py-16 space-y-8">
<h2 class="text-2xl sm:text-3xl font-bold mx-auto">FAQs</h2>
<h1 class="text-1xl sm:text-xl mx-auto">
¿Tienes dudas? ¡Esperamos puedas despejarlas aquí!
</h1>
<section class="flex flex-col">
{faqs.map((faq) => <FaqCard {...faq} />)}
</section>
</section>
</section>
14 changes: 14 additions & 0 deletions src/components/faqs/faqs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"question": "No tengo equipo, ¿Puedo participar?",
"answer": "¡Claro que puedes participar! Los organizadores del evento asignarán a los participantes que no tengan equipo a un equipo que esté incompleto. Así que no te preocupes."
},
{
"question": "¿Qué habilidades necesito para destacarme?",
"answer": "No necesitas tener conocimientos previos para ser parte del hackathon. BuildWith AI está abierto a personas de diferentes áreas y niveles de experiencia, unidos por el poder la de la inteligencia artificial."
},
{
"question": "¿Cómo conformo mi equipo para participar?",
"answer": "Te recomendamos contar con un equipo de 3 - 5 personas, con diversas habilidades e ideas, para trabajar de manera óptima y aprovechar al máximo esta experiencia."
}
]
2 changes: 2 additions & 0 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Layout from 'layouts/Layout.astro';
import Navbar from 'components/Navbar.astro';
import Organizers from 'components/organizers/Organizers.astro';
import Workshops from 'components/Workshops.astro';
import Faqs from 'components/faqs/Faqs.astro';
---

<Layout>
Expand All @@ -14,5 +15,6 @@ import Workshops from 'components/Workshops.astro';
<AboutUs />
<Workshops />
<Organizers />
<Faqs />
</main>
</Layout>

0 comments on commit a1e41e5

Please sign in to comment.