streaming plan

This commit is contained in:
TheErrorExe 2025-02-22 21:55:48 +01:00
parent ea7b26cbff
commit b24252c810
2 changed files with 25 additions and 4 deletions

View File

@ -112,7 +112,7 @@
<tr>
<th>Tag</th>
<th>Zeit</th>
<th>Spiel</th>
<th>Extra-Infos</th>
</tr>
</table>
</div>
@ -144,14 +144,13 @@
}, { threshold: 0.3 });
cards.forEach(card => observer.observe(card));
// Streaming-Plan aus JSON laden
fetch("schedule.json")
fetch("/schedule.json")
.then(response => response.json())
.then(data => {
const table = document.getElementById("scheduleTable");
data.forEach(event => {
const row = document.createElement("tr");
row.innerHTML = `<td>${event.tag}</td><td>${event.zeit}</td><td>${event.spiel}</td>`;
row.innerHTML = `<td>${event.tag}</td><td>${event.zeit}</td><td>${event.infos}</td>`;
table.appendChild(row);
});
})

22
drmifo/schedule.json Normal file
View File

@ -0,0 +1,22 @@
[
{
"tag": "Montag",
"zeit": "18:00 - 20:00",
"infos": "Blockattack Road to "
},
{
"tag": "Mittwoch",
"zeit": "19:00 - 21:00",
"infos": "Minecraft"
},
{
"tag": "Freitag",
"zeit": "20:00 - 22:00",
"infos": "Minecraft"
},
{
"tag": "Sonntag",
"zeit": "15:00 - 18:00",
"infos": "kein minecraft"
}
]