2021-11-01 16:42:52 -06:00
|
|
|
<!DOCTYPE html>
|
2023-01-31 18:08:07 -07:00
|
|
|
<html lang="en" style="height: 100%">
|
2023-04-09 14:34:33 -06:00
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8"/>
|
2022-10-22 14:27:18 -06:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
|
2023-04-09 14:34:33 -06:00
|
|
|
<meta name="theme-color" content="#000000"/>
|
2021-11-01 16:42:52 -06:00
|
|
|
<meta
|
2023-04-09 14:34:33 -06:00
|
|
|
name="description"
|
|
|
|
|
content="The WROLPI webapp"
|
2021-11-01 16:42:52 -06:00
|
|
|
/>
|
2023-05-29 18:04:03 -06:00
|
|
|
<link rel="icon" href="%PUBLIC_URL%/favicon.ico"/>
|
|
|
|
|
<link rel="apple-touch-icon" sizes="180x180" href="%PUBLIC_URL%/apple-touch-icon.png">
|
|
|
|
|
<link rel="icon" type="image/png" sizes="32x32" href="%PUBLIC_URL%/favicon-32x32.png">
|
|
|
|
|
<link rel="icon" type="image/png" sizes="16x16" href="%PUBLIC_URL%/favicon-16x16.png">
|
|
|
|
|
<link rel="mask-icon" href="%PUBLIC_URL%/safari-pinned-tab.svg" color="#5bbad5">
|
2021-11-01 16:42:52 -06:00
|
|
|
<!--
|
|
|
|
|
manifest.json provides metadata used when your web app is installed on a
|
|
|
|
|
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
|
|
|
|
-->
|
2023-04-09 14:34:33 -06:00
|
|
|
<link rel="manifest" href="%PUBLIC_URL%/manifest.json"/>
|
2021-11-01 16:42:52 -06:00
|
|
|
<!--
|
|
|
|
|
Notice the use of %PUBLIC_URL% in the tags above.
|
|
|
|
|
It will be replaced with the URL of the `public` folder during the build.
|
|
|
|
|
Only files inside the `public` folder can be referenced from the HTML.
|
|
|
|
|
|
|
|
|
|
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
|
|
|
|
work correctly both with client-side routing and a non-root public URL.
|
|
|
|
|
Learn how to configure a non-root public URL by running `npm run build`.
|
|
|
|
|
-->
|
2022-11-13 14:20:48 -07:00
|
|
|
<title>WROLPi: Create your own off-grid library</title>
|
ui: theme tokens and a four-theme runtime
Every color now resolves through CSS custom properties on
html[data-theme=...], so a theme is a table of values rather than code.
Four themes ship: light, dark, night (red hues only, to preserve dark
adaptation off-grid) and amber (monochrome amber terminal).
Fonts are exposed as two roles, --font-body and --font-mono, which a theme
assigns a bundled face to; amber uses the mono face. Faces must be
self-hosted, never fetched from a CDN, so the app keeps working offline.
Night mode also filters media that cannot consume tokens - video, images,
PDFs, embedded pages, canvases - through an SVG color matrix that maps
luminance onto the red channel. Tag such an element with `.media`; a filter
on an app-level ancestor would create a containing block and break fixed
positioning.
ThemeProvider persists the choice and index.html stamps data-theme from
localStorage before the bundle loads, so the first paint already matches the
saved theme on a slow connection. The OS preference is followed only while
"system" is selected; night and amber are explicit choices. The nav toggle
becomes a five-item picker.
Semantic components still render themselves, so only the shell is
token-driven for now; the inverted props stay in place until each component
is migrated.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 18:32:50 -06:00
|
|
|
<script>
|
|
|
|
|
/*
|
|
|
|
|
Stamp the saved theme on <html> before first paint. ThemeProvider sets the same
|
|
|
|
|
attribute once React mounts, but the bundle can take a while to arrive over a
|
|
|
|
|
hotspot — without this the page would paint in the wrong theme first. Keep the
|
|
|
|
|
storage key and theme names in sync with src/components/Theme.tsx.
|
|
|
|
|
*/
|
|
|
|
|
(function () {
|
|
|
|
|
var theme = 'light';
|
|
|
|
|
try {
|
|
|
|
|
var saved = localStorage.getItem('color-scheme');
|
|
|
|
|
if (saved === 'light' || saved === 'dark' || saved === 'night' || saved === 'amber') {
|
|
|
|
|
theme = saved;
|
|
|
|
|
} else if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
|
|
|
// `system`, unset, or written by an older version.
|
|
|
|
|
theme = 'dark';
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
// Storage blocked; fall back to light.
|
|
|
|
|
}
|
|
|
|
|
document.documentElement.setAttribute('data-theme', theme);
|
|
|
|
|
})();
|
|
|
|
|
</script>
|
2023-04-09 14:34:33 -06:00
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
|
|
|
<div id="root"></div>
|
|
|
|
|
<!--
|
|
|
|
|
This HTML file is a template.
|
|
|
|
|
If you open it directly in the browser, you will see an empty page.
|
2021-11-01 16:42:52 -06:00
|
|
|
|
2023-04-09 14:34:33 -06:00
|
|
|
You can add webfonts, meta tags, or analytics to this file.
|
|
|
|
|
The build step will place the bundled scripts into the <body> tag.
|
2021-11-01 16:42:52 -06:00
|
|
|
|
2023-04-09 14:34:33 -06:00
|
|
|
To begin the development, run `npm start` or `yarn start`.
|
|
|
|
|
To create a production bundle, use `npm run build` or `yarn build`.
|
|
|
|
|
-->
|
|
|
|
|
</body>
|
2021-11-01 16:42:52 -06:00
|
|
|
</html>
|