From b00b4130c54c5884cc2e8363e74e54b4327ee483 Mon Sep 17 00:00:00 2001 From: Ian Renton Date: Sun, 30 Nov 2025 18:33:49 +0000 Subject: [PATCH] PWA style tweaks --- views/webpage_base.tpl | 2 ++ webassets/js/common.js | 4 ++++ webassets/service-worker.js | 9 ++++++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/views/webpage_base.tpl b/views/webpage_base.tpl index adafc3a..9e90875 100644 --- a/views/webpage_base.tpl +++ b/views/webpage_base.tpl @@ -4,8 +4,10 @@ + + diff --git a/webassets/js/common.js b/webassets/js/common.js index e04933a..21c5179 100644 --- a/webassets/js/common.js +++ b/webassets/js/common.js @@ -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 diff --git a/webassets/service-worker.js b/webassets/service-worker.js index 520f8c2..5c75da1 100644 --- a/webassets/service-worker.js +++ b/webassets/service-worker.js @@ -6,7 +6,14 @@ const CACHE_URLS = [ 'apidocs/openapi.yml', 'about', 'css/style.css', - 'js/code.js', + 'js/add-spot.js', + 'js/alerts.js', + 'js/bands.js', + 'js/common.js', + 'js/map.js', + 'js/spots.js', + 'js/spotsbandsandmap.js', + 'js/status.js', 'img/logo.png', 'img/favicon.ico', 'img/icon-32.png',