From 5d233a409fb70396a65a2c846424bee1b769011d Mon Sep 17 00:00:00 2001 From: Julio Ruiz Date: Thu, 12 Feb 2026 19:40:22 -0500 Subject: [PATCH] Updated content Fixed carousel in news --- src/components/section/CarouselSection.astro | 35 ++++++++++---------- src/content.config.js | 5 ++- src/data/news/3.md | 20 ++++++++--- src/pages/news/[id].astro | 2 +- 4 files changed, 38 insertions(+), 24 deletions(-) diff --git a/src/components/section/CarouselSection.astro b/src/components/section/CarouselSection.astro index cad35e5..f1f8dd6 100644 --- a/src/components/section/CarouselSection.astro +++ b/src/components/section/CarouselSection.astro @@ -16,7 +16,7 @@ const { images } = Astro.props;
-
+
{image.text}
@@ -42,23 +42,24 @@ const { images } = Astro.props; diff --git a/src/content.config.js b/src/content.config.js index 94e72e5..d71092c 100644 --- a/src/content.config.js +++ b/src/content.config.js @@ -13,7 +13,10 @@ const news = defineCollection({ country: z.string().optional(), thumbnail: z.string().optional(), youtube: z.string().optional(), - gallery: z.string().array().optional().nullable() + gallery: z.array(z.object({ + image: z.string().optional(), + text: z.string().optional() + })).optional().nullable() }), }); diff --git a/src/data/news/3.md b/src/data/news/3.md index 2216b4d..ca01175 100644 --- a/src/data/news/3.md +++ b/src/data/news/3.md @@ -9,11 +9,21 @@ country: 'CO' thumbnail: https://ik.imagekit.io/crpy/JBP-CONDECORACION-25.webp youtube: https://www.youtube.com/watch?v=ENQE4stFb4A gallery: [ - 'https://ik.imagekit.io/crpy/JBP-CONDECORACION-16.webp', - 'https://ik.imagekit.io/crpy/JBP-CONDECORACION-05.webp', - 'https://ik.imagekit.io/crpy/JBP-CONDECORACION-22.webp', - 'https://ik.imagekit.io/crpy/JBP-CONDECORACION-04.webp', - 'https://ik.imagekit.io/crpy/JBP-CONDECORACION-25.webp' + { + image: 'https://ik.imagekit.io/crpy/JBP-CONDECORACION-16.webp', + }, + { + image: 'https://ik.imagekit.io/crpy/JBP-CONDECORACION-05.webp', + }, + { + image: 'https://ik.imagekit.io/crpy/JBP-CONDECORACION-22.webp', + }, + { + image: 'https://ik.imagekit.io/crpy/JBP-CONDECORACION-04.webp', + }, + { + image: 'https://ik.imagekit.io/crpy/JBP-CONDECORACION-25.webp' + } ] --- diff --git a/src/pages/news/[id].astro b/src/pages/news/[id].astro index ac18baf..08d39e4 100644 --- a/src/pages/news/[id].astro +++ b/src/pages/news/[id].astro @@ -41,7 +41,7 @@ const { Content } = await render(post); {post.data.gallery && ( post.data.gallery.map(galleryImage => ( - + {galleryImage.text} )) )}