Skip to content

Commit

Permalink
frontend: Add manifest.json for better mobile experience
Browse files Browse the repository at this point in the history
Also added a meta description and an apple-touch-icon that will be displayed
on iOS devices as icon. This makes it possible to use the webapp a bit
like a native app. A serviceworker is not in use yet, since the app does
not really work well offline...
  • Loading branch information
dev-jan committed May 24, 2021
1 parent a956e33 commit 65ee3db
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions frontend/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"aot": true,
"assets": [
"src/favicon.ico",
"src/manifest.json",
"src/assets"
],
"styles": [
Expand Down
Binary file added frontend/src/assets/touch-icon-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 frontend/src/assets/touch-icon-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions frontend/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
<title>OpenEnergize</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Open Source Energy management platform">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="manifest" href="manifest.json">
<link rel="apple-touch-icon" href="/assets/touch-icon-192.png">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
Expand Down
22 changes: 22 additions & 0 deletions frontend/src/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "OpenEnergize",
"short_name": "OpenEnergize",
"start_url": "/",
"scope": "/",
"display": "standalone",
"background_color": "#3f51b5",
"theme_color": "#3f51b5",
"description": "An open source energy management platform",
"icons": [
{
"src": "/assets/touch-icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/assets/touch-icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}

0 comments on commit 65ee3db

Please sign in to comment.