Skip to content

Commit daa07ce

Browse files
committed
small corrections after review
1 parent 2a7cc71 commit daa07ce

2 files changed

Lines changed: 22 additions & 24 deletions

File tree

Sprint-3/quote-generator/quotes.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@ const newQuoteButton = document.querySelector("#new-quote");
55
function displayQuote() {
66
const randomQuote = pickFromArray(quotes);
77
quoteP.textContent = randomQuote.quote;
8-
authorP.textContent = `- ${randomQuote.author}`;
8+
authorP.textContent = randomQuote.author;
99
}
1010

11-
window.onload = function() {
11+
window.onload = function () {
12+
newQuoteButton.addEventListener("click", displayQuote);
1213
displayQuote();
1314
};
1415

15-
newQuoteButton.addEventListener("click", displayQuote);
16-
1716
// DO NOT EDIT BELOW HERE
1817

1918
// pickFromArray is a function which will return one item, at
@@ -39,7 +38,7 @@ function pickFromArray(choices) {
3938
// A list of quotes you can use in your app.
4039
// DO NOT modify this array, otherwise the tests may break!
4140
const quotes = [
42-
{
41+
{
4342
quote: "Life isn't about getting and having, it's about giving and being.",
4443
author: "Kevin Kruse",
4544
},
@@ -507,4 +506,3 @@ const quotes = [
507506
];
508507

509508
// call pickFromArray with the quotes array to check you get a random quote
510-
pickFromArray(quotes);

Sprint-3/quote-generator/style.css

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
body {
2-
background-color: rgb(13, 13, 50);
3-
color: rgb(250, 200, 135);
4-
font-family: 'Trebuchet MS', 'Verdana', Arial, sans-serif;
5-
text-align: center;
6-
justify-content: center;
7-
display: flex;
2+
background-color: rgb(13, 13, 50);
3+
color: rgb(250, 200, 135);
4+
font-family: "Trebuchet MS", "Verdana", Arial, sans-serif;
5+
text-align: center;
6+
justify-content: center;
7+
display: flex;
88
}
99

1010
.quotebox {
11-
position: relative;
12-
width: 70%;
13-
background: rgb(250, 200, 135);
14-
color: rgb(13, 13, 50);
15-
display: flex;
16-
flex-direction: column;
17-
align-items: center;
18-
padding: 20px;
11+
position: relative;
12+
width: 70%;
13+
background: rgb(250, 200, 135);
14+
color: rgb(13, 13, 50);
15+
display: flex;
16+
flex-direction: column;
17+
align-items: center;
18+
padding: 20px;
1919
}
2020

2121
.container {
22-
display: flex;
23-
flex-direction: column;
24-
align-items: center;
25-
justify-content: center;
22+
display: flex;
23+
flex-direction: column;
24+
align-items: center;
25+
justify-content: center;
2626
}

0 commit comments

Comments
 (0)