From f35d6671b7253e3fa9eedefc9d1786fefc4a7330 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 17 Mar 2026 12:32:48 +0000 Subject: [PATCH 1/5] page is functunal --- .../quote-generator/QuoteGeneratorApp.html | 16 ++++++++++++++++ Sprint-3/quote-generator/quotes.js | 18 +++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 Sprint-3/quote-generator/QuoteGeneratorApp.html diff --git a/Sprint-3/quote-generator/QuoteGeneratorApp.html b/Sprint-3/quote-generator/QuoteGeneratorApp.html new file mode 100644 index 000000000..79adcdc82 --- /dev/null +++ b/Sprint-3/quote-generator/QuoteGeneratorApp.html @@ -0,0 +1,16 @@ + + + + + + Title here + + + +

hello there

+ +

+

+ + + diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 4a4d04b72..d6a3a7364 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -1,3 +1,19 @@ +const botton = document + .getElementById("new-quote") + .addEventListener("click", pickNewQuoteToDisplay); + +function pickNewQuoteToDisplay(quote) { + //gets the quote object and brakes it down to the key and value + let quoteAndAuther = pickFromArray(quotes); + let quoteForDisplay = quoteAndAuther.quote; + let authorForDisplay = quoteAndAuther.author; + // prints the values to the page + document.getElementById("quote").innerHTML = quoteForDisplay; + document.getElementById("author").innerHTML = authorForDisplay; +} + +//function randomQuote() + // DO NOT EDIT BELOW HERE // pickFromArray is a function which will return one item, at @@ -490,4 +506,4 @@ const quotes = [ }, ]; -// call pickFromArray with the quotes array to check you get a random quote +console.log(pickFromArray(quotes)); From 759e4106034a11b76e3e34d0072ecb7ed12ba364 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 17 Mar 2026 14:36:03 +0000 Subject: [PATCH 2/5] styleing done --- .../quote-generator/QuoteGeneratorApp.html | 14 +++++--- Sprint-3/quote-generator/quotes.js | 4 +-- Sprint-3/quote-generator/style.css | 35 ++++++++++++++++++- 3 files changed, 45 insertions(+), 8 deletions(-) diff --git a/Sprint-3/quote-generator/QuoteGeneratorApp.html b/Sprint-3/quote-generator/QuoteGeneratorApp.html index 79adcdc82..3d287f95c 100644 --- a/Sprint-3/quote-generator/QuoteGeneratorApp.html +++ b/Sprint-3/quote-generator/QuoteGeneratorApp.html @@ -3,14 +3,18 @@ - Title here + + Quote of the day page + -

hello there

+

quote for today

+
+

+

-

-

- + +
diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index d6a3a7364..721b435c2 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -8,8 +8,8 @@ function pickNewQuoteToDisplay(quote) { let quoteForDisplay = quoteAndAuther.quote; let authorForDisplay = quoteAndAuther.author; // prints the values to the page - document.getElementById("quote").innerHTML = quoteForDisplay; - document.getElementById("author").innerHTML = authorForDisplay; + document.getElementById("quote").innerHTML = "'" + quoteForDisplay + "'"; + document.getElementById("author").innerHTML = ":-" + authorForDisplay; } //function randomQuote() diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 63cedf2d2..666c10dc8 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -1 +1,34 @@ -/** Write your CSS in here **/ +h1{font-size: 0;} +body { + background-color: rgb(2, 185, 176); +} +.contaner { + height: 300px; + display: grid; + grid-template-columns: 20% 20% 20% 20% 20%; + grid-template-rows: 25% 25% 25% 25% + margin: 10%; + padding: 20px; + background-color: rgb(8, 248, 232); +} +.contaner div { + text-shadow: 4px; + padding: 10px; +} +.item1 { + font-size: 40px; + grid-row: 1/5; + grid-column: 1 / 5; +} +.item2 { + font-size: 20px; + grid-row: 3/4; + grid-column: 5/6; +} +.item3{ + border-radius: 40px; + font-size: 15px; + grid-row: 4/5; + grid-column: 5 / 6; + +} From 3d6439bcd551cad172d5d5946b2678027d05b59c Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 17 Mar 2026 14:39:01 +0000 Subject: [PATCH 3/5] 1 error fixed --- Sprint-3/quote-generator/style.css | 39 +++++++++++++++--------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 666c10dc8..bf0caea54 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -1,34 +1,33 @@ -h1{font-size: 0;} +h1 { + font-size: 0; +} body { background-color: rgb(2, 185, 176); } .contaner { - height: 300px; - display: grid; - grid-template-columns: 20% 20% 20% 20% 20%; - grid-template-rows: 25% 25% 25% 25% - margin: 10%; - padding: 20px; - background-color: rgb(8, 248, 232); + height: 300px; + display: grid; + grid-template-columns: 20% 20% 20% 20% 20%; + grid-template-rows: 25% 25% 25% 25%; + background-color: rgb(8, 248, 232); } .contaner div { text-shadow: 4px; padding: 10px; } .item1 { - font-size: 40px; - grid-row: 1/5; - grid-column: 1 / 5; + font-size: 40px; + grid-row: 1/5; + grid-column: 1 / 5; } .item2 { - font-size: 20px; - grid-row: 3/4; - grid-column: 5/6; + font-size: 20px; + grid-row: 3/4; + grid-column: 5/6; } -.item3{ - border-radius: 40px; - font-size: 15px; - grid-row: 4/5; - grid-column: 5 / 6; - +.item3 { + border-radius: 40px; + font-size: 15px; + grid-row: 4/5; + grid-column: 5 / 6; } From 9e566d8e5de7aec5c2014f3e59a4941c5de0f67a Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 26 Mar 2026 13:08:49 +0000 Subject: [PATCH 4/5] review changes --- Sprint-3/quote-generator/quotes.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 721b435c2..4a25ea2c8 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -1,19 +1,17 @@ -const botton = document +document .getElementById("new-quote") .addEventListener("click", pickNewQuoteToDisplay); -function pickNewQuoteToDisplay(quote) { +function pickNewQuoteToDisplay() { //gets the quote object and brakes it down to the key and value - let quoteAndAuther = pickFromArray(quotes); - let quoteForDisplay = quoteAndAuther.quote; - let authorForDisplay = quoteAndAuther.author; + const quoteAndAuther = pickFromArray(quotes); + const quoteForDisplay = quoteAndAuther.quote; + const authorForDisplay = quoteAndAuther.author; // prints the values to the page document.getElementById("quote").innerHTML = "'" + quoteForDisplay + "'"; document.getElementById("author").innerHTML = ":-" + authorForDisplay; } -//function randomQuote() - // DO NOT EDIT BELOW HERE // pickFromArray is a function which will return one item, at @@ -505,5 +503,3 @@ const quotes = [ author: "Zig Ziglar", }, ]; - -console.log(pickFromArray(quotes)); From a239697d32369a3f0fb8aa1c37e678f6583f7ae9 Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 26 Mar 2026 14:42:26 +0000 Subject: [PATCH 5/5] better with the setUp --- Sprint-3/quote-generator/QuoteGeneratorApp.html | 2 +- Sprint-3/quote-generator/quotes.js | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Sprint-3/quote-generator/QuoteGeneratorApp.html b/Sprint-3/quote-generator/QuoteGeneratorApp.html index 3d287f95c..0b4fe0b0c 100644 --- a/Sprint-3/quote-generator/QuoteGeneratorApp.html +++ b/Sprint-3/quote-generator/QuoteGeneratorApp.html @@ -8,7 +8,7 @@ - +

quote for today

diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 4a25ea2c8..f11c826c5 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -1,6 +1,11 @@ -document - .getElementById("new-quote") - .addEventListener("click", pickNewQuoteToDisplay); +function setUp() { + document + .getElementById("new-quote") + .addEventListener("click", pickNewQuoteToDisplay); + pickNewQuoteToDisplay(); +} + +window.addEventListener("load", setUp); function pickNewQuoteToDisplay() { //gets the quote object and brakes it down to the key and value