mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 07:10:41 +00:00
Configure dark mode with tailwind
This commit is contained in:
11
index.html
11
index.html
@@ -31,9 +31,18 @@
|
||||
ga('set', 'dimension7', matchMedia('(prefers-color-scheme: light)').matches ? 'light' : matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'none');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
<script>
|
||||
(() => {
|
||||
const theme = localStorage.getItem('theme')
|
||||
const prefersLight = matchMedia('(prefers-color-scheme: light)').matches
|
||||
if (theme === 'system' ? !prefersLight : theme !== 'light') {
|
||||
document.documentElement.classList.add('dark')
|
||||
}
|
||||
})()
|
||||
</script>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Data Pack Generators - Minecraft 1.17, 1.18, 1.19</title>
|
||||
<title>Data Pack Generators - Minecraft 1.18, 1.19, 1.20</title>
|
||||
<link rel="icon" href="/src/favicon-32.png" sizes="32x32">
|
||||
<script async src="https://media.ethicalads.io/media/client/ethicalads.min.js"></script>
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user