From 0fd3c014c14e8ab5bbae217765a6f8c9796536ba Mon Sep 17 00:00:00 2001 From: "Carlos (Almeira)" Date: Thu, 26 Mar 2026 15:56:02 -0500 Subject: [PATCH] Refactor: Full-width support for Eventos --- src/app/eventos/page.tsx | 103 ++++++++++++++++++++++----------------- 1 file changed, 57 insertions(+), 46 deletions(-) diff --git a/src/app/eventos/page.tsx b/src/app/eventos/page.tsx index 80df50d..b1e2db4 100644 --- a/src/app/eventos/page.tsx +++ b/src/app/eventos/page.tsx @@ -56,6 +56,7 @@ async function fetchEventosData() { export default async function EventosPage() { const { posts, cardSettings } = await fetchEventosData(); + const hasSidebar = await hasSidebarContent(); return (
@@ -84,55 +85,65 @@ export default async function EventosPage() { -
-
-
-
-
- Próximos -
-

Agenda de Eventos

-
-
- - {posts.length === 0 ? ( -
-
- +
+
+
+
+
+
+
+ Próximos +
+

Agenda de Eventos

+
-

Sin Eventos Próximos

-

El portal se encuentra a la espera de nuevas programaciones en la región.

-
- ) : ( -
- {posts.map((post) => { - const PROJECT_ID = process.env.NEXT_PUBLIC_APPWRITE_PROJECT_ID || '69b84df5003bd8957c5c'; - const ENDPOINT = process.env.NEXT_PUBLIC_APPWRITE_ENDPOINT || 'https://appwrite.almeira.com.co/v1'; - let imagenUrl = post.og_image_url || null; - if (post.resolved_media) { - imagenUrl = `${ENDPOINT}/storage/buckets/${post.resolved_media.bucket_id}/files/${post.resolved_media.file_id}/preview?project=${PROJECT_ID}&width=800&height=500&quality=85`; - } + {posts.length === 0 ? ( +
+
+ +
+

Sin Eventos Próximos

+

El portal se encuentra a la espera de nuevas programaciones en la región.

+
+ ) : ( +
+ {posts.map((post) => { + const PROJECT_ID = process.env.NEXT_PUBLIC_APPWRITE_PROJECT_ID || '69b84df5003bd8957c5c'; + const ENDPOINT = process.env.NEXT_PUBLIC_APPWRITE_ENDPOINT || 'https://appwrite.almeira.com.co/v1'; + let imagenUrl = post.og_image_url || null; - return ( - ]*>?/gm, '').substring(0, 150) + '...'} - tipo="Evento" - fecha={post.fecha_publicacion || post.$createdAt} - imagenUrl={imagenUrl} - showCategory={cardSettings.showCategory} - showFooterDate={cardSettings.showFooterDate} - showFooterButton={cardSettings.showFooterButton} - footerText={cardSettings.footerText} - /> - ) - })} -
- )} + if (post.resolved_media) { + imagenUrl = `${ENDPOINT}/storage/buckets/${post.resolved_media.bucket_id}/files/${post.resolved_media.file_id}/preview?project=${PROJECT_ID}&width=800&height=500&quality=85`; + } + + return ( + ]*>?/gm, '').substring(0, 150) + '...'} + tipo="Evento" + fecha={post.fecha_publicacion || post.$createdAt} + imagenUrl={imagenUrl} + showCategory={cardSettings.showCategory} + showFooterDate={cardSettings.showFooterDate} + showFooterButton={cardSettings.showFooterButton} + footerText={cardSettings.footerText} + /> + ) + })} +
+ )} +
+ + {hasSidebar && ( + + )} +
);