v0.1.14 - b2b portal
This commit is contained in:
@@ -5,15 +5,14 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="icon" href="/favicon.png" />
|
||||
<script>
|
||||
// Resolve the theme before first paint so there is no light-mode flash.
|
||||
// Resolve the theme before first paint so there is no dark-mode flash.
|
||||
// Dark mode is strictly opt-in: it loads only when the user has explicitly
|
||||
// chosen it. Absent preference (or the legacy 'system' value) stays light,
|
||||
// so the OS scheme never pulls the app into dark on its own.
|
||||
(function () {
|
||||
try {
|
||||
var pref = localStorage.getItem('theme');
|
||||
var dark =
|
||||
pref === 'dark' ||
|
||||
((!pref || pref === 'system') &&
|
||||
window.matchMedia('(prefers-color-scheme: dark)').matches);
|
||||
document.documentElement.dataset.theme = dark ? 'dark' : 'light';
|
||||
document.documentElement.dataset.theme = pref === 'dark' ? 'dark' : 'light';
|
||||
} catch (e) {
|
||||
document.documentElement.dataset.theme = 'light';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user