add dark theme
This commit is contained in:
+14
@@ -5,6 +5,20 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>RADIUS Admin</title>
|
||||
<!-- Critical: paint the correct background before the app CSS loads (avoids flash). -->
|
||||
<style>
|
||||
html { background: oklch(1 0 0); color-scheme: light; }
|
||||
html.dark { background: oklch(0.145 0 0); color-scheme: dark; }
|
||||
</style>
|
||||
<script>
|
||||
// Apply saved (or system) theme before first paint.
|
||||
(function () {
|
||||
var t = localStorage.getItem('radui.theme')
|
||||
if (t === 'dark' || (!t && matchMedia('(prefers-color-scheme: dark)').matches)) {
|
||||
document.documentElement.classList.add('dark')
|
||||
}
|
||||
})()
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
Reference in New Issue
Block a user