/** * The insignia, as DOM rather than as an image. * * public/logo.svg is the same drawing and is still what the masthead, the * favicons and the social card use. This copy exists because the landing hero * wants the parts of it — the orbits, the planets, the stars — to be separately * styleable and separately animatable, which an does not allow. It is two * kilobytes, so inlining it also saves the request. * * Keep the two in step. If the drawing changes, it changes in both. */ /** * Static markup. Nothing here is interpolated, and nothing from the network or * from an account ever will be, which is what makes assigning it as innerHTML * safe. */ const MARKUP = ` `; /** * The insignia as an inline , hidden from assistive technology. * * Decorative by intent: the masthead already names the site, and this copy is * cropped by its frame, so a screen reader has nothing to gain from a * description of the artwork. */ export function insignia(className: string): SVGSVGElement { const host = document.createElement("div"); host.innerHTML = MARKUP.trim(); const svg = host.firstElementChild as SVGSVGElement; svg.setAttribute("class", className); return svg; }