mirror of
https://github.com/woodchen-ink/nezha-dash-v1.git
synced 2025-07-18 01:21:56 +08:00
88 lines
2.2 KiB
HTML
88 lines
2.2 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<script>
|
|
// 在页面渲染前就执行主题初始化
|
|
document.documentElement.classList.add("dark")
|
|
|
|
// 全局配置变量
|
|
window.ShowServerDetails = true; // 是否显示服务器详细信息
|
|
</script>
|
|
<style>
|
|
/* Prevent FOUC in Safari */
|
|
html:not(.dark) * {
|
|
visibility: hidden;
|
|
}
|
|
|
|
:root {
|
|
color-scheme: dark;
|
|
--bg: #242424;
|
|
}
|
|
|
|
html.dark {
|
|
color-scheme: dark;
|
|
--bg: #242424;
|
|
}
|
|
|
|
html {
|
|
background: transparent !important;
|
|
}
|
|
|
|
body {
|
|
background: transparent !important;
|
|
}
|
|
|
|
#root {
|
|
background: transparent !important;
|
|
visibility: hidden;
|
|
}
|
|
|
|
#root.loaded {
|
|
visibility: visible;
|
|
animation: fadein 0.2s;
|
|
}
|
|
|
|
@keyframes fadein {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
</style>
|
|
<script>
|
|
;(function () {
|
|
const root = document.documentElement
|
|
root.classList.remove("light")
|
|
root.classList.add("dark")
|
|
document.querySelector('meta[name="theme-color"]')?.setAttribute("content", "#242424")
|
|
|
|
// Add loaded class after React has mounted
|
|
window.addEventListener("load", () => {
|
|
const root = document.getElementById("root")
|
|
if (root) {
|
|
// 使用 RAF 确保在下一帧渲染
|
|
requestAnimationFrame(() => {
|
|
requestAnimationFrame(() => {
|
|
root.classList.add("loaded")
|
|
})
|
|
})
|
|
}
|
|
})
|
|
})()
|
|
</script>
|
|
<meta charset="UTF-8" />
|
|
<link rel="icon" type="image/png" href="/apple-touch-icon.png" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>CZL Server</title>
|
|
|
|
<link rel="stylesheet" href="https://i.czl.net/jsdelivr/gh/lipis/flag-icons@7.0.0/css/flag-icons.min.css" />
|
|
<link rel="stylesheet" href="https://i.czl.net/jsdelivr/npm/font-logos@1/assets/font-logos.css" />
|
|
</head>
|
|
<body>
|
|
<div id="root"></div>
|
|
<script type="module" src="/src/main.tsx"></script>
|
|
</body>
|
|
</html>
|