-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathindex.html
More file actions
71 lines (63 loc) · 2.37 KB
/
Copy pathindex.html
File metadata and controls
71 lines (63 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.svg" />
<link rel="manifest" href="/manifest.json" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta
name="description"
content="Clopen - Modern web UI for Claude Code & OpenCode with real browser preview, git management, multi-account support, file management, checkpoints, collaboration, and integrated terminal. Built with Bun and Svelte 5."
/>
<meta name="theme-color" content="#0e172b" />
<title>Clopen</title>
<!-- DM Sans - Local self-hosted font -->
<link rel="stylesheet" href="/fonts/dm-sans.css">
<!-- Prevent FOUC (Flash of Unstyled Content) for theme -->
<script>
(function() {
// Check for saved theme preference
try {
const savedTheme = localStorage.getItem('clopen-theme');
const isManualTheme = localStorage.getItem('clopen-theme-manual') === 'true';
let isDark = false;
if (savedTheme && isManualTheme) {
// Use saved manual theme preference
const theme = JSON.parse(savedTheme);
isDark = theme.mode === 'dark';
} else {
// Follow system preference
isDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
}
// Apply dark class immediately to prevent flash
if (isDark) {
document.documentElement.classList.add('dark');
} else {
document.documentElement.classList.remove('dark');
}
// Set color scheme for browser integration
document.documentElement.style.colorScheme = isDark ? 'dark' : 'light';
// Update meta theme-color for mobile browsers
const metaThemeColor = document.querySelector('meta[name="theme-color"]');
if (metaThemeColor) {
metaThemeColor.setAttribute('content', isDark ? '#0e172b' : '#ffffff');
}
} catch (e) {
// Fallback to system preference if anything fails
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.documentElement.classList.add('dark');
document.documentElement.style.colorScheme = 'dark';
}
}
})();
</script>
</head>
<body
class="min-h-dvh bg-white text-slate-900 dark:bg-slate-950 dark:text-slate-100 transition-colors duration-200"
>
<!-- App mount point -->
<div id="app"></div>
<!-- Vite entry point -->
<script type="module" src="/frontend/main.ts"></script>
</body>
</html>