Skip to content

Commit dd02647

Browse files
fontss changed
1 parent f72d3da commit dd02647

File tree

3 files changed

+31
-9
lines changed

3 files changed

+31
-9
lines changed

src/App.css

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
@import url('https://fonts.googleapis.com/css2?family=Patrick+Hand&display=swap');
1+
@import url("https://fonts.googleapis.com/css2?family=Patrick+Hand&display=swap");
2+
@import url("https://fonts.googleapis.com/css2?family=Sora&display=swap");
23
#root,
34
html,
45
body {
56
margin: 0;
67
padding: 0;
78
height: 100vh;
8-
9+
font-family: "Sora", sans-serif;
910
}
1011

1112
.app {
@@ -39,10 +40,11 @@ body {
3940
align-items: center;
4041
font-size: large;
4142
height: 582px;
42-
font-family: 'Patrick Hand SC', cursive;
43+
font-family: "Patrick Hand", cursive;
4344
}
4445

4546
.button {
47+
font-family: "Alegreya Sans SC", sans-serif;
4648
position: relative;
4749
outline: none;
4850
text-decoration: none;
@@ -66,11 +68,11 @@ body {
6668
letter-spacing: 0.7px;
6769
}
6870

69-
.button:hover {
71+
.button:hover, .button:active {
7072
animation: rotate 0.7s ease-in-out both;
7173
}
7274

73-
.button:hover span {
75+
.button:hover span, .button:active span {
7476
animation: storm 0.7s ease-in-out both;
7577
animation-delay: 0.06s;
7678
}

src/components/main.js

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,20 @@ export default class Main extends Component {
3939
});
4040
};
4141
fetchQuote = () => {
42-
4342
axios
4443
.get("https://api.adviceslip.com/advice")
4544
.then((response) => {
4645
const { advice } = response.data.slip;
4746
// console.log(advice);
48-
this.setState({ advice },()=>{this.setBgImage();});
47+
this.setState({ advice }, () => {
48+
this.setBgImage();
49+
});
4950
})
5051
.catch((error) => {
5152
console.log(error);
5253
});
5354
};
5455

55-
5656
render() {
5757
return (
5858
<main>
@@ -67,9 +67,28 @@ export default class Main extends Component {
6767
content="Get the most inspirational quotes at your finger tips. "
6868
/>
6969
<link rel="shortcut icon" href={favicon} type="image/x-icon" />
70+
<link rel="preconnect" href="https://fonts.googleapis.com" />
71+
<link
72+
rel="preconnect"
73+
href="https://fonts.gstatic.com"
74+
crossorigin
75+
/>
76+
<link
77+
href="https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap"
78+
rel="stylesheet"
79+
></link>
80+
81+
<link
82+
href="https://fonts.googleapis.com/css2?family=Alegreya+Sans+SC:wght@500&display=swap"
83+
rel="stylesheet"
84+
/>
85+
<link
86+
href="https://fonts.googleapis.com/css2?family=Patrick+Hand&display=swap"
87+
rel="stylesheet"
88+
/>
7089
</Helmet>
7190
<div className="card">
72-
<p className="heading">"{this.state.advice}"</p>
91+
<b className="heading">"{this.state.advice}"</b>
7392

7493
<button className="button" onClick={this.fetchQuote}>
7594
<span>ONE MORE ADVICE!</span>

src/css/nav.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
margin-top: 0.2rem;
1111
margin-left: 0.8rem;
1212
color: whitesmoke;
13+
font-family: 'Montserrat', sans-serif;
1314
}
1415
.github_icon {
1516
border-radius: 50%;

0 commit comments

Comments
 (0)