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

hello there

-

-

- +
+

Quote Generator

+

+

+ +
diff --git a/Sprint-3/quote-generator/script.js b/Sprint-3/quote-generator/script.js new file mode 100644 index 000000000..159b597e9 --- /dev/null +++ b/Sprint-3/quote-generator/script.js @@ -0,0 +1,13 @@ +const authorDisplay = document.querySelector("#author"); +const quoteDisplay = document.querySelector("#quote"); +const displayButton = document.querySelector("#new-quote"); + +function displayQuote() { + const generateRandomQuote = pickFromArray(quotes); + quoteDisplay.textContent = generateRandomQuote.quote; + authorDisplay.textContent = generateRandomQuote.author; +} +displayButton.addEventListener("click", displayQuote); + +displayQuote(); + \ No newline at end of file diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 63cedf2d2..73872e8dd 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -1 +1,50 @@ /** Write your CSS in here **/ +body { + margin: 0; + min-height: 100vh; + background-color: orange; + display: flex; + justify-content: center; + align-items: center; + font-family: Georgia, serif; +} + +.quote-container { + width: 700px; + max-width: 80%; + background-color: white; + padding: 50px; +} + +h1 { + text-align: center; + color: orange; +} + +#quote { + color: orange; + font-size: 26px; + line-height: 1.5; +} + +#author { + color: orange; + font-size: 18px; + text-align: right; +} + +#new-quote { + display: block; + margin-top: 25px; + margin-left: auto; + padding: 12px 18px; + border: none; + background-color: orange; + color: white; + font-size: 16px; + cursor: pointer; +} + +#new-quote:hover { + opacity: 0.8; +} \ No newline at end of file