add pwa stuff

This commit is contained in:
2025-05-10 22:45:10 +01:00
parent 2cfee11ca9
commit bd560cbd90
7 changed files with 41 additions and 1 deletions

BIN
web/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -4,6 +4,9 @@
<head>
<title>7am Weather</title>
<link rel="icon" type="image/png" href="/favicon.png">
<link rel="manifest" href="/manifest.json">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Geist:wght@100..900&display=swap" rel="stylesheet">
@@ -37,6 +40,12 @@
</p>
</footer>
</div>
<script>
window.addEventListener("load", () => {
navigator.serviceWorker.register("/sw.js")
})
</script>
</body>
</html>

BIN
web/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

17
web/manifest.json Normal file
View File

@@ -0,0 +1,17 @@
{
"name": "7am Weather",
"short_name": "7am",
"theme_color": "#1f2937",
"background_color": "#f3f4f6",
"display": "standalone",
"scope": "/",
"start_url": "/",
"description": "Daily weather updates delivered to you at 7am.",
"orientation": "vertical",
"icons": [
{
"src": "/logo.png",
"sizes": "1024x1024"
}
]
}

View File

@@ -123,4 +123,6 @@ function jsonOrThrow(res) {
if (canReceiveUpdates) {
main()
} else {
getSummaryButton.style.display = "none"
}