Clone:link
Modify The structure:
Move css, JS, image, index.html to an ' app ' folder.
Manifest.json:
{ "name":"Fireworks App", "Short_name":"Fireworks", "icons": [ { "src":"Images/fireworks-icon192x192.png", "Sizes":"192x192", "type":"Image/png" }], "Start_url":"/index.html", "Display":"Standalone", "Background_color":"#000", "Theme_color":"#536878"}
Name:showing on splash screen.
Short_name:showing on the Home screen.
Background_color:splash Screen background color
Theme_color:toolbar Color (url bar color)
Icons:icons for display on home screens and splash screen
"Display": "standalone" or "fullscreen"
Start_url:index.html
Add to index.html:
<Head> <MetaCharSet= "Uft-8" /> <Metaname= "Theme-color"content= "#536878" /> <Metaname=viewportcontent= "Width=device-width, initial-scale=1"> <title>fireworks!</title> <Linkhref= "Css/fireworks.css"rel= "stylesheet"> <Linkrel= "manifest"href= "Manifest.json"> <!--Add to home screens for Safari on IOS - <Metaname= "Apple-mobile-web-app-capable"content= "Yes"> <Metaname= "Apple-mobile-web-app-status-bar-style"content= "BLACK"> <Metaname= "Apple-mobile-web-app-title"content= "Fireworks"> <Linkrel= "Apple-touch-icon"href= "Images/fireworks-icon192x192.png"> <!--Add to home screens for Windows - <Metaname= "Msapplication-tileimage"content= "Images/fireworks-icon192x192.png"> <Metaname= "Msapplication-tilecolor"content= "#2F3BA2"> </Head>
Register Service Worker:
<Script> if ('Serviceworker' inchNavigator) {Console.log ("Would the service worker register?"); Navigator.serviceWorker.register ('Service-worker.js'). Then (function(reg) {Console.log ("Yes, it did."); }).Catch(function(Err) {Console.log ("No it didn ' t. This happened:", Err)}); }</Script>
Also Create a service-worker.js in App folder.
Last you can deply to Firebase to see your app
[PWA] ADD Web App to your Home screen