added PWA

This commit is contained in:
Ayaka
2022-10-12 12:56:27 +00:00
parent 23141ff531
commit 5b3200accc
12 changed files with 60 additions and 18 deletions

3
package-lock.json generated
View File

@@ -19,7 +19,8 @@
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"react-slider": "^2.0.4",
"web-vitals": "^2.1.4"
"web-vitals": "^2.1.4",
"workbox-precaching": "^6.5.4"
}
},
"node_modules/@adobe/css-tools": {

View File

@@ -14,7 +14,8 @@
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"react-slider": "^2.0.4",
"web-vitals": "^2.1.4"
"web-vitals": "^2.1.4",
"workbox-precaching": "^6.5.4"
},
"scripts": {
"start": "react-scripts start",

BIN
public/512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

View File

@@ -21,6 +21,9 @@
<meta property="og:image" content="/og-image.png" />
<meta property="og:url" content="https://st.ayaka.one" />
<meta property="og:site_name" content="Project Sekai Stickers" />
<script>
navigator.serviceWorker.register("sw.js");
</script>
<meta property="og:type" content="website" />
</head>
<body>

BIN
public/screenshot.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

View File

@@ -1,6 +1,6 @@
{
"name": "",
"short_name": "",
"name": "Project Sekai Stickers",
"short_name": "Pjsk Stickers",
"icons": [
{
"src": "/android-chrome-192x192.png",
@@ -11,9 +11,25 @@
"src": "/android-chrome-256x256.png",
"sizes": "256x256",
"type": "image/png"
},
{
"src": "/512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
"theme_color": "#cf93d9",
"background_color": "#121212",
"display": "standalone",
"description": "Make your own Project sekai stickers!",
"start_url": "https://st.ayaka.one/",
"dir": "ltr",
"lang": "en",
"orientation": "portrait",
"categories": [
"entertainment",
"photo",
"productivity",
"social"
]
}

2
public/sw.js Normal file

File diff suppressed because one or more lines are too long

1
public/sw.js.map Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
pwabuilder-adv-sw.js Normal file
View File

@@ -0,0 +1,4 @@
import { precacheAndRoute } from 'workbox-precaching/precacheAndRoute';
precacheAndRoute([{"revision":"5013924527096909c88d2bba3a04cb03","url":"App.css"},{"revision":"363cf5ef8045b76ae3fa53f6f630980f","url":"index.css"}]);

11
workbox-config.js Normal file
View File

@@ -0,0 +1,11 @@
module.exports = {
globDirectory: 'public/',
globPatterns: [
'**/*.{png,xml,ico,html,svg,jpg,webmanifest}'
],
swDest: 'public/sw.js',
ignoreURLParametersMatching: [
/^utm_/,
/^fbclid$/
]
};