diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 30b434bcf..a7633a8f5 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -3,13 +3,19 @@ - Title here + Quote generator app + -

hello there

+
+

-

- - +
+ +

+ + +
+ diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 4a4d04b72..ec4504db9 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -491,3 +491,13 @@ const quotes = [ ]; // call pickFromArray with the quotes array to check you get a random quote +function displayQuote() { + const picked = pickFromArray(quotes); + document.getElementById("quote").innerText = picked.quote; + document.getElementById("author").innerText = picked.author; +} + +document.addEventListener("DOMContentLoaded", () => { + displayQuote(); + document.getElementById("new-quote").addEventListener("click", 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..c4b305991 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -1 +1,63 @@ /** Write your CSS in here **/ + +body { + margin: 0; + min-height: 100vh; + background-color: orange; + display: flex; + justify-content: center; + align-items: center; + font-family: Arial, sans-serif; +} + +.quote-card { + width: 75%; + min-height: 350px; + background-color: white; + padding: 60px; + box-sizing: border-box; + text-align: center; +} + +.quote-container { + position: relative; + display: inline-block; + max-width: 900px; +} + +#quote { + color: #ff9d00; + font-family: Georgia, "Times New Roman", serif; + font-size: 38px; + line-height: 1.3; + text-align: center; + margin: 0; +} + +#quote::before { + content: "\201C"; + color: #ff9d00; + font-size: 70px; + line-height: 0; + vertical-align: -15px; + margin-right: 5px; +} + +#author { + margin: 40px; + font-family: Georgia, serif; + font-size: 24px; + color: orange; + text-align: right; +} + +#new-quote { + display: block; + margin: 40px 0 0 auto; + padding: 20px; + border: none; + background-color: orange; + color: white; + font-size: 20px; + cursor: pointer; +} \ No newline at end of file