chore(theme): define palette and typographies and override mui styles with this values, also add rtlProvider
This commit is contained in:
16
index.html
16
index.html
@@ -5,6 +5,22 @@
|
||||
<!-- <link rel="icon" type="image/svg+xml" href="/vite.svg" /> -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Harmony club</title>
|
||||
<!-- this script add for preventing initial theme flashing -->
|
||||
<script>
|
||||
(function () {
|
||||
try {
|
||||
const THEME_STORAGE_KEY = 'mui-mode';
|
||||
const DARK_THEME_CLASS_NAME = 'dark';
|
||||
const savedMode = localStorage.getItem(THEME_STORAGE_KEY);
|
||||
const prefersDark = window.matchMedia(
|
||||
'(prefers-color-scheme: dark)',
|
||||
).matches;
|
||||
if (savedMode === 'dark' || (!savedMode && prefersDark)) {
|
||||
document.documentElement.classList.add(DARK_THEME_CLASS_NAME);
|
||||
}
|
||||
} catch (e) {}
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
Reference in New Issue
Block a user