diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 30b434bcf..fb0ae9b17 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -1,15 +1,22 @@ - + - Title here + Quote generator app + -

hello there

-

-

- +
+

Get inspired by the Quote Generator

+ +
+

+

+
+ + +
diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 4a4d04b72..27617178b 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -1,3 +1,18 @@ +const quoteP = document.querySelector("#quote"); +const authorP = document.querySelector("#author"); +const newQuoteButton = document.querySelector("#new-quote"); + +function displayQuote() { + const randomQuote = pickFromArray(quotes); + quoteP.textContent = randomQuote.quote; + authorP.textContent = randomQuote.author; +} + +window.onload = function () { + newQuoteButton.addEventListener("click", displayQuote); + displayQuote(); +}; + // DO NOT EDIT BELOW HERE // pickFromArray is a function which will return one item, at diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 63cedf2d2..7eb938baa 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -1 +1,26 @@ -/** Write your CSS in here **/ +body { + background-color: rgb(13, 13, 50); + color: rgb(250, 200, 135); + font-family: "Trebuchet MS", "Verdana", Arial, sans-serif; + text-align: center; + justify-content: center; + display: flex; +} + +.quotebox { + position: relative; + width: 70%; + background: rgb(250, 200, 135); + color: rgb(13, 13, 50); + display: flex; + flex-direction: column; + align-items: center; + padding: 20px; +} + +.container { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +}