-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
31 lines (31 loc) · 1.38 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
<!DOCTYPE html>
<html lang="en" class="transform">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.svg" />
<!-- Preload front from google - it is faster than serving it from the Netlify CDN. -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Meta data changed on build -->
<title>Nick Graffis</title>
</head>
<body class="text-primary bg-back">
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
<script>
/* Check prefere color scheme **/
(function() {
// Current themes are 🐧, 🧛🏻♂️, 🐺
document.documentElement.classList.add(
localStorage.getItem('theme') || '🧛🏻♂️',
) // Default theme is dracula
const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
const setting = localStorage.getItem('color-schema') || 'auto'
if (setting === 'dark' || (prefersDark && setting !== 'light'))
document.documentElement.classList.toggle('dark', true)
})()
</script>
</body>
</html>