| <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 ; | |
| } | |
| /* 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> |