diff --git a/src/content/config.ts b/src/content/config.ts new file mode 100644 index 0000000..3d238b6 --- /dev/null +++ b/src/content/config.ts @@ -0,0 +1,24 @@ +import { defineCollection, z } from 'astro:content'; + +const menuCollection = defineCollection({ + type: 'data', + schema: z.object({ + items: z.array( + z.object({ + label: z.string(), + href: z.string().optional(), + // optional + children: z.array( + z.object({ + label: z.string(), + href: z.string(), + }) + ).optional(), + }) + ) + }) +}); + +export const collections = { + 'menu': menuCollection, +}; \ No newline at end of file diff --git a/src/content/menu/main.json b/src/content/menu/main.json new file mode 100644 index 0000000..4d54c8c --- /dev/null +++ b/src/content/menu/main.json @@ -0,0 +1,42 @@ +{ + "items": [ + { + "label": "Inicio", + "href": "/" + }, + { + "label": "La Conferencia", + "children": [ + { + "label": "Speakers", + "href": "/speakers" + }, + { + "label": "Agenda", + "href": "/agenda" + }, + { + "label": "Sede", + "href": "/location" + } + ] + }, + { + "label": "Patrocinios", + "href": "/sponsorship" + }, + { + "label": "Ediciones Anteriores", + "children": [ + { + "label": "2025 (Sevilla)", + "href": "https://2025.es.pycon.org" + }, + { + "label": "2024 (Vigo)", + "href": "https://2024.es.pycon.org" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 0c917dc..43a1a95 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -2,6 +2,7 @@ import '../style/global.css' import '@fontsource-variable/jetbrains-mono' import { ClientRouter } from 'astro:transitions' +import Nav from './components/Nav.astro' interface Props { title: string @@ -27,8 +28,16 @@ const { title, description = 'PyconES 2026' } = Astro.props - + > + Saltar al contenido principal + +