This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +59
-8
lines changed Expand file tree Collapse file tree 4 files changed +59
-8
lines changed Original file line number Diff line number Diff line change 7
7
< meta name ="theme-color " content ="#000000 " />
8
8
< meta name ="description " content ="Todo App " />
9
9
< link rel ="apple-touch-icon " href ="%PUBLIC_URL%/logo192.png " />
10
+ <!-- <link rel="apple-touch-icon" href="./logo192.png" /> -->
10
11
<!--
11
12
manifest.json provides metadata used when your web app is installed on a
12
13
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
13
14
-->
14
15
< link rel ="manifest " href ="%PUBLIC_URL%/manifest.json " />
16
+ <!-- <link rel="manifest" href="./manifest.json" /> -->
15
17
<!--
16
18
Notice the use of %PUBLIC_URL% in the tags above.
17
19
It will be replaced with the URL of the `public` folder during the build.
40
42
if ( 'serviceWorker' in navigator ) {
41
43
window . addEventListener ( 'load' , ( ) => {
42
44
navigator . serviceWorker
43
- . register ( './serviceworker.js' )
45
+ . register ( './serviceworker.js' , {
46
+ // scope: '.', // <--- THIS BIT IS REQUIRED
47
+ } )
44
48
. then ( ( reg ) => console . log ( 'Success: ' , reg . scope ) )
45
49
. catch ( ( err ) => console . log ( 'Failure: ' , err ) ) ;
46
50
} ) ;
Original file line number Diff line number Diff line change 1
1
{
2
- "short_name" : " React App" ,
3
- "name" : " Create React App Sample " ,
2
+ "short_name" : " Todo App" ,
3
+ "name" : " Todo App PWA " ,
4
4
"icons" : [
5
5
{
6
6
"src" : " favicon.ico" ,
7
7
"sizes" : " 64x64 32x32 24x24 16x16" ,
8
- "type" : " image/x-icon"
8
+ "type" : " image/x-icon" ,
9
+ "purpose" : " any maskable"
9
10
},
10
11
{
11
12
"src" : " logo192.png" ,
12
13
"type" : " image/png" ,
13
- "sizes" : " 192x192"
14
+ "sizes" : " 192x192" ,
15
+ "purpose" : " any maskable"
14
16
},
15
17
{
16
18
"src" : " logo512.png" ,
17
19
"type" : " image/png" ,
18
- "sizes" : " 512x512"
20
+ "sizes" : " 512x512" ,
21
+ "purpose" : " any maskable"
19
22
}
20
23
],
21
24
"start_url" : " ." ,
22
25
"display" : " standalone" ,
23
26
"theme_color" : " #000000" ,
24
27
"background_color" : " #ffffff"
25
- }
28
+ }
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 " />
5
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
6
+ < title > Weather App</ title >
7
+ < style type ="text/css ">
8
+ html {
9
+ height : 100% ;
10
+ }
11
+ body {
12
+ height : 100% ;
13
+ margin : 0 ;
14
+ background : # 0a1f44 ;
15
+ display : flex;
16
+ align-items : center;
17
+ text-align : center;
18
+ justify-content : center;
19
+ }
20
+
21
+ .city {
22
+ align-items : center;
23
+ width : 80% ;
24
+ display : flex;
25
+ justify-content : center;
26
+ flex-direction : column;
27
+ padding : 40px 8% ;
28
+ border-radius : 20px ;
29
+ background : # fff ;
30
+ }
31
+
32
+ .city-name {
33
+ font-size : 2em ;
34
+ }
35
+ </ style >
36
+ </ head >
37
+ < body >
38
+ < div class ="city ">
39
+ < h2 class ="city-name ">
40
+ < span > Please go to online.</ span >
41
+ </ h2 >
42
+ </ div >
43
+ </ body >
44
+ </ html >
Original file line number Diff line number Diff line change @@ -21,4 +21,4 @@ ReactDOM.render(
21
21
// If you want your app to work offline and load faster, you can change
22
22
// unregister() to register() below. Note this comes with some pitfalls.
23
23
// Learn more about service workers: https://bit.ly/CRA-PWA
24
- serviceWorker . unregister ( ) ;
24
+ serviceWorker . register ( ) ;
You can’t perform that action at this time.
0 commit comments