Skip to content

Commit be4035b

Browse files
authored
Merge pull request #39 from CodeandoMexico/feature/comunidad
connected to directus
2 parents f03589e + b7aa008 commit be4035b

3 files changed

Lines changed: 27 additions & 10 deletions

File tree

src/components/Navbar.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
let menuItems = [
1010
{name: "Acerca de", url: '/acerca'},
1111
{name: "Proyectos", url: "/proyectos"},
12-
// {name: "Comunidad", url: "/comunidad"},
12+
{name: "Comunidad", url: "/comunidad"},
1313
// {name: "Recursos", url: "/recursos"},
1414
{name: "Blog", url: "/blog"},
1515
];
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import client from '$lib/apiClient'
2+
import { readItems } from '@directus/sdk'
3+
4+
export async function load() {
5+
6+
const comunidad = await client.request(readItems('comunidad', {
7+
filter: {
8+
status: {
9+
_eq: "published"
10+
}
11+
}
12+
}))
13+
14+
return {
15+
comunidad
16+
}
17+
}
18+
19+
export const prerender = true;

src/routes/comunidad/+page.svelte

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import GetInvolvedCard from "@/components/Cards/GetInvolvedCard.svelte";
44
import CommunityCard from "@/components/Cards/CommunityCard.svelte";
55
import CollaboratorCard from "@/components/Cards/CollaboratorCard.svelte";
6+
export let data
7+
const { comunidad } = data
68
</script>
79

810
<Hero accentColor="#F2D301" title="Involúcrate en la comunidad" subtitle="Somos una comunidad abierta que construye tecnología para el bien común." image="/comunidad.png" />
@@ -21,17 +23,13 @@
2123
<p class="text-center md:text-left text-lg">¿Quieres participar pero no sabes por dónde comenzar? Este es un espacio abierto y tenemos un lugar para todas las personas. Empieza por aquí:</p>
2224
</div>
2325
<div class="my-10 flex flex-column md:flex-row flex-wrap">
24-
<CommunityCard text="Comunidad Codeando México" route="https://google.com/"/>
25-
<CommunityCard text="Curso de Hacking Cívico" route="https://google.com/"/>
26-
<CommunityCard text="Escuela de Datos" route="https://google.com/"/>
27-
<CommunityCard text="Historias de la Comunidad" route="https://google.com/"/>
28-
<CommunityCard text="Glosario de Hacking Cívico" route="https://google.com/"/>
29-
<CommunityCard text="Awesome Civic Tech" route="https://google.com/"/>
30-
<CommunityCard text="Awesome Open Data" route="https://google.com/"/>
26+
{#each comunidad as item}
27+
<CommunityCard text={item.name} route={item.url}/>
28+
{/each}
3129
</div>
3230
</section>
3331

34-
<section id="colaboradores" class="container my-8 mx-auto">
32+
<!-- <section id="colaboradores" class="container my-8 mx-auto">
3533
<h2 class="text-4xl text-center font-bold my-8">Contribuidores y colaboradores</h2>
3634
<div class="flex flex-wrap justify-start mx-auto">
3735
<CollaboratorCard image="/collaborator-example.png" url="https://google.com/" name="Juana Pérez"/>
@@ -55,4 +53,4 @@
5553
<CollaboratorCard image="/collaborator-example.png" url="https://google.com/" name="Juana Pérez"/>
5654
<CollaboratorCard image="/collaborator-example.png" url="https://google.com/" name="Juana Pérez"/>
5755
</div>
58-
</section>
56+
</section> -->

0 commit comments

Comments
 (0)