diff --git a/assets/js/content-loader.js b/assets/js/content-loader.js index 1a04281..d0cefbc 100644 --- a/assets/js/content-loader.js +++ b/assets/js/content-loader.js @@ -13,7 +13,12 @@ async function loadContent(sectionId, contentFile) { // Find the section and update its content const section = document.getElementById(sectionId); if (section) { + // Preserve the close button + const closeButton = section.querySelector('.close'); section.innerHTML = html; + if (closeButton) { + section.insertBefore(closeButton, section.firstChild); + } console.log(`Successfully updated content for ${sectionId}`); } else { console.error(`Section element not found for ${sectionId}`); @@ -29,7 +34,11 @@ async function loadContent(sectionId, contentFile) { // Show error message in the section const section = document.getElementById(sectionId); if (section) { + const closeButton = section.querySelector('.close'); section.innerHTML = `
Could not load content. Please try refreshing the page.
Error details: ${error.message}
`; + if (closeButton) { + section.insertBefore(closeButton, section.firstChild); + } } } } @@ -37,14 +46,13 @@ async function loadContent(sectionId, contentFile) { // Load content when the page loads document.addEventListener('DOMContentLoaded', () => { console.log('DOM Content Loaded - Starting content loading'); - // Map of section IDs to content files + // Map of section IDs to content files - only for sections that need external content const contentMap = { 'announce': 'announce.html', 'date': 'date.html', 'showmetheway': 'directions.html', 'rsvp': 'rsvp.html', - 'campinfos': 'campinfos.html', - 'y2024': 'y2024.html' + 'campinfos': 'campinfos.html' }; // Load content for each section diff --git a/assets/js/main.js b/assets/js/main.js index 838b635..33285e7 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -396,4 +396,19 @@ $main._show(location.hash.substr(1), true); }); + // Add close button functionality + document.addEventListener('DOMContentLoaded', () => { + // Add click event listeners to all close buttons + document.querySelectorAll('.close').forEach(button => { + button.addEventListener('click', () => { + // Find the closest article element + const article = button.closest('article'); + if (article) { + // Use the existing _hide method + $main._hide(true); + } + }); + }); + }); + })(jQuery); \ No newline at end of file diff --git a/index.html b/index.html index c62270b..f74b3fb 100644 --- a/index.html +++ b/index.html @@ -64,32 +64,38 @@Um den Timetable zu füllen, brauchen wir Eure Workshops, Vorträge, Aktivitäten - was Ihr schon immer gern mit anderen Menschen machen wolltet.
@@ -109,7 +115,17 @@
Berichte und Fotos des ersten FediCamp im Jahre 2022 findet Ihr hier.
+Berichte und Fotos des zweiten FediCamp im Jahre 2023 findet Ihr hier.
+ +Du warst Teilnehmende oder Teilnehmer? Dann kannst Du die Bilder (und noch mehr) auch im Original und ohne Blurring bekommen. Schreibe dazu eine Mail oder teile das im Matrix-Raum mit!
Hier werden die Berichte und Informationen zum Fedi.Camp 2024 gesammelt.
+Das Fedi.Camp 2024 findet vom 23. bis 25. August 2024 statt.
+Weitere Informationen folgen in Kürze.
Berichte und Fotos des ersten FediCamp im Jahre 2022 findet Ihr hier.
@@ -155,6 +172,7 @@Berichte und Fotos des zweiten FediCamp im Jahre 2023 findet Ihr hier.
@@ -216,6 +234,7 @@Hier findet Ihr aktuelle Informationen. Kommt auch gern in den Matrix Raum!
@@ -224,6 +243,7 @@This website is designed and hosted by KABI.tk
A commissioned production by FediCamp.