try to improve support for PWA on iOS
This commit is contained in:
@ -14,8 +14,7 @@ class MyDocument extends Document {
|
|||||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
||||||
<meta name="apple-mobile-web-app-title" content="CCOM" />
|
<meta name="apple-mobile-web-app-title" content="CCOM" />
|
||||||
|
<link rel="apple-touch-icon" href="/favicon.ico"></link>
|
||||||
<link rel="apple-touch-icon" href="/old-192x192.png"></link>
|
|
||||||
</Head>
|
</Head>
|
||||||
<body>
|
<body>
|
||||||
<Main />
|
<Main />
|
||||||
|
@ -2,6 +2,16 @@
|
|||||||
"theme_color": "#ffffff",
|
"theme_color": "#ffffff",
|
||||||
"background_color": "#e36600",
|
"background_color": "#e36600",
|
||||||
"icons": [
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "pwa-192x192.png",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "pwa-512x512.png",
|
||||||
|
"sizes": "512x512",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"purpose": "maskable",
|
"purpose": "maskable",
|
||||||
"sizes": "512x512",
|
"sizes": "512x512",
|
||||||
|
@ -124,6 +124,10 @@ nextApp
|
|||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
server.use("/favicon.ico", express.static("public/favicon.png"));
|
server.use("/favicon.ico", express.static("public/favicon.png"));
|
||||||
|
// serve the same image for pwa-192x192.png and pwa-512x512.png
|
||||||
|
server.use("/pwa-192x192.png", express.static("public/favicon.png"));
|
||||||
|
server.use("/pwa-512x512.png", express.static("public/favicon.png"));
|
||||||
|
server.use("/manifest.json", express.static("public/manifest.json"));
|
||||||
//all static files are served from the public folder, including subfolders
|
//all static files are served from the public folder, including subfolders
|
||||||
server.use(express.static("public")); //ToDo: not working for some reason
|
server.use(express.static("public")); //ToDo: not working for some reason
|
||||||
// server.use("/robots.txt", express.static("styles/favicon_io/robots.txt"));
|
// server.use("/robots.txt", express.static("styles/favicon_io/robots.txt"));
|
||||||
|
Reference in New Issue
Block a user