mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-12-16 00:53:39 +00:00
PWA style tweaks
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user