- {/* From SITE_META, not a literal. lib/site.ts calls `domain` "the brand
- string the header and footer print" — the footer reads it and the
- header did not, so one of the two would have kept printing the old
- value the day it changes. */}
-
{SITE_META.domain}
Closed alpha
diff --git a/lib/hero-art.test.ts b/lib/hero-art.test.ts
deleted file mode 100644
index 6f5fd1f..0000000
--- a/lib/hero-art.test.ts
+++ /dev/null
@@ -1,56 +0,0 @@
-import { existsSync, readFileSync, readdirSync } from 'node:fs';
-import { describe, expect, it } from 'vitest';
-import { HERO_ART_LARGE, RENDERED_MODES, heroArtFile, heroArtPreloads } from './hero-art';
-
-const css = readFileSync('app/globals.css', 'utf8');
-const rules = css.replace(/\/\*[\s\S]*?\*\//g, '');
-const painted = (file: string) => existsSync(`public${file}`) && css.includes(`url('${file}')`);
-
-describe('hero art', () => {
- // The picture is chosen by mode alone and is transparent, so every theme has
- // it. A rule here that names a theme would break that, and fails.
- it.each(RENDERED_MODES)('%s has its picture in both sizes', (mode) => {
- for (const large of [false, true]) {
- expect(painted(heroArtFile(mode, large)), heroArtFile(mode, large)).toBe(true);
- }
- expect(css, 'no hero rule may depend on a theme').not.toMatch(/\[data-theme[^\]]*\][^{]*\.hero/);
- });
-
- it('keeps nothing of the landscape, its fog or its clouds', () => {
- expect(readdirSync('public/hero').sort()).toEqual(
- RENDERED_MODES.flatMap((mode) => [false, true].map((large) => heroArtFile(mode, large).split('/').pop())).sort(),
- );
- expect(rules).not.toMatch(/hero-cloud|fog|parchment/);
- });
-
- // The text never meets the picture: under it the padding is the picture's
- // whole height, and where the text stands in the picture's empty middle the
- // column is 40% of the page and ends at half the picture's height.
- it('keeps the text clear of the picture', () => {
- expect(rules).toContain('--hero-art-h: calc(var(--page-w) * 1104 / 2576);');
- expect(rules).toMatch(/\.hero \{[^}]*padding: [^;]* calc\(var\(--hero-art-h\) \+ var\(--sp-5\)\);/);
- const wide = rules.slice(rules.indexOf('@media (min-width: 1100px)')).split('@media')[1];
- expect(wide).toContain('.hero { padding-bottom: calc(var(--hero-art-h) * 0.5); }');
- expect(wide).toContain('.hero-body { width: min(var(--content-w), var(--page-w) * 0.4); }');
- });
-
- // A transform or translate on the tooltip's wrapper makes a stacking context,
- // and the panel's own layer then counts only inside it: the next positioned
- // row paints over the open tooltip.
- it('leaves the info marks out of a stacking context', () => {
- const marks = [...rules.matchAll(/\.waitlist-info[^{]*\{([^}]*)\}/g)].map((m) => m[1]).join('\n');
- expect(marks).not.toMatch(/\b(translate|transform|z-index|opacity|filter|isolation)\s*:/);
- });
-
- it('swaps sizes at the same viewport as globals.css', () => {
- expect(css).toContain(`@media ${HERO_ART_LARGE}`);
- });
-
- it('preloads one picture for an explicit mode and both for Auto', () => {
- expect(heroArtPreloads({ mode: 'dark' }).map((p) => p.href)).toEqual([
- '/hero/hero-v3-dark-1288.avif',
- '/hero/hero-v3-dark.avif',
- ]);
- expect(heroArtPreloads({ mode: 'auto' })).toHaveLength(4);
- });
-});
diff --git a/lib/hero-art.ts b/lib/hero-art.ts
deleted file mode 100644
index e434a3c..0000000
--- a/lib/hero-art.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import type { AppearanceState, RenderedMode } from '@ekdotico/domico/theme';
-
-// The hero illustration: one transparent picture for the light mode and one
-// for the dark, the same in every theme, drawn straight on the page colour.
-// The files are in public/hero/ and are painted by the rules in
-// app/globals.css, under the same [data-mode] selectors as the tokens, so the
-// picture changes with the page.
-//
-// This module holds only what the server needs to preload the right file. A
-// CSS background is found late, after the stylesheet, and the illustration is
-// the largest paint on the first screen.
-
-export const RENDERED_MODES: readonly RenderedMode[] = ['light', 'dark'];
-
-// The viewport at which globals.css swaps the 1288-wide file for the 2576-wide
-// one: wider than the small file, or a dense screen past phone width.
-export const HERO_ART_LARGE = '(min-width: 1289px) or ((min-width: 644px) and (min-resolution: 1.5dppx))';
-
-export function heroArtFile(mode: RenderedMode, large: boolean): string {
- return `/hero/hero-v3-${mode}${large ? '' : '-1288'}.avif`;
-}
-
-export interface HeroArtPreload {
- href: string;
- media: string;
-}
-
-// One entry per file the browser might paint first. An explicit mode names one
-// picture; Auto names both, each behind its own prefers-color-scheme query, so
-// only the one that will be painted is fetched.
-export function heroArtPreloads({ mode }: Pick