Co-Study4Grid / frontend /index.html
github-actions[bot]
Deploy 7688ef1
13d4e44
Raw
History Blame Contribute Delete
1.55 kB
<!--
Copyright (c) 2025-2026, RTE (https://www.rte-france.com)
This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0.
If a copy of the Mozilla Public License, version 2.0 was not distributed with this file,
you can obtain one at http://mozilla.org/MPL/2.0/.
SPDX-License-Identifier: MPL-2.0
This file is part of Co-Study4Grid a Power Grid Study tool Assistant Interface to help solve contigencies for a grid state under study.
-->
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Co-Study4Grid</title>
<script>
// Apply persisted theme before React mounts to avoid a flash of
// light theme on dark-mode reloads. Mirrors resolveInitialTheme()
// in src/hooks/useTheme.ts — keep the two in sync.
(function () {
try {
var stored = localStorage.getItem('cs4g-theme');
var theme = (stored === 'light' || stored === 'dark')
? stored
: (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
document.documentElement.setAttribute('data-theme', theme);
document.documentElement.style.colorScheme = theme;
} catch (e) { /* localStorage unavailable */ }
})();
</script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>