From 1a5069a946a48f91d95825ce90da27da19a14f30 Mon Sep 17 00:00:00 2001 From: marthak1 Date: Thu, 2 Apr 2026 00:49:52 +0100 Subject: [PATCH 1/6] update html file header title and add section for css styling --- Sprint-3/quote-generator/index.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 30b434bcf..1424678ac 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -3,13 +3,15 @@ - Title here + Quote generator app -

hello there

+

+
+ From ccc7e21cb646b870967f74aa518ee7a0fe791638 Mon Sep 17 00:00:00 2001 From: marthak1 Date: Thu, 2 Apr 2026 00:57:49 +0100 Subject: [PATCH 2/6] implement quote generator logic in js file --- Sprint-3/quote-generator/quotes.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 4a4d04b72..444756fbb 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -491,3 +491,19 @@ const quotes = [ ]; // call pickFromArray with the quotes array to check you get a random quote +const quoteEl = document.querySelector("#quote"); +const authorEl = document.querySelector("#author"); +const button = document.querySelector("#new-quote"); + +function displayQuote() { + const randomQuote = pickFromArray(quotes); + + quoteEl.textContent = randomQuote.quote; + authorEl.textContent = randomQuote.author; +} + +// Show initial quote on page load +displayQuote(); + +// Change quote when button is clicked +button.addEventListener("click", displayQuote); \ No newline at end of file From 1e10e5a7c3670a98896e19d2a50dfc772aa94156 Mon Sep 17 00:00:00 2001 From: marthak1 Date: Thu, 2 Apr 2026 01:15:53 +0100 Subject: [PATCH 3/6] update html to link css style and wrote foundation css --- Sprint-3/quote-generator/index.html | 6 +++++- Sprint-3/quote-generator/style.css | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 1424678ac..e811b162c 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -4,14 +4,18 @@ Quote generator app + -
+
+

+
+ diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 63cedf2d2..40062b6e9 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -1 +1,17 @@ /** Write your CSS in here **/ +*{ + box-sizing: border-box; +} +body{ + background-color: orange; +} +.quote{ + background-color: white; + text-align: center; + padding: 50px; + margin: 50px;; +} +button{ + position: absolute; + right: 120px; +} From 4c08293d1055be002dd25ed2d3c77f1875dfe66f Mon Sep 17 00:00:00 2001 From: marthak1 Date: Thu, 2 Apr 2026 01:22:04 +0100 Subject: [PATCH 4/6] update css styling --- Sprint-3/quote-generator/style.css | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 40062b6e9..1f6b650f6 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -9,9 +9,16 @@ body{ background-color: white; text-align: center; padding: 50px; - margin: 50px;; + margin: 50px; + color: orange; + font-size: larger; + } button{ position: absolute; right: 120px; + background-color: orange; + color: white; + border: orange; + padding: 8px; } From a854ec395df2a8f620e72b0083e4970b6320fdad Mon Sep 17 00:00:00 2001 From: marthak1 Date: Fri, 3 Apr 2026 13:19:54 +0100 Subject: [PATCH 5/6] changed html title using js queryselector --- Sprint-3/quote-generator/index.html | 2 +- Sprint-3/quote-generator/quotes.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index e811b162c..1bfc48484 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -3,7 +3,7 @@ - Quote generator app + Title here diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 444756fbb..3943828c4 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -489,7 +489,8 @@ const quotes = [ author: "Zig Ziglar", }, ]; - +const title = document.querySelector("title") +title.textContent = "Quote generator app"; // call pickFromArray with the quotes array to check you get a random quote const quoteEl = document.querySelector("#quote"); const authorEl = document.querySelector("#author"); From 2bd68b20c768c42c6804c21dc8c5b11cf6bbb4a9 Mon Sep 17 00:00:00 2001 From: marthak1 Date: Mon, 6 Apr 2026 02:10:28 +0100 Subject: [PATCH 6/6] update html title and and on page load code in a function --- Sprint-3/quote-generator/index.html | 4 +--- Sprint-3/quote-generator/quotes.js | 12 +++++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 1bfc48484..f9c5ed53a 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -3,7 +3,7 @@ - Title here + Quote generator app @@ -17,5 +17,3 @@
- - diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 3943828c4..b1c0f4632 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -489,8 +489,7 @@ const quotes = [ author: "Zig Ziglar", }, ]; -const title = document.querySelector("title") -title.textContent = "Quote generator app"; + // call pickFromArray with the quotes array to check you get a random quote const quoteEl = document.querySelector("#quote"); const authorEl = document.querySelector("#author"); @@ -504,7 +503,10 @@ function displayQuote() { } // Show initial quote on page load -displayQuote(); +function setup() { + displayQuote(); -// Change quote when button is clicked -button.addEventListener("click", displayQuote); \ No newline at end of file + // Change quote when button is clicked + button.addEventListener("click", displayQuote); +} +window.addEventListener("load", setup) \ No newline at end of file