File tree Expand file tree Collapse file tree 7 files changed +97
-17
lines changed Expand file tree Collapse file tree 7 files changed +97
-17
lines changed Original file line number Diff line number Diff line change 13
13
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
14
14
-->
15
15
< link rel ="manifest " href ="%PUBLIC_URL%/manifest.json " />
16
- < link href ="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap " rel ="stylesheet ">
16
+ < link href ="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900 &display=swap " rel ="stylesheet ">
17
17
18
18
<!--
19
19
Notice the use of %PUBLIC_URL% in the tags above.
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import CovidApp from "./components/CovidApp";
4
4
5
5
function App ( ) {
6
6
return (
7
- < div className = "App" >
7
+ < div >
8
8
< CovidApp />
9
9
</ div >
10
10
) ;
Original file line number Diff line number Diff line change 1
1
import React , { Component } from "react" ;
2
2
import Overview from "./Overview" ;
3
+ import Navbar from "./Navbar" ;
4
+ import { withStyles } from "@material-ui/styles" ;
5
+ import colors from "../colors" ;
6
+
7
+ const styles = {
8
+ root : {
9
+ display : "flex" ,
10
+ height : "100vh" ,
11
+ } ,
12
+ navBar : {
13
+ flex : "0 0 10%" ,
14
+ backgroundColor : colors . darkPurple ,
15
+ color : "#ffffff" ,
16
+ textTransform : "capitalize" ,
17
+ display : "flex" ,
18
+ justifyContent : "center" ,
19
+ } ,
20
+ mainContent : {
21
+ flex : 1 ,
22
+ padding : "4rem" ,
23
+ } ,
24
+ heading : {
25
+ fontWeight : "500" ,
26
+ "& span" : {
27
+ color : colors . purple ,
28
+ fontWeight : "900" ,
29
+ marginRight : "1rem" ,
30
+ } ,
31
+ } ,
32
+ } ;
33
+
34
+ class CovidApp extends Component {
35
+ constructor ( props ) {
36
+ super ( props ) ;
37
+
38
+ this . state = { } ;
39
+ }
3
40
4
- export default class CovidApp extends Component {
5
41
render ( ) {
42
+ const { classes } = this . props ;
6
43
return (
7
- < div >
8
- < h1 > Covid-19 India Trend</ h1 >
9
- < Overview />
44
+ < div className = { classes . root } >
45
+ < div className = { classes . navBar } >
46
+ < Navbar />
47
+ </ div >
48
+ < div className = { classes . mainContent } >
49
+ < h1 className = { classes . heading } >
50
+ < span > Covid-19</ span > India Trend
51
+ </ h1 >
52
+ < Overview />
53
+ </ div >
10
54
</ div >
11
55
) ;
12
56
}
13
57
}
58
+
59
+ export default withStyles ( styles ) ( CovidApp ) ;
Original file line number Diff line number Diff line change 1
1
import React , { Component } from "react" ;
2
2
import { withStyles } from "@material-ui/styles" ;
3
+ import colors from "../colors" ;
3
4
4
5
const styles = {
5
6
panel : {
@@ -22,13 +23,13 @@ const styles = {
22
23
let color ;
23
24
let title = props . title . toLowerCase ( ) ;
24
25
if ( title === "recovered" ) {
25
- color = " green" ;
26
+ color = colors . green ;
26
27
} else if ( title === "deceased" ) {
27
- color = " purple" ;
28
+ color = colors . purple ;
28
29
} else if ( title === "active" ) {
29
- color = " orange" ;
30
+ color = colors . orange ;
30
31
} else if ( title === "confirmed" ) {
31
- color = " red" ;
32
+ color = colors . red ;
32
33
}
33
34
return color ;
34
35
} ,
@@ -41,13 +42,13 @@ const styles = {
41
42
let color ;
42
43
let title = props . title . toLowerCase ( ) ;
43
44
if ( title === "recovered" ) {
44
- color = " green" ;
45
+ color = colors . green ;
45
46
} else if ( title === "deceased" ) {
46
- color = " purple" ;
47
+ color = colors . purple ;
47
48
} else if ( title === "active" ) {
48
- color = " orange" ;
49
+ color = colors . orange ;
49
50
} else if ( title === "confirmed" ) {
50
- color = " red" ;
51
+ color = colors . red ;
51
52
}
52
53
return color ;
53
54
} ,
Original file line number Diff line number Diff line change
1
+ import React , { Component } from "react" ;
2
+ import { withStyles } from "@material-ui/styles" ;
3
+
4
+ const styles = {
5
+ nav : {
6
+ marginTop : "12rem" ,
7
+ } ,
8
+ navItems : {
9
+ listStyle : "none" ,
10
+ } ,
11
+ navLinks : {
12
+ marginBottom : "7rem" ,
13
+ fontWeight : "500" ,
14
+ } ,
15
+ } ;
16
+
17
+ class Navbar extends Component {
18
+ render ( ) {
19
+ const { classes } = this . props ;
20
+ return (
21
+ < nav className = { classes . nav } >
22
+ < ul className = { classes . navItems } >
23
+ < li className = { classes . navLinks } > Overview</ li >
24
+ < li className = { classes . navLinks } > Symptoms</ li >
25
+ < li className = { classes . navLinks } > Test Yourself</ li >
26
+ < li className = { classes . navLinks } > Help</ li >
27
+ </ ul >
28
+ </ nav >
29
+ ) ;
30
+ }
31
+ }
32
+
33
+ export default withStyles ( styles ) ( Navbar ) ;
Original file line number Diff line number Diff line change @@ -5,11 +5,11 @@ import { withStyles } from "@material-ui/styles";
5
5
6
6
const styles = {
7
7
root : {
8
- // display : "flex ",
8
+ textAlign : "center " ,
9
9
} ,
10
10
panels : {
11
11
display : "flex" ,
12
- justifyContent : "space-evenly " ,
12
+ justifyContent : "space-between " ,
13
13
alignItems : "center" ,
14
14
} ,
15
15
} ;
Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ html {
13
13
14
14
15
15
body {
16
- margin : 0 ;
17
16
font-family : 'Roboto' ,
18
17
sans-serif;
19
18
20
19
-webkit-font-smoothing : antialiased;
21
20
-moz-osx-font-smoothing : grayscale;
22
21
font-size : 1.6rem ;
22
+ line-height : 1.7 ;
23
23
background-color : rgba (185 , 185 , 185 , 0.281 );
24
24
}
25
25
You can’t perform that action at this time.
0 commit comments