respect browser/os dark mode preference

pull/75/head
Harvey Tindall 4 years ago
parent 9b977bafbf
commit e6e5b0f3cf
No known key found for this signature in database
GPG Key ID: BBC65952848FB1A2

@ -1,6 +1,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="Description" content="jfa-go, a better way to manage Jellyfin users.">
<meta name="color-scheme" content="dark light">
<link rel="apple-touch-icon" sizes="180x180" href="{{ .urlBase }}/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="{{ .urlBase }}/favicon-32x32.png">

1816
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -25,6 +25,5 @@
"remixicon": "^2.5.0",
"remove-markdown": "^0.3.0",
"typescript": "^4.0.3"
},
"devDependencies": {}
}
}

@ -12,5 +12,8 @@ export function loadTheme() {
} else if (theme == "light") {
document.documentElement.classList.add('light-theme');
document.documentElement.classList.remove('dark-theme');
} else if (window.matchMedia('(prefers-color-scheme: dark)').media !== 'not all') {
document.documentElement.classList.add('dark-theme');
document.documentElement.classList.remove('light-theme');
}
}

Loading…
Cancel
Save