File size: 1,861 Bytes
a21c316 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | <!doctype html>
<html lang="en" style="background-color: #1a1f2e;">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/icon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Antigravity Tools</title>
<script>
(function () {
try {
const savedTheme = localStorage.getItem('app-theme-preference');
const systemDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
// Determine if should be dark for later use, but ALWAYS start with splash color
const shouldBeDark = savedTheme === 'dark' || ((!savedTheme || savedTheme === 'system') && systemDark);
// Set background color IMMEDIATELY to SPLASH COLOR (seamless transition)
document.documentElement.style.backgroundColor = '#1a1f2e';
if (shouldBeDark) {
document.documentElement.classList.add('dark');
document.documentElement.setAttribute('data-theme', 'dark');
} else {
document.documentElement.classList.remove('dark');
document.documentElement.setAttribute('data-theme', 'light');
}
} catch (e) {
console.error('Failed to apply theme during boot:', e);
document.documentElement.style.backgroundColor = '#1a1f2e';
}
})();
</script>
<style>
/* Critical CSS: Force splash color initially */
html {
background-color: #1a1f2e !important;
}
/* These specific overrides will apply when React loads and removes the splash screen logic,
but for now we want everything to look like the splash screen */
body {
margin: 0;
background-color: transparent;
}
</style>
</head>
<body style="margin: 0; background-color: #1a1f2e;">
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html> |