/
index.html
23 lines (23 loc) · 892 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vue 3 Custom Element Demo</title>
<script>
const prefersDark = matchMedia('(prefers-color-scheme: dark)').matches
const setting = localStorage.getItem('vueuse-color-scheme') || 'auto'
const html = document.documentElement
html.classList.toggle('dark', setting === 'dark' || (prefersDark && setting !== 'light'))
setTimeout(() => html.setAttribute('loaded', ''), 200)
</script>
</head>
<body>
<h1>Custom Element Demo</h1>
<dark-mode-switch></dark-mode-switch>
<p><code>defineCustomElement(DarkModeSwitch)</code></p>
<github-link></github-link>
<script type="module" src="/main.ts"></script>
</body>
</html>