diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html
index 30b434bcf..83f633e7d 100644
--- a/Sprint-3/quote-generator/index.html
+++ b/Sprint-3/quote-generator/index.html
@@ -3,11 +3,11 @@
- Title here
+ Quote Generator app
- hello there
+ Quote Generator app
diff --git a/Sprint-3/quote-generator/package.json b/Sprint-3/quote-generator/package.json
index 0f6f98917..ea64c4035 100644
--- a/Sprint-3/quote-generator/package.json
+++ b/Sprint-3/quote-generator/package.json
@@ -13,5 +13,10 @@
"bugs": {
"url": "https://github.com/CodeYourFuture/CYF-Coursework-Template/issues"
},
- "homepage": "https://github.com/CodeYourFuture/CYF-Coursework-Template#readme"
+ "homepage": "https://github.com/CodeYourFuture/CYF-Coursework-Template#readme",
+ "devDependencies": {
+ "@testing-library/jest-dom": "^6.9.1",
+ "jest": "^30.3.0",
+ "jest-environment-jsdom": "^30.3.0"
+ }
}
diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js
index 4a4d04b72..5784e945d 100644
--- a/Sprint-3/quote-generator/quotes.js
+++ b/Sprint-3/quote-generator/quotes.js
@@ -491,3 +491,21 @@ const quotes = [
];
// call pickFromArray with the quotes array to check you get a random quote
+
+const quoteElement = document.getElementById("quote");
+const authorElement = document.getElementById("author");
+
+function displayQuote() {
+ const randomQuote = pickFromArray(quotes);
+
+ quoteElement.textContent = randomQuote.quote;
+ authorElement.textContent = randomQuote.author;
+}
+
+// Show a quote when page loads
+displayQuote();
+
+// Change quote when button is clicked
+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..8d2dac628 100644
--- a/Sprint-3/quote-generator/style.css
+++ b/Sprint-3/quote-generator/style.css
@@ -1 +1,36 @@
/** Write your CSS in here **/
+body {
+ font-family: Arial, sans-serif;
+ text-align: center;
+ margin-top: 50px;
+ background-color: #f5f5f5;
+}
+
+h1 {
+ color: #333;
+}
+
+#quote {
+ font-size: 24px;
+ margin: 20px;
+ font-style: italic;
+}
+
+#author {
+ font-size: 18px;
+ color: #666;
+}
+
+button {
+ padding: 10px 20px;
+ font-size: 16px;
+ cursor: pointer;
+ border: none;
+ background-color: #333;
+ color: white;
+ border-radius: 5px;
+}
+
+button:hover {
+ background-color: #555;
+}
\ No newline at end of file