Skip to content

Commit

Permalink
Merge pull request #401 from acs3ss/make-pwa
Browse files Browse the repository at this point in the history
Make PWA installable - with icons!
  • Loading branch information
acs3ss authored Nov 18, 2023
2 parents f5fe1dc + 39a1af5 commit 232c0d9
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="description" content="24 card game solver">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="color-scheme" content="light dark">
<link rel="icon" href="favicon.ico">
<link rel="icon" href="/public/icons/512.png">
<title>24 Solver</title>
</head>
<body class="container-fluid px-0">
Expand Down
Binary file added public/icons/128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 37 additions & 2 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,44 @@ export default defineConfig({
plugins: [
vue(),
VitePWA({
manifest: false, // Not a PWA (yet!)
manifest: {
name: "24 Solver",
short_name: "24 Solver",
start_url: "./",
display: "standalone",
background_color: "black",
lang: "en",
scope: "./",
icons: [
{
src: "/icons/72.png",
sizes: "72x72",
type: "image/png",
},
{
src: "/icons/128.png",
sizes: "128x128",
type: "image/png",
},
{
src: "/icons/144.png",
sizes: "144x144",
type: "image/png",
},
{
src: "/icons/192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "/icons/512.png",
sizes: "512x512",
type: "image/png",
},
],
},
workbox: {
globPatterns: ["**/*.{js,css,html,ico,svg}"],
globPatterns: ["**/*.{js,css,html,ico,svg,png}"],
},
}),
],
Expand Down

0 comments on commit 232c0d9

Please sign in to comment.