Add noticeboard.md
This commit is contained in:
parent
c445acda9b
commit
4e2f7cbae7
1 changed files with 37 additions and 0 deletions
37
docs/noticeboard.md
Normal file
37
docs/noticeboard.md
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# 🗞️ KH3 Noticeboard
|
||||
|
||||
<div id="noticeboard">
|
||||
<p><em>Loading latest updates...</em></p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
async function loadNoticeboard() {
|
||||
const container = document.getElementById("noticeboard");
|
||||
|
||||
try {
|
||||
const response = await fetch("/_files/noticeboard_data.json");
|
||||
const data = await response.json();
|
||||
|
||||
container.innerHTML = `
|
||||
<p><strong>Last updated:</strong> ${new Date(data.lastUpdated).toLocaleString()}</p>
|
||||
${data.sections.map(section => `
|
||||
<div class="md-typeset" style="margin-top: 2em;">
|
||||
<h2>${section.title}</h2>
|
||||
<ul>
|
||||
${section.items.map(item => `
|
||||
<li>
|
||||
<strong>${item.assignee}</strong>: ${item.description}
|
||||
${item.type === "action_item" ? "🔥" : ""}
|
||||
</li>
|
||||
`).join("")}
|
||||
</ul>
|
||||
</div>
|
||||
`).join("")}
|
||||
`;
|
||||
} catch (err) {
|
||||
container.innerHTML = `<p style="color:red;">Error loading noticeboard: ${err}</p>`;
|
||||
}
|
||||
}
|
||||
|
||||
loadNoticeboard();
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue