re-add noc calendars

This commit is contained in:
Fabrice Lamant
2024-07-19 14:58:21 +01:00
parent f18adfaf48
commit 3e3d58f7d0
3 changed files with 95 additions and 23 deletions

View File

@ -143,9 +143,9 @@ const generateOutputPage = () => {
html.push("<table>");
SPORTS.map((sport) => {
html.push(`<tr class="even:bg-slate-200">`);
html.push("<tr class=\"even:bg-slate-200\">");
html.push(`<th class="font-bold text-left">${sport.name}</td>`);
html.push(`<td>`);
html.push("<td>");
html.push(`<a href="${sport.key}/general.ics" class="${linkClass}">Full schedule</a>`);
sport.NOCS.sort().forEach((noc) => {
html.push(`<a href="${sport.key}/${noc}.ics" class="${linkClass}">${getNOCFlag(noc)} ${noc}</a>`);
@ -153,6 +153,14 @@ const generateOutputPage = () => {
html.push("</td>");
html.push("</tr>");
});
html.push("<tr class=\"even:bg-slate-200\">");
html.push("<th class=\"font-bold text-left\">All sports</td>");
html.push("<td>");
NOCS.sort().forEach((noc) => {
html.push(`<a href="general/${noc}.ics" class="${linkClass}">${getNOCFlag(noc)} ${noc}</a>`);
});
html.push("</tr>");
html.push("</table>");
const template = fs.readFileSync(`${__dirname}/template.html`, "utf-8");