Update events
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2025-12-09 17:13:20 +00:00
parent 6ea6a58532
commit b2f04dc726
6 changed files with 9 additions and 31 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 800 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 747 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 KiB

View File

@ -8,39 +8,17 @@ import ImageCarousel from "../components/ImageCarousel.astro";
import Contact from "../components/Contact.astro";
import About from "../components/About.astro";
const API_BASE = 'https://cms.gallus-pub.ch';
const events = [
// Fetch events from backend API
let events = [];
try {
const eventsResponse = await fetch(`${API_BASE}/api/events/public`);
if (eventsResponse.ok) {
const eventsData = await eventsResponse.json();
events = (eventsData.events || []).map((ev: any) => ({
image: `${API_BASE}${ev.imageUrl}`,
title: ev.title,
date: ev.date,
description: ev.description
}));
}
} catch (error) {
console.error('Failed to fetch events:', error);
}
];
// Fetch gallery images from backend API
let images = [];
try {
const galleryResponse = await fetch(`${API_BASE}/api/gallery/public`);
if (galleryResponse.ok) {
const galleryData = await galleryResponse.json();
images = (galleryData.images || []).map((img: any) => ({
src: `${API_BASE}${img.imageUrl}`,
alt: img.altText
}));
}
} catch (error) {
console.error('Failed to fetch gallery:', error);
}
const images = [
{ src: "/static/images/gallery/miyu98xy-24n3xo.png", alt: "miyu98xy-24n3xo.png" },
{ src: "/static/images/gallery/miyu9ex6-6imbgc.png", alt: "miyu9ex6-6imbgc.png" },
{ src: "/static/images/gallery/miyu9s7x-8nsszm.png", alt: "miyu9s7x-8nsszm.png" },
{ src: "/static/images/gallery/miyu9vl2-pndg1t.png", alt: "miyu9vl2-pndg1t.png" },
{ src: "/static/images/gallery/miyu9za8-edtk3k.png", alt: "miyu9za8-edtk3k.png" }
];
---
<Layout>