{ title, links ? [], embedLink ? null, ... }: with builtins; let withLinkAttr = link: attr: def: value: if hasAttr attr link then value else def; linkHTML = link: '' ${link.title} ${if hasAttr "key" link then "(${link.key})" else ""} ${if hasAttr "altUrl" link then '''' else ""} ''; script = '' window.addEventListener('keydown', (event) => { const noMod = !event.ctrlKey && !event.altKey; ${concatStringsSep "\n" (map (link: withLinkAttr link "key" "" '' if (event.key.toLowerCase() == ${toJSON link.key} && noMod) { event.preventDefault(); if (event.shiftKey) window.open(${toJSON link.url}); else window.location.href = ${toJSON link.url}; return; } '' ) links)} }); ''; styles = '' :root { font-size: 16px; color: #dbe0f9; font-family: JetBrains Mono, monospace; --color-gray: #1a1824; } html, body { background-color: #0f0c19; padding: 0; margin: 0; } body * { box-sizing: border-box; } header { padding: 1rem 2rem; background-color: #000; } .links-container { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); padding: 0 1rem; width: 100%; margin: 1rem auto 2rem; } .card { --color-card-accent: #8e7ae3; display: block; padding: 1rem 1.5rem; font-size: 1.2rem; color: var(--color-card-accent); text-decoration: none; border: 2px solid var(--color-gray); position: relative; } .card::before { content: " "; position: absolute; left: 0; top: 0; width: 4px; height: 100%; background-color: var(--color-card-accent); } .card:hover { border-color: var(--color-card-accent); background-color: rgba(255,255,255,0.05); } .card:focus { border-color: var(--color-card-accent); outline: none; } .card-link { font-size: 0.5em; padding-top: 1em; color: gray; } button { background: none; padding: 0; text-decoration: underline; color: gray; margin: 0; border: 0; } .stats-container { padding: 1rem; border-top: 1px solid var(--color-gray); } .stats-container iframe { width: 100%; display: block; min-height: 1100px; height: 100%; border: 2px solid var(--color-gray); border-radius: 5px; } ''; headerHTML = ''
${title}
''; in '' ${title} ${headerHTML} ${if embedLink == null then "" else ''
''} ''