PWA style tweaks

This commit is contained in:
Ian Renton
2025-11-30 18:33:49 +00:00
parent b3be6b5ca4
commit b00b4130c5
3 changed files with 14 additions and 1 deletions

View File

@@ -269,6 +269,10 @@ function latLonForGridSWCornerPlusSize(grid) {
// Function to set dark mode on or off
function enableDarkMode(dark) {
$("html").attr("data-bs-theme", dark ? "dark" : "light");
const metaThemeColor = document.querySelector("meta[name=theme-color]");
metaThemeColor.setAttribute("content", dark ? "black" : "white");
const metaAppleStatusBarStyle = document.querySelector("meta[name=apple-mobile-web-app-status-bar-style]");
metaAppleStatusBarStyle.setAttribute("content", dark ? "black-translucent" : "white-translucent");
}
// Startup function to determine whether to use light or dark mode