mirror of
https://github.com/Zakkaus/doona.git
synced 2026-12-06 00:00:57 +00:00
Add a Halloween palette under Other: pumpkin orange on warm parchment by day and on a deep purple night after dark, with candle yellow and a sickly green among the chart colours. Like Qiangguo it rewords running, unavailable, degraded, light and dark, and draws faint card art: a jack-o'-lantern, bats, a black cat and a spider web, hand-drawn SVGs at a tenth of their opacity so corner text keeps 4.5:1. While it is on, the duck in the top bar, startup frame, sign-in page and About wears a witch's hat, swapped in by the palette stylesheet with CSS content. The stylesheet, its inline art and the logo load only when the palette is chosen, on the path Glass already used: paletteSheet.ts now links a family's own stylesheet for both, the first-paint script links a stored one, and useAppearance retries a failed load. Raise startupActivity from 326050 to 326250 bytes gzip. The palette entry, its five core catalogue keys and the shared on-demand loader put startup at 326220 on the current main; the palette CSS stays out of startupCss.
12 lines
737 B
JavaScript
12 lines
737 B
JavaScript
import {readFileSync} from 'node:fs';
|
|
|
|
// The first-paint script with the build's values in place of its placeholders; vite.config.ts and the test share it.
|
|
export const stampScript = ({palettes, defaultPalette, locales, referenceLocale, rtlScripts, paletteStylesheets = {}}) =>
|
|
readFileSync(new URL('./stamp.js', import.meta.url), 'utf8')
|
|
.replace("'__PALETTES__'", JSON.stringify(palettes))
|
|
.replace("'__DEFAULT_PALETTE__'", JSON.stringify(defaultPalette))
|
|
.replace("'__LOCALES__'", JSON.stringify(locales))
|
|
.replace("'__REFERENCE_LOCALE__'", JSON.stringify(referenceLocale))
|
|
.replace("'__RTL_SCRIPTS__'", JSON.stringify(rtlScripts))
|
|
.replace("'__PALETTE_STYLESHEETS__'", JSON.stringify(paletteStylesheets));
|