|
|
| Zeile 1: |
Zeile 1: |
| <style> | | <h2>Familienangebote im August 2026</h2> |
| .buefa-calendar {
| | <p>Hier finden Sie die Familienangebote im August. Die Termine sind direkt im Kalender eingetragen.</p> |
| max-width: 1180px;
| |
| margin: 0 auto;
| |
| padding: 24px 0 40px;
| |
| font-family: Arial, Helvetica, sans-serif;
| |
| color: #28251d;
| |
| }
| |
| .buefa-calendar-head {
| |
| display: flex;
| |
| justify-content: space-between;
| |
| align-items: end;
| |
| gap: 16px;
| |
| margin-bottom: 18px;
| |
| flex-wrap: wrap;
| |
| }
| |
| .buefa-calendar h2 {
| |
| margin: 0;
| |
| font-size: 2rem;
| |
| line-height: 1.15;
| |
| }
| |
| .buefa-calendar-head p {
| |
| margin: 8px 0 0;
| |
| color: #6f6a63;
| |
| max-width: 70ch;
| |
| }
| |
| .buefa-badge {
| |
| display: inline-block;
| |
| background: #dcebea;
| |
| color: #01696f;
| |
| border-radius: 999px;
| |
| padding: 10px 14px;
| |
| font-size: 0.92rem;
| |
| font-weight: bold;
| |
| }
| |
| .buefa-weekdays,
| |
| .buefa-calendar-grid {
| |
| display: grid;
| |
| grid-template-columns: repeat(7, minmax(0, 1fr));
| |
| gap: 10px;
| |
| }
| |
| .buefa-weekday {
| |
| text-align: center;
| |
| padding: 12px 8px;
| |
| color: #6f6a63;
| |
| font-weight: bold;
| |
| font-size: 0.92rem;
| |
| }
| |
| .buefa-day {
| |
| min-height: 146px;
| |
| background: #fff;
| |
| border: 1px solid rgba(40, 37, 29, 0.12);
| |
| border-radius: 18px;
| |
| padding: 12px;
| |
| box-shadow: 0 10px 28px rgba(36, 31, 24, 0.08);
| |
| display: flex;
| |
| flex-direction: column;
| |
| gap: 10px;
| |
| }
| |
| .buefa-day-empty {
| |
| background: transparent;
| |
| border-style: dashed;
| |
| box-shadow: none;
| |
| }
| |
| .buefa-day-top {
| |
| display: flex;
| |
| justify-content: space-between;
| |
| align-items: center;
| |
| gap: 8px;
| |
| }
| |
| .buefa-day-number {
| |
| font-weight: bold;
| |
| font-size: 0.98rem;
| |
| color: #6f6a63;
| |
| }
| |
| .buefa-event-count {
| |
| font-size: 0.78rem;
| |
| color: #01696f;
| |
| background: #dcebea;
| |
| padding: 4px 8px;
| |
| border-radius: 999px;
| |
| font-weight: bold;
| |
| }
| |
| .buefa-events-list {
| |
| display: flex;
| |
| flex-direction: column;
| |
| gap: 8px;
| |
| }
| |
| .buefa-event-btn {
| |
| width: 100%;
| |
| text-align: left;
| |
| border: 1px solid transparent;
| |
| background: #f3f0ec;
| |
| border-radius: 12px;
| |
| padding: 10px 11px;
| |
| cursor: pointer;
| |
| }
| |
| .buefa-event-btn:hover,
| |
| .buefa-event-btn:focus {
| |
| border-color: rgba(1, 105, 111, 0.3);
| |
| background: #eef6f5;
| |
| outline: none;
| |
| }
| |
| .buefa-event-time {
| |
| display: block;
| |
| color: #01696f;
| |
| font-weight: bold;
| |
| font-size: 0.82rem;
| |
| margin-bottom: 3px;
| |
| }
| |
| .buefa-event-title {
| |
| display: block;
| |
| font-size: 0.92rem;
| |
| font-weight: bold;
| |
| color: #28251d;
| |
| }
| |
| .buefa-empty-text {
| |
| color: #6f6a63;
| |
| font-style: italic;
| |
| }
| |
| .buefa-modal-overlay {
| |
| position: fixed;
| |
| inset: 0;
| |
| background: rgba(20, 24, 34, 0.55);
| |
| z-index: 9998;
| |
| display: none;
| |
| }
| |
| .buefa-modal {
| |
| position: fixed;
| |
| left: 50%;
| |
| top: 50%;
| |
| transform: translate(-50%, -50%);
| |
| width: min(94vw, 620px);
| |
| max-height: 88vh;
| |
| overflow: auto;
| |
| background: #fff;
| |
| border-radius: 22px;
| |
| box-shadow: 0 24px 60px rgba(0,0,0,.25);
| |
| z-index: 9999;
| |
| display: none;
| |
| padding: 22px;
| |
| }
| |
| .buefa-modal-header {
| |
| display: flex;
| |
| justify-content: space-between;
| |
| gap: 12px;
| |
| align-items: start;
| |
| margin-bottom: 18px;
| |
| }
| |
| .buefa-modal-header h3 {
| |
| margin: 0;
| |
| font-size: 1.4rem;
| |
| line-height: 1.2;
| |
| }
| |
| .buefa-close {
| |
| width: 42px;
| |
| height: 42px;
| |
| border-radius: 999px;
| |
| border: 1px solid rgba(40, 37, 29, 0.12);
| |
| background: #f3f0ec;
| |
| font-size: 1.2rem;
| |
| cursor: pointer;
| |
| }
| |
| .buefa-detail-grid {
| |
| display: grid;
| |
| grid-template-columns: 140px 1fr;
| |
| gap: 12px 14px;
| |
| margin-bottom: 22px;
| |
| }
| |
| .buefa-detail-label {
| |
| font-weight: bold;
| |
| color: #6f6a63;
| |
| }
| |
| .buefa-modal-actions {
| |
| display: flex;
| |
| justify-content: flex-end;
| |
| gap: 10px;
| |
| flex-wrap: wrap;
| |
| }
| |
| .buefa-btn {
| |
| display: inline-block;
| |
| min-height: 44px;
| |
| padding: 11px 16px;
| |
| border-radius: 12px;
| |
| text-decoration: none;
| |
| font-weight: bold;
| |
| border: 1px solid rgba(40, 37, 29, 0.12);
| |
| color: #28251d;
| |
| background: #fff;
| |
| line-height: 1.5;
| |
| }
| |
| .buefa-btn-primary {
| |
| background: #01696f;
| |
| color: #fff;
| |
| border-color: #01696f;
| |
| }
| |
| .buefa-muted-empty {
| |
| color: #6f6a63;
| |
| font-style: italic;
| |
| }
| |
| @media (max-width: 780px) {
| |
| .buefa-weekdays { display: none; }
| |
| .buefa-calendar-grid { grid-template-columns: 1fr; }
| |
| .buefa-day-empty { display: none; }
| |
| .buefa-day { min-height: auto; padding: 14px; }
| |
| .buefa-detail-grid { grid-template-columns: 1fr; gap: 6px 0; }
| |
| }
| |
| </style> | |
|
| |
|
| <div class="buefa-calendar" id="buefaCalendarApp"> | | <table style="width:100%; border-collapse:collapse; table-layout:fixed;"> |
| <div class="buefa-calendar-head"> | | <thead> |
| <div>
| | <tr> |
| <h2>Familienangebote im August 2026</h2> | | <th style="border:1px solid #ccc; padding:8px;">Mo</th> |
| <p>In der Übersicht erscheinen nur Uhrzeit und Titel. Beim Klick öffnen sich die vollständigen Informationen.</p> | | <th style="border:1px solid #ccc; padding:8px;">Di</th> |
| </div>
| | <th style="border:1px solid #ccc; padding:8px;">Mi</th> |
| <div class="buefa-badge">August 2026 · mobil optimiert</div>
| | <th style="border:1px solid #ccc; padding:8px;">Do</th> |
| </div> | | <th style="border:1px solid #ccc; padding:8px;">Fr</th> |
| | <th style="border:1px solid #ccc; padding:8px;">Sa</th> |
| | <th style="border:1px solid #ccc; padding:8px;">So</th> |
| | </tr> |
| | </thead> |
| | <tbody> |
| | <tr> |
| | <td style="border:1px solid #ccc; vertical-align:top; padding:8px;"></td> |
| | <td style="border:1px solid #ccc; vertical-align:top; padding:8px;"></td> |
| | <td style="border:1px solid #ccc; vertical-align:top; padding:8px;"></td> |
| | <td style="border:1px solid #ccc; vertical-align:top; padding:8px;"></td> |
| | <td style="border:1px solid #ccc; vertical-align:top; padding:8px;"></td> |
| | <td style="border:1px solid #ccc; vertical-align:top; padding:8px;"> |
| | <strong>1</strong><br> |
| | 10:00 - 13:00<br> |
| | Bächlewanderung mit Kind und Kescher |
| | </td> |
| | <td style="border:1px solid #ccc; vertical-align:top; padding:8px;"> |
| | <strong>2</strong><br> |
| | 10:00 - 12:00<br> |
| | Geschwisterchen auf dem Weg<br><br> |
| | 14:00 - 17:00<br> |
| | Eiscafé frieDa |
| | </td> |
| | </tr> |
| | </tbody> |
| | </table> |
|
| |
|
| <div class="buefa-weekdays">
| | <h3>Termindetails</h3> |
| <div class="buefa-weekday">Mo</div>
| | <ul> |
| <div class="buefa-weekday">Di</div>
| | <li><strong>01.08.2026</strong> – 10:00 - 13:00 – Bächlewanderung mit Kind und Kescher – Start und Treffpunkt ist am Parkplatz Bebenhausen. – Geeignet für Familien mit Kindern ab 5 Jahren – Anmeldung wird benötigt – <a href="https://www.fbs-tuebingen.de/eltern-und-kinder/kw/bereich/kursdetails/kurs/261-2516B/kursname/Baechlewanderung%20mit%20Kind%20und%20Kescher/kategorie-id/11/" target="_blank" rel="noopener noreferrer">Mehr Infos</a></li> |
| <div class="buefa-weekday">Mi</div>
| | <li><strong>02.08.2026</strong> – 10:00 - 12:00 – Geschwisterchen auf dem Weg – FBS, Raum 003 Villa Metz, Hechingerstraße 13 – Für Kinder ab 4 Jahren mit einem Elternteil – Anmeldung wird benötigt – <a href="https://www.fbs-tuebingen.de/programm/kw/bereich/kursdetails/kurs/261-2509/kursname/Geschwisterchen%20auf%20dem%20Weg/" target="_blank" rel="noopener noreferrer">Mehr Infos</a></li> |
| <div class="buefa-weekday">Do</div>
| | <li><strong>02.08.2026</strong> – 14:00 - 17:00 – Eiscafé frieDa – Café frieDa, Friedrich-Dannenmann-Straße 69, 72070 Tübingen – Familien, Nachbarn, Menschen mit und ohne Behinderung – <a href="https://www.lebenshilfe-tuebingen.de/service/termine/" target="_blank" rel="noopener noreferrer">Mehr Infos</a></li> |
| <div class="buefa-weekday">Fr</div>
| | </ul> |
| <div class="buefa-weekday">Sa</div>
| |
| <div class="buefa-weekday">So</div>
| |
| </div>
| |
| | |
| <div class="buefa-calendar-grid" id="buefaCalendarGrid"></div>
| |
| </div>
| |
| | |
| <div class="buefa-modal-overlay" id="buefaModalOverlay"></div>
| |
| <div class="buefa-modal" id="buefaModal" role="dialog" aria-modal="true" aria-labelledby="buefaModalTitle">
| |
| <div class="buefa-modal-header">
| |
| <h3 id="buefaModalTitle"></h3>
| |
| <button type="button" class="buefa-close" id="buefaModalClose" aria-label="Schliessen">×</button>
| |
| </div>
| |
| <div class="buefa-detail-grid"> | |
| <div class="buefa-detail-label">Datum</div>
| |
| <div id="buefaDetailDate"></div>
| |
| <div class="buefa-detail-label">Uhrzeit</div>
| |
| <div id="buefaDetailTime"></div>
| |
| <div class="buefa-detail-label">Ort</div>
| |
| <div id="buefaDetailLocation"></div>
| |
| <div class="buefa-detail-label">Zielgruppe</div>
| |
| <div id="buefaDetailAudience"></div>
| |
| <div class="buefa-detail-label">Anmeldung</div>
| |
| <div id="buefaDetailRegistration"></div>
| |
| <div class="buefa-detail-label">Zusatztext</div>
| |
| <div id="buefaDetailDescription"></div>
| |
| </div>
| |
| <div class="buefa-modal-actions">
| |
| <button type="button" class="buefa-btn" id="buefaModalCloseBottom">Schliessen</button>
| |
| <a class="buefa-btn buefa-btn-primary" id="buefaDetailLink" href="#" target="_blank" rel="noopener noreferrer">Mehr Infos</a>
| |
| </div>
| |
| </div>
| |
| | |
| <script>
| |
| (function () {
| |
| var events = [
| |
| { date: "2026-08-01", title: "Bächlewanderung mit Kind und Kescher", time: "10:00 - 13:00", location: "Start und Treffpunkt ist am Parkplatz Bebenhausen.", audience: "Geeignet für Familien mit Kindern ab 5 Jahren", registration: "wird benötigt", url: "https://www.fbs-tuebingen.de/eltern-und-kinder/kw/bereich/kursdetails/kurs/261-2516B/kursname/Baechlewanderung%20mit%20Kind%20und%20Kescher/kategorie-id/11/", description: "Wir wandern am Goldersbach entlang über die Tellerbrücke zur Teufelsbrücke." },
| |
| { date: "2026-08-02", title: "Eiscafé frieDa", time: "14:00 - 17:00", location: "Café frieDa, Friedrich-Dannenmann-Straße 69, 72070 Tübingen", audience: "Familien, Nachbarn, Menschen mit und ohne Behinderung", registration: "Keine Angabe", url: "https://www.lebenshilfe-tuebingen.de/service/termine/", description: "Das Eiscafé frieDa ist ein Begegnungs-Ort." },
| |
| { date: "2026-08-02", title: "Geschwisterchen auf dem Weg", time: "10:00 - 12:00", location: "FBS, Raum 003 Villa Metz, Hechingerstraße 13", audience: "Für Kinder ab 4 Jahren mit einem Elternteil", registration: "wird benötigt", url: "https://www.fbs-tuebingen.de/programm/kw/bereich/kursdetails/kurs/261-2509/kursname/Geschwisterchen%20auf%20dem%20Weg/", description: "Vorbereitung auf ein Geschwisterchen." },
| |
| { date: "2026-08-04", title: "BabyBrunch", time: "09:30 - 11:30", location: "elkiko Familienzentrum", audience: "Eltern mit Säuglingen und Kleinkindern", registration: "babybrunch@elkiko.de", url: "https://www.elkiko.de/content2/index.php/de/programm/babybrunch-brunch1plus.html", description: "" },
| |
| { date: "2026-08-05", title: "Spielplatztreff", time: "14:30 - 15:30", location: "Piratenspielplatz, Anlagenpark", audience: "Familien mit jüngeren Kindern", registration: "Keine Anmeldung erforderlich", url: "", description: "Treffpunkt zum Austausch mit der Familienbeauftragten." },
| |
| { date: "2026-08-06", title: "BabyBrunch", time: "09:30 - 11:30", location: "elkiko Familienzentrum", audience: "Eltern mit Säuglingen und Kleinkindern", registration: "babybrunch@elkiko.de", url: "https://www.elkiko.de/content2/index.php/de/programm/babybrunch-brunch1plus.html", description: "" },
| |
| { date: "2026-08-06", title: "Sommerferien mit dem LESE-HAUS", time: "11:00", location: "Alter Botanischer Garten, Wiese neben dem Kinderspielplatz; bei schlechtem Wetter: Thekla-Waitz-Studio, im EG der Stadtbücherei, Nonnengasse 19, 72070 Tübingen", audience: "Kinder von 4 bis 8 Jahre mit Begleitpersonen", registration: "Keine Angabe", url: "https://tuebingen.ferienprogramm-online.de/", description: "Vorlesestunde zum Thema Unsere Welt ist bunt mit Geschichten von Lesepatinnen und Lesepaten des LESE-HAUSes sowie Mitarbeitenden der Stadtbücherei. Bei schönem Wetter findet die Veranstaltung im Alten Botanischen Garten statt, bei schlechtem Wetter im Thekla-Waitz-Studio." },
| |
| { date: "2026-08-09", title: "Eiscafé frieDa", time: "14:00 - 17:00", location: "Café frieDa, Friedrich-Dannenmann-Straße 69, 72070 Tübingen", audience: "Familien, Nachbarn, Menschen mit und ohne Behinderung", registration: "Keine Angabe", url: "https://www.lebenshilfe-tuebingen.de/service/termine/", description: "Das Eiscafé frieDa ist ein Begegnungs-Ort." },
| |
| { date: "2026-08-11", title: "BabyBrunch", time: "09:30 - 11:30", location: "elkiko Familienzentrum", audience: "Eltern mit Säuglingen und Kleinkindern", registration: "babybrunch@elkiko.de", url: "https://www.elkiko.de/content2/index.php/de/programm/babybrunch-brunch1plus.html", description: "" },
| |
| { date: "2026-08-12", title: "Spielplatztreff", time: "14:30 - 15:30", location: "Ort bitte ergänzen", audience: "Zielgruppe bitte ergänzen", registration: "Keine Angabe", url: "", description: "" },
| |
| { date: "2026-08-13", title: "BabyBrunch", time: "09:30 - 11:30", location: "elkiko Familienzentrum", audience: "Eltern mit Säuglingen und Kleinkindern", registration: "babybrunch@elkiko.de", url: "https://www.elkiko.de/content2/index.php/de/programm/babybrunch-brunch1plus.html", description: "" },
| |
| { date: "2026-08-13", title: "Sommerferien mit dem LESE-HAUS", time: "11:00", location: "Alter Botanischer Garten, Wiese neben dem Kinderspielplatz; bei schlechtem Wetter: Thekla-Waitz-Studio, im EG der Stadtbücherei, Nonnengasse 19, 72070 Tübingen", audience: "Kinder von 4 bis 8 Jahre mit Begleitpersonen", registration: "Keine Angabe", url: "https://tuebingen.ferienprogramm-online.de/", description: "Vorlesestunde zum Thema Unsere Welt ist bunt mit Geschichten von Lesepatinnen und Lesepaten des LESE-HAUSes sowie Mitarbeitenden der Stadtbücherei. Bei schönem Wetter findet die Veranstaltung im Alten Botanischen Garten statt, bei schlechtem Wetter im Thekla-Waitz-Studio." },
| |
| { date: "2026-08-16", title: "Eiscafé frieDa", time: "14:00 - 17:00", location: "Café frieDa, Friedrich-Dannenmann-Straße 69, 72070 Tübingen", audience: "Familien, Nachbarn, Menschen mit und ohne Behinderung", registration: "Keine Angabe", url: "https://www.lebenshilfe-tuebingen.de/service/termine/", description: "Das Eiscafé frieDa ist ein Begegnungs-Ort." },
| |
| { date: "2026-08-16", title: "Bunt backen mit Kindern: Regenbogen-Muffins & Cake-Pops", time: "16:00 - 18:30", location: "Ort bitte ergänzen", audience: "Zielgruppe bitte ergänzen", registration: "Keine Angabe", url: "", description: "" },
| |
| { date: "2026-08-18", title: "BabyBrunch", time: "09:30 - 11:30", location: "elkiko Familienzentrum", audience: "Eltern mit Säuglingen und Kleinkindern", registration: "babybrunch@elkiko.de", url: "https://www.elkiko.de/content2/index.php/de/programm/babybrunch-brunch1plus.html", description: "" },
| |
| { date: "2026-08-19", title: "Spielplatztreff", time: "14:30 - 15:30", location: "Ort bitte ergänzen", audience: "Zielgruppe bitte ergänzen", registration: "Keine Angabe", url: "", description: "" },
| |
| { date: "2026-08-20", title: "BabyBrunch", time: "09:30 - 11:30", location: "elkiko Familienzentrum", audience: "Eltern mit Säuglingen und Kleinkindern", registration: "babybrunch@elkiko.de", url: "https://www.elkiko.de/content2/index.php/de/programm/babybrunch-brunch1plus.html", description: "" },
| |
| { date: "2026-08-20", title: "Sommerferien mit dem LESE-HAUS", time: "11:00", location: "Alter Botanischer Garten, Wiese neben dem Kinderspielplatz; bei schlechtem Wetter: Thekla-Waitz-Studio, im EG der Stadtbücherei, Nonnengasse 19, 72070 Tübingen", audience: "Kinder von 4 bis 8 Jahre mit Begleitpersonen", registration: "Keine Angabe", url: "https://tuebingen.ferienprogramm-online.de/", description: "Vorlesestunde zum Thema Unsere Welt ist bunt mit Geschichten von Lesepatinnen und Lesepaten des LESE-HAUSes sowie Mitarbeitenden der Stadtbücherei. Bei schönem Wetter findet die Veranstaltung im Alten Botanischen Garten statt, bei schlechtem Wetter im Thekla-Waitz-Studio." },
| |
| { date: "2026-08-23", title: "Eiscafé frieDa", time: "14:00 - 17:00", location: "Café frieDa, Friedrich-Dannenmann-Straße 69, 72070 Tübingen", audience: "Familien, Nachbarn, Menschen mit und ohne Behinderung", registration: "Keine Angabe", url: "https://www.lebenshilfe-tuebingen.de/service/termine/", description: "Das Eiscafé frieDa ist ein Begegnungs-Ort." },
| |
| { date: "2026-08-25", title: "BabyBrunch", time: "09:30 - 11:30", location: "elkiko Familienzentrum", audience: "Eltern mit Säuglingen und Kleinkindern", registration: "babybrunch@elkiko.de", url: "https://www.elkiko.de/content2/index.php/de/programm/babybrunch-brunch1plus.html", description: "" },
| |
| { date: "2026-08-26", title: "Spielplatztreff", time: "14:30 - 15:30", location: "Ort bitte ergänzen", audience: "Zielgruppe bitte ergänzen", registration: "Keine Angabe", url: "", description: "" },
| |
| { date: "2026-08-27", title: "BabyBrunch", time: "09:30 - 11:30", location: "elkiko Familienzentrum", audience: "Eltern mit Säuglingen und Kleinkindern", registration: "babybrunch@elkiko.de", url: "https://www.elkiko.de/content2/index.php/de/programm/babybrunch-brunch1plus.html", description: "" },
| |
| { date: "2026-08-27", title: "Sommerferien mit dem LESE-HAUS", time: "11:00", location: "Alter Botanischer Garten, Wiese neben dem Kinderspielplatz; bei schlechtem Wetter: Thekla-Waitz-Studio, im EG der Stadtbücherei, Nonnengasse 19, 72070 Tübingen", audience: "Kinder von 4 bis 8 Jahre mit Begleitpersonen", registration: "Keine Angabe", url: "https://tuebingen.ferienprogramm-online.de/", description: "Vorlesestunde zum Thema Unsere Welt ist bunt mit Geschichten von Lesepatinnen und Lesepaten des LESE-HAUSes sowie Mitarbeitenden der Stadtbücherei. Bei schönem Wetter findet die Veranstaltung im Alten Botanischen Garten statt, bei schlechtem Wetter im Thekla-Waitz-Studio." },
| |
| { date: "2026-08-30", title: "Eiscafé frieDa", time: "14:00 - 17:00", location: "Café frieDa, Friedrich-Dannenmann-Straße 69, 72070 Tübingen", audience: "Familien, Nachbarn, Menschen mit und ohne Behinderung", registration: "Keine Angabe", url: "https://www.lebenshilfe-tuebingen.de/service/termine/", description: "Das Eiscafé frieDa ist ein Begegnungs-Ort." }
| |
| ];
| |
| | |
| var weekdayLabels = ["Mo", "Di", "Mi", "Do", "Fr", "Sa", "So"];
| |
| var monthName = "August";
| |
| var year = 2026;
| |
| var monthIndex = 7;
| |
| var calendarGrid = document.getElementById("buefaCalendarGrid");
| |
| var overlay = document.getElementById("buefaModalOverlay");
| |
| var modal = document.getElementById("buefaModal");
| |
| | |
| if (!calendarGrid) {
| |
| return;
| |
| }
| |
| | |
| var grouped = {};
| |
| var i;
| |
| for (i = 0; i < events.length; i++) {
| |
| var item = events[i];
| |
| var parts = item.date.split("-");
| |
| var dayKey = parseInt(parts[2], 10);
| |
| if (!grouped[dayKey]) {
| |
| grouped[dayKey] = [];
| |
| }
| |
| grouped[dayKey].push(item);
| |
| }
| |
| | |
| var firstDay = new Date(year, monthIndex, 1);
| |
| var daysInMonth = new Date(year, monthIndex + 1, 0).getDate();
| |
| var offset = (firstDay.getDay() + 6) % 7;
| |
| | |
| for (i = 0; i < offset; i++) {
| |
| var empty = document.createElement("div");
| |
| empty.className = "buefa-day buefa-day-empty";
| |
| calendarGrid.appendChild(empty);
| |
| }
| |
| | |
| for (var day = 1; day <= daysInMonth; day++) {
| |
| var items = grouped[day] || [];
| |
| var card = document.createElement("div");
| |
| card.className = "buefa-day";
| |
| | |
| var top = document.createElement("div");
| |
| top.className = "buefa-day-top";
| |
| | |
| var weekday = weekdayLabels[(offset + day - 1) % 7];
| |
| var dayLabel = document.createElement("div");
| |
| dayLabel.className = "buefa-day-number";
| |
| dayLabel.appendChild(document.createTextNode(weekday + ", " + day + ". " + monthName));
| |
| top.appendChild(dayLabel);
| |
| | |
| if (items.length > 0) {
| |
| var count = document.createElement("div");
| |
| count.className = "buefa-event-count";
| |
| count.appendChild(document.createTextNode(items.length + " Termin" + (items.length > 1 ? "e" : "")));
| |
| top.appendChild(count);
| |
| }
| |
| | |
| card.appendChild(top);
| |
| | |
| var list = document.createElement("div");
| |
| list.className = "buefa-events-list";
| |
| | |
| if (items.length === 0) {
| |
| var emptyText = document.createElement("div");
| |
| emptyText.className = "buefa-empty-text";
| |
| emptyText.appendChild(document.createTextNode("Keine Einträge"));
| |
| list.appendChild(emptyText);
| |
| } else {
| |
| for (var j = 0; j < items.length; j++) {
| |
| var eventItem = items[j];
| |
| var btn = document.createElement("button");
| |
| btn.className = "buefa-event-btn";
| |
| btn.type = "button";
| |
| btn.buefaData = eventItem;
| |
| | |
| var time = document.createElement("span");
| |
| time.className = "buefa-event-time";
| |
| time.appendChild(document.createTextNode(eventItem.time || "Uhrzeit offen"));
| |
| | |
| var title = document.createElement("span");
| |
| title.className = "buefa-event-title";
| |
| title.innerHTML = eventItem.title;
| |
| | |
| btn.appendChild(time);
| |
| btn.appendChild(title);
| |
| btn.onclick = function () {
| |
| openModal(this.buefaData);
| |
| };
| |
| list.appendChild(btn);
| |
| }
| |
| }
| |
| | |
| card.appendChild(list);
| |
| calendarGrid.appendChild(card);
| |
| }
| |
| | |
| function setText(id, value, fallback) {
| |
| var el = document.getElementById(id);
| |
| var textValue;
| |
| | |
| if (!el) {
| |
| return;
| |
| }
| |
| | |
| textValue = value;
| |
| | |
| if (textValue === null || textValue === undefined || textValue === "") {
| |
| textValue = fallback;
| |
| el.className = "buefa-muted-empty";
| |
| } else {
| |
| el.className = "";
| |
| }
| |
| | |
| el.innerHTML = textValue;
| |
| }
| |
| | |
| function formatDate(dateString) {
| |
| var date = new Date(dateString + "T00:00:00");
| |
| return date.toLocaleDateString("de-DE", {
| |
| weekday: "long",
| |
| day: "numeric",
| |
| month: "long",
| |
| year: "numeric"
| |
| });
| |
| }
| |
| | |
| function openModal(item) {
| |
| setText("buefaModalTitle", item.title, "Termin");
| |
| setText("buefaDetailDate", formatDate(item.date), "Keine Angabe");
| |
| setText("buefaDetailTime", item.time, "Uhrzeit offen");
| |
| setText("buefaDetailLocation", item.location, "Keine Angabe");
| |
| setText("buefaDetailAudience", item.audience, "Keine Angabe");
| |
| setText("buefaDetailRegistration", item.registration, "Keine Angabe");
| |
| setText("buefaDetailDescription", item.description, "Keine Angabe");
| |
| | |
| var link = document.getElementById("buefaDetailLink");
| |
| if (link) {
| |
| if (item.url && item.url.trim()) {
| |
| link.href = item.url;
| |
| link.style.display = "inline-block";
| |
| } else {
| |
| link.removeAttribute("href");
| |
| link.style.display = "none";
| |
| }
| |
| }
| |
| | |
| if (overlay) {
| |
| overlay.style.display = "block";
| |
| }
| |
| if (modal) {
| |
| modal.style.display = "block";
| |
| }
| |
| }
| |
| | |
| function closeModal() {
| |
| if (overlay) {
| |
| overlay.style.display = "none";
| |
| }
| |
| if (modal) {
| |
| modal.style.display = "none";
| |
| }
| |
| }
| |
| | |
| var closeTop = document.getElementById("buefaModalClose");
| |
| var closeBottom = document.getElementById("buefaModalCloseBottom");
| |
| if (closeTop) {
| |
| closeTop.onclick = closeModal;
| |
| }
| |
| if (closeBottom) {
| |
| closeBottom.onclick = closeModal;
| |
| }
| |
| if (overlay) {
| |
| overlay.onclick = closeModal;
| |
| }
| |
| })();
| |
| </script> | |