Add the V2 web app: design system, shell, study flows, AI, settings, sharing
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
parent
eae109c166
commit
74a98ac1f1
52 changed files with 11976 additions and 1 deletions
10
web/public/theme.js
Normal file
10
web/public/theme.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
// Applies the saved theme before first paint (kept as a file so the CSP can stay script-src 'self').
|
||||
(function () {
|
||||
try {
|
||||
var saved = localStorage.getItem('sd.theme') || 'system';
|
||||
var dark = saved === 'dark' || (saved === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches);
|
||||
document.documentElement.dataset.theme = dark ? 'dark' : 'light';
|
||||
} catch (e) {
|
||||
document.documentElement.dataset.theme = 'light';
|
||||
}
|
||||
})();
|
||||
Loading…
Add table
Add a link
Reference in a new issue