import { config } from '../config.ts'; import type { PlatformSpec } from '../platforms/types.ts'; import { html } from './html.ts'; import { badge, layout } from './layout.ts'; /** * There is no useful landing page for a redirect target, so this is the * reference card instead: which prefixes exist, and the rewrite rules to * paste into StopTheMadness. */ export function renderIndex(platforms: readonly PlatformSpec[]): string { const origin = config.publicOrigin; const body = html`

antisocial

Point StopTheMadness at these and shared links open here instead of in an app.

${platforms.map( (p) => html``, )}
PlatformMatchesRewrites to
${badge(p.id, p.label)} ${p.canonicalHost} ${origin}/${p.prefix}/…
`; return layout('antisocial', body); }