Skip to content

Commit 2cd92b4

Browse files
committed
feat: enhance manifest.json and update icons for better PWA support
1 parent 2bd5a36 commit 2cd92b4

7 files changed

Lines changed: 29 additions & 9 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,12 @@ The content is loaded from a `data.json` file, which contains all texts and refe
6565

6666
- Title and description in `index.html`
6767
- Title in `stencil.config.ts` (`Env.TITLE`)
68+
- `name`, `short_name` and `description` in the `manifest.json`
6869

6970
#### Images
7071

7172
- `logo.png` in `assets` folder
72-
- `favicon.ico` and `icon.png` in `assets/icon` folder
73+
- `favicon.ico`, `icon-192.png`, `icon-512.png` in `assets/icon` folder
7374

7475
### Offline Support
7576

src/assets/icon/favicon.ico

-9 KB
Binary file not shown.

src/assets/icon/icon-192.png

32.2 KB
Loading

src/assets/icon/icon-512.png

144 KB
Loading

src/assets/icon/icon.png

-198 KB
Binary file not shown.

src/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html dir="ltr" lang="en">
33
<head>
44
<meta charset="utf-8">
5-
<title>Animals</title>
5+
<title>Animals Audioguide</title>
66
<meta name="Description" content="A sample audioguide app for animals">
77
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0, viewport-fit=cover">
88
<meta name="theme-color" content="#faefdc">
@@ -13,7 +13,7 @@
1313
<script nomodule src="/build/app.js"></script>
1414
<link href="/build/app.css" rel="stylesheet">
1515

16-
<link rel="apple-touch-icon" href="/assets/icon/icon.png">
16+
<link rel="apple-touch-icon" sizes="192x192" href="/assets/icon/icon-192.png">
1717
<link rel="icon" type="image/x-icon" href="/assets/icon/favicon.ico">
1818
<link rel="manifest" href="/manifest.json">
1919
</head>

src/manifest.json

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,32 @@
11
{
2-
"name": "Animals",
2+
"name": "Animals Audioguide",
33
"short_name": "Animals",
4+
"description": "A sample audioguide app for animals",
5+
"lang": "en",
46
"start_url": "/",
57
"display": "standalone",
8+
"orientation": "portrait",
69
"icons": [{
7-
"src": "assets/icon/icon.png",
8-
"sizes": "512x512",
9-
"type": "image/png"
10-
}],
10+
"src": "assets/icon/icon-192.png",
11+
"sizes": "192x192",
12+
"type": "image/png",
13+
"purpose": "maskable"
14+
}, {
15+
"src": "assets/icon/icon-512.png",
16+
"sizes": "512x512",
17+
"type": "image/png",
18+
"purpose": "maskable"
19+
}, {
20+
"src": "assets/icon/icon-192.png",
21+
"sizes": "192x192",
22+
"type": "image/png",
23+
"purpose": "any"
24+
}, {
25+
"src": "assets/icon/icon-512.png",
26+
"sizes": "512x512",
27+
"type": "image/png",
28+
"purpose": "any"
29+
}],
1130
"background_color": "#faefdc",
1231
"theme_color": "#faefdc"
13-
}
32+
}

0 commit comments

Comments
 (0)