forked from open-webui/open-webui
64 lines
2.3 KiB
HTML
64 lines
2.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
|
<link rel="manifest" href="%sveltekit.assets%/manifest.json" crossorigin="use-credentials" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
|
|
<meta name="robots" content="noindex,nofollow" />
|
|
<script>
|
|
// On page load or when changing themes, best to add inline in `head` to avoid FOUC
|
|
(() => {
|
|
if (localStorage?.theme && localStorage?.theme.includes('oled')) {
|
|
document.documentElement.style.setProperty('--color-gray-900', '#000000');
|
|
document.documentElement.style.setProperty('--color-gray-950', '#000000');
|
|
document.documentElement.classList.add('dark');
|
|
} else if (
|
|
localStorage.theme === 'light' ||
|
|
(!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: light)').matches)
|
|
) {
|
|
document.documentElement.classList.add('light');
|
|
} else if (localStorage.theme && localStorage.theme !== 'system') {
|
|
localStorage.theme.split(' ').forEach((e) => {
|
|
document.documentElement.classList.add(e);
|
|
});
|
|
} else if (localStorage.theme && localStorage.theme === 'system') {
|
|
systemTheme = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
document.documentElement.classList.add(systemTheme ? 'dark' : 'light');
|
|
} else {
|
|
document.documentElement.classList.add('dark');
|
|
}
|
|
|
|
window.matchMedia('(prefers-color-scheme: dark)').addListener((e) => {
|
|
if (localStorage.theme === 'system') {
|
|
if (e.matches) {
|
|
document.documentElement.classList.add('dark');
|
|
document.documentElement.classList.remove('light');
|
|
} else {
|
|
document.documentElement.classList.add('light');
|
|
document.documentElement.classList.remove('dark');
|
|
}
|
|
}
|
|
});
|
|
})();
|
|
</script>
|
|
|
|
<title>Open WebUI</title>
|
|
|
|
%sveltekit.head%
|
|
</head>
|
|
<body data-sveltekit-preload-data="hover">
|
|
<div style="display: contents">%sveltekit.body%</div>
|
|
|
|
<div id="splash-screen" style="min-height: 100vh; height: 100dvh; display: flex">
|
|
<div style="margin: auto">
|
|
<img
|
|
src="/logo.svg"
|
|
alt="logo"
|
|
style="width: 6rem; height: 6rem; margin-bottom: 2rem"
|
|
draggable="false"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|