Updated styles and Added storageManager.
- Dark/White-mode support - Collapsible navs - Renamed items template. - StorageBuilding's are now StorageUnit's - Formatting, general cleanup, some bug fixing.
This commit is contained in:
@ -12,9 +12,34 @@
|
||||
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
||||
|
||||
<script src="/static/jquery/dist/jquery.min.js"></script>
|
||||
<link href="/static/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/static/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
|
||||
<link href="/css/dashboard.css" rel="stylesheet">
|
||||
|
||||
<link href="/static/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="/static/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet" />
|
||||
<link href="/css/dashboard.css" rel="stylesheet" />
|
||||
<script src="/static/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="/static/@popperjs/core/dist/umd/popper.min.js"></script>
|
||||
<script>
|
||||
// Listen for changes in the prefers-color-scheme media query and update the "data-bs-theme" attribute on the <html> element.
|
||||
|
||||
(function () {
|
||||
const currentTheme = localStorage.getItem('bs.theme') ?? 'auto';
|
||||
const isDark = currentTheme === 'dark';
|
||||
const isLight = currentTheme === 'light';
|
||||
|
||||
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
const prefersLight = window.matchMedia('(prefers-color-scheme: light)').matches;
|
||||
|
||||
if (currentTheme === 'auto') {
|
||||
if (prefersDark) {
|
||||
document.documentElement.setAttribute('data-bs-theme', 'dark');
|
||||
} else if (prefersLight) {
|
||||
document.documentElement.setAttribute('data-bs-theme', 'light');
|
||||
}
|
||||
} else if (isDark) {
|
||||
document.documentElement.setAttribute('data-bs-theme', 'dark');
|
||||
} else if (isLight) {
|
||||
document.documentElement.setAttribute('data-bs-theme', 'light');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<body>
|
||||
|
Reference in New Issue
Block a user