feat(web): theme/locale preferences and improve SSR (#1832)

This commit is contained in:
Michel Heusschen
2023-02-22 18:53:08 +01:00
committed by GitHub
parent a9a769d902
commit 10cb612fb1
20 changed files with 142 additions and 144 deletions

View File

@@ -4,6 +4,15 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
<script>
/**
* Prevent FOUC on page load.
*/
const theme = localStorage.getItem('color-theme') || 'dark';
if (theme === 'light') {
document.documentElement.classList.remove('dark');
}
</script>
</head>
<body class="bg-immich-bg dark:bg-immich-dark-bg">