-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
48 lines (43 loc) · 1.61 KB
/
index.html
File metadata and controls
48 lines (43 loc) · 1.61 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="A dashboard to discover beginner-friendly issues across popular open source projects">
<meta name="color-scheme" content="light dark">
<title>OSS Issue Aggregator - Dev</title>
<script>
(function() {
try {
const savedTheme = sessionStorage.getItem('hadoku-theme');
const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
const theme = savedTheme || (prefersDark ? 'dark' : 'light');
document.documentElement.setAttribute('data-theme', theme);
console.log('[theme-init] Applied initial theme:', {
theme,
savedTheme,
prefersDark,
source: savedTheme ? 'sessionStorage' : prefersDark ? 'browser-preference' : 'default'
});
} catch (err) {
console.error('[theme-init] Failed to set initial theme:', err);
document.documentElement.setAttribute('data-theme', 'light');
}
})();
</script>
</head>
<body>
<div id="app"></div>
<script type="module">
import { mount } from './src/entry.tsx'
// Get params from URL
const params = new URLSearchParams(window.location.search)
const theme = params.get('theme') || undefined // Let the app handle default theme
console.log('[mount] Mounting oss-aggregator with:', { theme })
// Mount the app
mount(document.getElementById('app'), {
theme
})
</script>
</body>
</html>