-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
47 lines (42 loc) · 1.77 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
47
<!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 simple and efficient Todo List application built with React and Tailwind CSS."
/>
<meta name="keywords" content="Todo List, React, Tailwind CSS, JavaScript, TypeScript" />
<meta name="author" content="Tran Tuan Duc" />
<meta property="og:title" content="Todo List" />
<meta
property="og:description"
content="A simple and efficient Todo List application built with React and Tailwind CSS."
/>
<meta property="og:image" content="https://todo-list-vite-eight.vercel.app/IMG_0765.png" />
<meta property="og:url" content="https://todo-list-vite-eight.vercel.app/" />
<meta name="twitter:card" content="summary_large_image" />
<title>Todo List</title>
<link rel="preload" href="https://todo-list-vite-eight.vercel.app/IMG_0765.png" as="image" />
<link rel="icon" href="/vite.svg" type="image/x-icon" />
<script>
;(() => {
const darkModeQuery = window.matchMedia('(prefers-color-scheme: dark)')
const updateMode = () => {
const systemDark = darkModeQuery.matches
const userDark =
localStorage.getItem('isDarkMode') === 'true' || (!localStorage.getItem('isDarkMode') && systemDark)
document.documentElement.classList.toggle('dark', userDark)
if (userDark === systemDark) localStorage.removeItem('isDarkMode')
}
darkModeQuery.addEventListener('change', updateMode)
updateMode() // Initialize mode on load
})()
</script>
</head>
<body>
<div id="root"></div>
<script type="module" src="./src/main.tsx" defer></script>
</body>
</html>