diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html
index 30b434bcfb..f28e8f0bae 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
-
-
-
+
diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js
index 4a4d04b722..69557aa1c9 100644
--- a/Sprint-3/quote-generator/quotes.js
+++ b/Sprint-3/quote-generator/quotes.js
@@ -1,3 +1,7 @@
+const quoteSpace = document.querySelector("#quote");
+const authorSpace = document.querySelector("#author");
+const newQuoteButton = document.querySelector("#new-quote");
+
// DO NOT EDIT BELOW HERE
// pickFromArray is a function which will return one item, at
@@ -489,5 +493,13 @@ const quotes = [
author: "Zig Ziglar",
},
];
+const selectedQuote = pickFromArray(quotes);
+quoteSpace.innerHTML = selectedQuote.quote;
+authorSpace.innerHTML = selectedQuote.author;
+newQuoteButton.addEventListener("click", function () {
+ const selectedQuote = pickFromArray(quotes);
+ quoteSpace.innerHTML = selectedQuote.quote;
+ authorSpace.innerHTML = selectedQuote.author;
+});
// call pickFromArray with the quotes array to check you get a random quote
diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css
index 63cedf2d2f..bd61c4e9d6 100644
--- a/Sprint-3/quote-generator/style.css
+++ b/Sprint-3/quote-generator/style.css
@@ -1 +1,49 @@
-/** Write your CSS in here **/
+body {
+ background-color: orange;
+ margin: 0;
+ font-family: Arial, sans-serif;
+}
+.quote-container {
+ background-color: white;
+ width: 70%;
+ margin: 150px auto;
+ padding: 60px;
+ box-sizing: border-box;
+}
+.quote-content {
+ display: inline-flex;
+ align-items: flex-start;
+}
+
+.quote-icon {
+ font-size: 80px;
+ color: orange;
+ font-weight: bolder;
+ flex-shrink: align-self;
+}
+
+#quote {
+ font-size: 24px;
+ color: orange;
+ line-height: 1.5;
+ text-align: center;
+}
+#author {
+ text-align: right;
+ font-size: 18px;
+ color: orange;
+}
+#author::before {
+ content: "- ";
+}
+#new-quote {
+ display: block;
+ margin-left: auto;
+ margin-top: 25px;
+ background-color: orange;
+ color: white;
+ border: none;
+ padding: 18px 25px;
+ font-size: 18px;
+ cursor: pointer;
+}