Improve PWA Support (#52)
This commit is contained in:
parent
a259f2558c
commit
5729bc025b
BIN
docs/icon-1024.png
Normal file
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
BIN
docs/icon_ios_touch_192.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
|
@ -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>
|
||||
|
|
|
@ -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
BIN
docs/maskable_icon_x512.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 128 KiB |
Loading…
Reference in a new issue