mirror of
https://github.com/joaovitoriasilva/endurain.git
synced 2026-05-03 03:00:41 -04:00
[frontend] Removed old PHP structure [frontend] Renamed frontend_vue folder to frontend [frontend] Removed unused imports [backend_otel] Removed
30 lines
1.2 KiB
HTML
30 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html class="bg-body-tertiary" data-bs-theme="dark" lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<link rel="icon" href="/logo/logo.png">
|
|
<link rel="apple-touch-icon" href="/logo/logo.png">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Endurain</title>
|
|
</head>
|
|
<body >
|
|
<div id="app"></div>
|
|
<script type="module" src="/src/main.js"></script>
|
|
<script>
|
|
// Detects if the user has set their system to use dark mode
|
|
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
// Applies dark theme by setting data-bs-theme="dark"
|
|
document.documentElement.setAttribute('data-bs-theme', 'dark');
|
|
} else {
|
|
// Applies light theme or removes the attribute for default behavior
|
|
document.documentElement.setAttribute('data-bs-theme', 'light');
|
|
}
|
|
|
|
// Optional: Listen for changes in the preference and adjust on the fly
|
|
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => {
|
|
const newColorScheme = event.matches ? "dark" : "light";
|
|
document.documentElement.setAttribute('data-bs-theme', newColorScheme);
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |