feat: 灵犀 Studio Web UI 定制版
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>灵犀 Studio</title>
|
||||
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Noto+Sans+SC:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap" rel="stylesheet" />
|
||||
|
||||
<!-- Prevent FOUC by applying theme classes immediately -->
|
||||
<script>
|
||||
(function() {
|
||||
try {
|
||||
const brightness = localStorage.getItem('hermes_brightness') || 'system';
|
||||
const style = localStorage.getItem('hermes_style') || 'ink';
|
||||
|
||||
// Resolve dark mode
|
||||
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
const isDark = brightness === 'dark' || (brightness === 'system' && prefersDark);
|
||||
|
||||
// Resolve comic style
|
||||
const isComic = style === 'comic';
|
||||
|
||||
// Apply classes immediately
|
||||
if (isDark) {
|
||||
document.documentElement.classList.add('dark');
|
||||
}
|
||||
if (isComic) {
|
||||
document.documentElement.classList.add('comic');
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn('Failed to apply theme:', e);
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user