Skip to content

Commit

Permalink
Add icons for the web PWA (#191)
Browse files Browse the repository at this point in the history
- Remove manifest color definitions to use default background (light or dark)
- Add title in manifest
- Add multiple png favicons
- Use svg in manifest icons

Fixes #164
  • Loading branch information
Jupi007 committed Aug 31, 2022
1 parent c5e9a60 commit 2c1eb4d
Show file tree
Hide file tree
Showing 12 changed files with 120 additions and 25 deletions.
Binary file removed example/web/icons/Icon-512.png
Binary file not shown.
Binary file removed example/web/icons/Icon-maskable-192.png
Binary file not shown.
Binary file removed example/web/icons/Icon-maskable-512.png
Binary file not shown.
File renamed without changes
File renamed without changes
Binary file added example/web/icons/favicon-32.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/web/icons/favicon-48.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/web/icons/favicon-96.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
104 changes: 104 additions & 0 deletions example/web/icons/icon-maskable.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
10 changes: 7 additions & 3 deletions example/web/index.html
Expand Up @@ -24,11 +24,15 @@
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="Yaru Widgets Factory">
<link rel="apple-touch-icon" href="icons/Icon-192.png">
<link rel="apple-touch-icon" href="icons/favicon-192.png">

<!-- Favicon -->
<link rel="icon" type="image/svg+xml" href="favicon.svg">
<link rel="icon" type="image/png" href="favicon.png"/>
<link rel="icon" type="image/svg+xml" sizes="any" href="icons/icon.svg">
<link rel="icon" type="image/png" sizes="192x192" href="icons/favicon-192.png"/>
<link rel="icon" type="image/png" sizes="96x96" href="icons/favicon-96.png"/>
<link rel="icon" type="image/png" sizes="48x48" href="icons/favicon-48.png"/>
<link rel="icon" type="image/png" sizes="32x32" href="icons/favicon-32.png"/>
<link rel="icon" type="image/png" sizes="16x16" href="icons/favicon-16.png"/>

<title>Yaru Widgets Factory</title>
<link rel="manifest" href="manifest.json">
Expand Down
31 changes: 9 additions & 22 deletions example/web/manifest.json
@@ -1,34 +1,21 @@
{
"name": "example",
"short_name": "example",
"name": "yaru_widgets.dart factory",
"short_name": "yaru_widgets factory",
"start_url": ".",
"display": "standalone",
"background_color": "#0175C2",
"theme_color": "#0175C2",
"description": "A new Flutter project.",
"description": "A widgets factory for yaru_widgets.dart.",
"orientation": "portrait-primary",
"prefer_related_applications": false,
"icons": [
{
"src": "icons/Icon-192.png",
"sizes": "192x192",
"type": "image/png"
"src": "icons/icon.svg",
"sizes": "any",
"type": "image/svg+xml"
},
{
"src": "icons/Icon-512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "icons/Icon-maskable-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "icons/Icon-maskable-512.png",
"sizes": "512x512",
"type": "image/png",
"src": "icons/icon-maskable.svg",
"sizes": "any",
"type": "image/svg+xml",
"purpose": "maskable"
}
]
Expand Down

0 comments on commit 2c1eb4d

Please sign in to comment.