mirror of
https://github.com/bitbaum/diplodoctor.git
synced 2026-12-04 05:47:36 +01:00
The look is now one file, app/theme.css: colour, faces, corner radius, headline case and action style are values there, so "red and white" or "more gothic" is a one-file edit, and lib/theme.test.ts keeps any change readable (WCAG AA) in light and dark. Light and calm by default, dark on request or when the device asks, with a toggle; different from OrangeCat, Loki and Solon. The help is no longer "Diplodoctor AI and clinicians". There is no Diplodoctor model; the AI is whichever model answers. Beside it: a health assistant anyone can be, under a name or a pseudonym, whose view is an opinion and whose helpfulness will be shown, and a licensed professional, whose licence can be proven with a zero-knowledge proof so they may stay pseudonymous (planned). /clinicians is now /people. All five languages updated. Claude-Session: https://claude.ai/code/session_01UzP8kyUAz5uhKE3mt87Yi7 Co-authored-by: Claude <noreply@anthropic.com>
10 lines
593 B
TypeScript
10 lines
593 B
TypeScript
/** Where the reader's light/dark choice is kept. */
|
|
export const THEME_KEY = "diplodoctor.theme";
|
|
|
|
/**
|
|
* Runs before the first paint, so a reader who prefers dark never sees a flash
|
|
* of light. The reader's own choice wins; without one, the device's does. It is
|
|
* an inline script, so it carries the response's CSP nonce (see the layout).
|
|
*/
|
|
export const THEME_BOOT = `(function(){try{var s=localStorage.getItem(${JSON.stringify(THEME_KEY)});var d=s?s==="dark":window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.classList.toggle("dark",d)}catch(e){}})()`;
|