-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
46 lines (45 loc) · 1.83 KB
/
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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="author" content="Heggria" />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<meta name="revisit-after" content="7 days" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<link rel="alternate" type="application/rss+xml" title="Heggria's Blog" href="/feed.xml" />
<meta name="msapplication-TileColor" content="#ffffff" />
<title>Heggria</title>
<script>
;(function () {
const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
const setting = localStorage.getItem('vueuse-color-scheme') || 'auto'
if (setting === 'dark' || (prefersDark && setting !== 'light'))
document.documentElement.classList.toggle('dark', true)
})()
</script>
</head>
<body class="font-sans text-gray-700 dark:text-gray-200 relative">
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<script src="https://cdn.jsdelivr.net/gh/ezshine/[email protected]/oneline.js"></script>
<script>
Object.defineProperty(window, 'totalOnline', {
get() {
return window.totalOnlineV
},
set(newValue) {
window.totalOnlineV = newValue
// 手动触发更新或其他逻辑
const event = new CustomEvent('TotalOnlineChanged', { detail: { count: newValue || 1 } })
console.log(newValue)
window.dispatchEvent(event)
},
})
new Oneline('jhasflkhasljkfas89sa082100ss9af').on('OnelineUpdate', (e) => {
window.totalOnline = e.detail.count
})
</script>
</body>
</html>