Improve PWA Support (#52)

This commit is contained in:
NHodgesVFX 2022-03-19 08:17:18 -04:00 committed by GitHub
parent a259f2558c
commit 5729bc025b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 1 deletions

BIN
docs/icon-1024.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 KiB

BIN
docs/icon_ios_touch_192.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View file

@ -7,6 +7,11 @@
<head>
<title>eframe template</title>
<link rel="manifest" href="/manifest.json">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="white">
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#404040">
<link rel="apple-touch-icon" href="/icon_ios_touch_192.png">
<style>
html {
/* Remove touch delay: */
@ -151,6 +156,16 @@
</p>`;
}
</script>
<!--Register Service Worker-->
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('/sw.js');
});
}
</script>
</body>
</html>

View file

@ -5,8 +5,21 @@
"src": "./icon-256.png",
"sizes": "256x256",
"type": "image/png"
}],
},
{
"src": "./maskable_icon_x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any maskable"
},
{
"src": "./icon-1024.png",
"sizes": "1024x1024",
"type": "image/png"
}
],
"lang": "en-US",
"id": "/index.html",
"start_url": "./index.html",
"display": "standalone",
"background_color": "white",

BIN
docs/maskable_icon_x512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB