diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 30b434bcf..377e6ad46 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -3,13 +3,21 @@ - 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..067439065 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -491,3 +491,10 @@ const quotes = [ ]; // call pickFromArray with the quotes array to check you get a random quote +function generateRandomQuote(){ + const myObj =pickFromArray(quotes); + document.getElementById("quote-text").textContent=`${myObj.quote}` + document.getElementById("quote-author").textContent=`-${myObj.author}` +} + window.onload=generateRandomQuote; +document.getElementById("new-quote-btn").addEventListener("click",generateRandomQuote); \ No newline at end of file diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 63cedf2d2..40c40352f 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -1 +1,70 @@ -/** Write your CSS in here **/ + +* { + box-sizing: border-box; +} + +body { + margin: 0; + font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", + Roboto, sans-serif; + background-color: #f2a634; + +} + + +.page { + min-height: 100vh; + display: flex; + align-items: center; + justify-content: center; +} + +.quote-card { + background-color: #ffffff; + max-width: 900px; + width: 90%; + padding: 4rem 5rem; + box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); +} + +.quote { + margin: 0 0 3rem 0; + position: relative; + color: #f2a634; +} + +.quote-mark { + font-size: 4rem; + line-height: 1; + display: inline-block; + margin-right: 0.75rem; + vertical-align: top; +} + +blockquote { + display: inline; + font-size: 2rem; + font-weight: 500; + color: #f2a634; +} + + +figcaption { + margin-top: 2rem; + text-align: right; + font-size: 1.1rem; + color: #f2a634; +} + +#new-quote-btn { + display: inline-block; + margin-left: auto; + padding: 0.9rem 2.4rem; + font-size: 1rem; + border: none; + background-color: #f2a634; + color: #ffffff; + cursor: pointer; + text-transform: none; +} +