Skip to content

Commit

Permalink
Make the page “installable” on more browsers
Browse files Browse the repository at this point in the history
Add a 180×180 apple-touch-icon, robots.txt, and inject a service worker.
  • Loading branch information
julienrf committed May 17, 2024
1 parent 33fa607 commit 21c3fea
Show file tree
Hide file tree
Showing 6 changed files with 569 additions and 250 deletions.
1 change: 1 addition & 0 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<title>SoaringMeteo</title>
<meta name="description" content="Free weather information and forecast (WRF and GFS) for soaring (paragliding, hang-gliding, sailplane) pilots.">
<link rel="icon" href="/src/favicoSoaringMeteo.png">
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180">
<meta name="theme-color" content="#ffffff">
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"serve-static": "1.15.0",
"typescript": "5.3.3",
"vite": "4.5.3",
"vite-plugin-pwa": "0.14.1",
"vite-plugin-pwa": "0.20.0",
"vite-plugin-solid": "2.5.0"
},
"scripts": {
Expand Down
Binary file added frontend/public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions frontend/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-agent: *
Allow: /
9 changes: 5 additions & 4 deletions frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ export default defineConfig(() => ({
outdir: "./src/generated-i18n", //Where you want the generated files to be placed
}),
VitePWA({
// registerType: 'autoUpdate',
injectRegister: null,
registerType: 'autoUpdate',
injectRegister: 'script-defer',
// devOptions: { enabled: true },
manifest: {
name: 'Soaringmeteo',
description: 'Meteorology for soaring pilots',
Expand All @@ -24,12 +25,12 @@ export default defineConfig(() => ({
icons: [
{
src: './favicon.192.png',
size: '192x192',
sizes: '192x192',
type: 'image/png'
},
{
src: './favicon.512.png',
size: '512x512',
sizes: '512x512',
type: 'image/png'
}
],
Expand Down
Loading

0 comments on commit 21c3fea

Please sign in to comment.