diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 30b434bcf..8a36780b4 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -3,13 +3,16 @@ - Title here + + Quote Generator + -

hello there

-

-

- +
+

+

+ +
diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 4a4d04b72..2f756d627 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -491,3 +491,14 @@ const quotes = [ ]; // call pickFromArray with the quotes array to check you get a random quote +let quote = document.getElementById("quote"); +let author = document.getElementById("author"); +let quoteButton = document.getElementById("new-quote"); + +function displayQuote() { + let randomQuote = pickFromArray(quotes); + quote.textContent = `"${randomQuote.quote}"`; + author.textContent = `-${randomQuote.author}`; +} +displayQuote(); +quoteButton.addEventListener("click", displayQuote); diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 63cedf2d2..7da700658 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -1 +1,35 @@ /** Write your CSS in here **/ +body { + background-color: antiquewhite; + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + font-family: Arial, Helvetica, sans-serif; +} + +div { + background-color: azure; + width: 500px; + padding: 60px; + border-radius: 10px; + box-shadow: 5px 5px 10px black; +} + +#quote { + font-size: 24px; +} + +#author { + font-size: 18px; +} + +#new-quote { + padding: 16px 10px; + border-radius: 10px; + cursor: pointer; +} + +#new-quote:hover { + color: red; +}