Skip to content

Commit 49e38b9

Browse files
Merge pull request PrinceSumberia#9 from PrinceSumberia/changes
Made Pages Responsive
2 parents 0caf40b + 98b29bb commit 49e38b9

File tree

8 files changed

+71
-9
lines changed

8 files changed

+71
-9
lines changed

src/components/Form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Form extends Component {
2626
render() {
2727
const { classes } = this.props;
2828
return (
29-
<form onSubmit={this.handleSubmit}>
29+
<form onSubmit={this.handleSubmit} className={classes.form}>
3030
<input
3131
className={classes.input}
3232
name="location"

src/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ body {
3030

3131
@media (max-width: 576px) {
3232
body {
33-
font-size: 1rem
33+
font-size: 1.2rem
3434
}
3535
}
3636

src/styles/CardsStyles.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import sizes from "./sizes";
2+
13
export default {
24
card: {
35
width: "100%",
@@ -24,6 +26,10 @@ export default {
2426

2527
cardTitle: {
2628
textTransform: "capitalize",
29+
30+
[sizes.down("sm")]: {
31+
fontSize: "1.6rem",
32+
},
2733
},
2834
cardImage: {
2935
display: "block",

src/styles/DisplayTable.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ table {
127127
.delta-confirmed,
128128
.delta-recovered,
129129
.delta-deceased {
130-
font-size: 1.2rem;
130+
font-size: .9rem;
131131
margin-left: .5rem;
132132
}
133133

src/styles/FormStyles.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1+
import sizes from "./sizes";
2+
13
export default {
4+
form: {
5+
// [sizes.down("xs")]: {
6+
// display: "flex",
7+
// flexDirection: "column",
8+
// justifyContent: "center",
9+
// alignItems: "center",
10+
// },
11+
},
12+
213
input: {
314
fontFamily: "inherit",
415
fontSize: "1.6rem",
@@ -9,9 +20,21 @@ export default {
920
margin: "1.5rem",
1021
transition: "all .4s",
1122

23+
[sizes.down("md")]: {
24+
width: "35%",
25+
fontSize: "1.4rem",
26+
padding: "1rem 2rem",
27+
},
28+
29+
[sizes.down("xs")]: {},
30+
1231
"&:focus": {
1332
width: "22%",
1433
outline: "none",
34+
35+
[sizes.down("md")]: {
36+
width: "45%",
37+
},
1538
},
1639

1740
"&::placeholder": {
@@ -32,6 +55,11 @@ export default {
3255
transition: "all .4s",
3356
transform: "translateY(-2px)",
3457
boxShadow: "0 .5rem 1rem rgba(0,0,0,0.2)",
58+
59+
[sizes.down("md")]: {
60+
fontSize: "1.4rem",
61+
padding: "1rem 1.5rem",
62+
},
3563
},
3664

3765
"&:hover": {

src/styles/HelpStyles.js

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,19 @@ export default {
77

88
mainHeading: {
99
marginBottom: "2rem",
10+
11+
[sizes.down("md")]: {
12+
margin: "2rem",
13+
},
14+
[sizes.down("sm")]: {
15+
fontSize: "2rem",
16+
},
1017
},
1118

1219
container: {
1320
marginTop: "3rem",
1421
display: "flex",
15-
justifyContent: "space-between",
22+
justifyContent: "space-around",
1623
flexWrap: "wrap",
1724
},
1825

@@ -21,14 +28,22 @@ export default {
2128
backgroundColor: "#fff",
2229
borderRadius: "1rem",
2330
padding: "3.5rem",
24-
width: "25%",
31+
width: "20%",
2532
display: "flex",
26-
margin: "2rem 0",
33+
margin: "2rem 1rem",
2734
flexDirection: "column",
2835
textAlign: "left",
2936

30-
[sizes.down("md")]: {
37+
[sizes.down("sm")]: {
38+
padding: "2rem",
39+
margin: "1rem",
40+
width: "30%",
41+
},
42+
43+
[sizes.down("xs")]: {
3144
padding: "2rem",
45+
margin: "1rem",
46+
width: "50%",
3247
},
3348
},
3449

src/styles/NavbarStyles.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ export default {
7171
},
7272

7373
[sizes.down("xs")]: {
74-
fontSize: "1.2rem",
7574
marginBottom: ".5rem",
7675
},
7776
},

src/styles/StaySafeStyles.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,30 @@
1+
import sizes from "./sizes";
2+
13
export default {
24
staySafe: {
35
textAlign: "center",
46

57
"& h1": {
68
marginBottom: "4.5rem",
9+
10+
[sizes.down("lg")]: {
11+
margin: "4rem 0",
12+
},
13+
14+
[sizes.down("md")]: {
15+
margin: "2.5rem 0",
16+
},
717
},
818
},
919
cardsBox: {
1020
display: "flex",
11-
width: "100%",
1221
flexWrap: "wrap",
22+
padding: "2rem",
1323
justifyContent: "space-around",
1424
alignItems: "stretch",
25+
26+
[sizes.down("sm")]: {
27+
padding: "0",
28+
},
1529
},
1630
};

0 commit comments

Comments
 (0)