/** * @copyright nhcarrigan * @license Naomi's Public License * @author Naomi Carrigan */ import { actionIcons, platformIcons } from "../config/icons.js"; import { landingHtml } from "../config/landing.js"; import type { App } from "../interfaces/app.js"; /** * Generates the HTML for the landing page. * @param app - The application instance. * @returns An HTML string. */ export const generateHtml = (app: App): string => { const sanctions = app.sanctions.toSorted((a, b) => { return b.number - a.number; }); const sanctionHtml = sanctions.map((sanction) => { return sanction.revoked && sanction.revokedBy !== null && sanction.revokeDate !== null && sanction.revokeReason !== null ? `
${sanction.uuid}
${sanction.reason}
Performed by: ${sanction.moderator} on ${sanction.date.toLocaleString("en-GB")}
Revoked:
${sanction.revokeReason}
Revoked by: ${ sanction.revokedBy } on ${sanction.revokeDate.toLocaleString("en-GB")}
${sanction.uuid}
${sanction.reason}
Performed by: ${sanction.moderator} on ${sanction.date.toLocaleString("en-GB")}