From bc8ae2041aed02f62a2b764d30a8e12599b831a2 Mon Sep 17 00:00:00 2001 From: Pythia Date: Thu, 6 Nov 2025 13:04:01 +0100 Subject: [PATCH 01/68] Created file mean.js & test file mean.test.js and wrote code and tests as I was doing the preparation. --- .prettierrc | 2 +- prep/mean.js | 20 ++++++++++++++++++++ prep/mean.test.js | 6 ++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 prep/mean.js create mode 100644 prep/mean.test.js diff --git a/.prettierrc b/.prettierrc index 59bb3b44f..264aee094 100644 --- a/.prettierrc +++ b/.prettierrc @@ -12,7 +12,7 @@ "requirePragma": false, "semi": true, "singleQuote": false, - "tabWidth": 2, + "tabWidth": 4, "trailingComma": "es5", "useTabs": false, "vueIndentScriptAndStyle": false diff --git a/prep/mean.js b/prep/mean.js new file mode 100644 index 000000000..f9ec4bdae --- /dev/null +++ b/prep/mean.js @@ -0,0 +1,20 @@ +function calculateMean(list) { + let total = 0; + for (const item of list) { + total += item; + } +} + +function calculateMedian(list) { + const middleIndex = Math.floor(list.length / 2); + const median = list.splice(middleIndex, 1)[0]; + + return median; +} + +const list = [10, 20, 30]; +const copy = list; +copy.push(60, 70); + +console.log(list); +console.log(copy); diff --git a/prep/mean.test.js b/prep/mean.test.js new file mode 100644 index 000000000..7a057e17d --- /dev/null +++ b/prep/mean.test.js @@ -0,0 +1,6 @@ +test("calculates the median of a list of odd length", () => { + const list = [10, 20, 30, 50, 60]; + const currentOutput = calculateMedian(list); + const targetOutput = 30; + expect(currentOutput).toEqual(targetOutput); +}); From 5c7adf7b747e4dcf519f2a0a56e24bac48eb044f Mon Sep 17 00:00:00 2001 From: Pythia Date: Thu, 6 Nov 2025 13:33:46 +0100 Subject: [PATCH 02/68] Created files for exercises and their tests. Copied the code. --- prep/exercise-1.js | 14 ++++++++++++++ prep/exercise-1.test.js | 0 prep/exercise-2.js | 0 prep/exercise-2.test.js | 0 4 files changed, 14 insertions(+) create mode 100644 prep/exercise-1.js create mode 100644 prep/exercise-1.test.js create mode 100644 prep/exercise-2.js create mode 100644 prep/exercise-2.test.js diff --git a/prep/exercise-1.js b/prep/exercise-1.js new file mode 100644 index 000000000..975f735d6 --- /dev/null +++ b/prep/exercise-1.js @@ -0,0 +1,14 @@ +// Can you fix this code? +function doubleAllNumbers() { + let doubledNumbers; + + for (let n of numbers) { + doubledNumbers.push(n * 2); + } + + return doubledNumbers; +} + +const myNums = [10, 20, 30]; +doubleAllNumbers(myNums); +console.log(myNums); diff --git a/prep/exercise-1.test.js b/prep/exercise-1.test.js new file mode 100644 index 000000000..e69de29bb diff --git a/prep/exercise-2.js b/prep/exercise-2.js new file mode 100644 index 000000000..e69de29bb diff --git a/prep/exercise-2.test.js b/prep/exercise-2.test.js new file mode 100644 index 000000000..e69de29bb From c27dca3c7f53b7c9a51ac7613fc544def6da62b0 Mon Sep 17 00:00:00 2001 From: Pythia Date: Thu, 6 Nov 2025 13:34:31 +0100 Subject: [PATCH 03/68] Copied the code in exercise-2 file --- prep/exercise-2.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/prep/exercise-2.js b/prep/exercise-2.js index e69de29bb..37480e779 100644 --- a/prep/exercise-2.js +++ b/prep/exercise-2.js @@ -0,0 +1,8 @@ +// Write a function which takes an array as a parameter +// and swaps the first element with the last element + +function swapFirstAndLast(arr) {} + +const myArray = [5, 2, 3, 4, 1]; +swapFirstAndLast(myArray); +console.log(myArray); // what output should we expect? From d67bad2329f76c457e9b11f33aceba85f08c8043 Mon Sep 17 00:00:00 2001 From: Pythia Date: Thu, 6 Nov 2025 13:37:49 +0100 Subject: [PATCH 04/68] Defined the variable as an array --- prep/exercise-1.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prep/exercise-1.js b/prep/exercise-1.js index 975f735d6..2e7c8c920 100644 --- a/prep/exercise-1.js +++ b/prep/exercise-1.js @@ -1,6 +1,6 @@ // Can you fix this code? function doubleAllNumbers() { - let doubledNumbers; + let doubledNumbers = []; for (let n of numbers) { doubledNumbers.push(n * 2); From b610439a054ff06cccd488b3d6a60bd0c40683be Mon Sep 17 00:00:00 2001 From: Pythia Date: Thu, 6 Nov 2025 13:39:01 +0100 Subject: [PATCH 05/68] Made numbers the parameter --- prep/exercise-1.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prep/exercise-1.js b/prep/exercise-1.js index 2e7c8c920..d98b14566 100644 --- a/prep/exercise-1.js +++ b/prep/exercise-1.js @@ -1,5 +1,5 @@ // Can you fix this code? -function doubleAllNumbers() { +function doubleAllNumbers(numbers) { let doubledNumbers = []; for (let n of numbers) { From 67bc3d1ea9524f21127828f75a9ae26284b06684 Mon Sep 17 00:00:00 2001 From: Pythia Date: Thu, 6 Nov 2025 13:41:47 +0100 Subject: [PATCH 06/68] Tried to log the doubleAllNumbers (and failed) --- prep/exercise-1.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prep/exercise-1.js b/prep/exercise-1.js index d98b14566..e65575bfc 100644 --- a/prep/exercise-1.js +++ b/prep/exercise-1.js @@ -11,4 +11,4 @@ function doubleAllNumbers(numbers) { const myNums = [10, 20, 30]; doubleAllNumbers(myNums); -console.log(myNums); +console.log(doubleAllNumbers); From 98a84fca9d48a4276674424bc0504cae0dedb058 Mon Sep 17 00:00:00 2001 From: Pythia Date: Thu, 6 Nov 2025 13:43:58 +0100 Subject: [PATCH 07/68] Created a variable that i could log in the console --- prep/exercise-1.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prep/exercise-1.js b/prep/exercise-1.js index e65575bfc..be0bc25ea 100644 --- a/prep/exercise-1.js +++ b/prep/exercise-1.js @@ -10,5 +10,5 @@ function doubleAllNumbers(numbers) { } const myNums = [10, 20, 30]; -doubleAllNumbers(myNums); -console.log(doubleAllNumbers); +const double = doubleAllNumbers(myNums); +console.log(double); From 0d09f79a62373212482d6e0bce9599c34c8753ed Mon Sep 17 00:00:00 2001 From: Pythia Date: Thu, 6 Nov 2025 14:03:38 +0100 Subject: [PATCH 08/68] Wrote the function to swap first-last digits of array --- prep/exercise-2.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/prep/exercise-2.js b/prep/exercise-2.js index 37480e779..f86376857 100644 --- a/prep/exercise-2.js +++ b/prep/exercise-2.js @@ -1,7 +1,13 @@ // Write a function which takes an array as a parameter // and swaps the first element with the last element -function swapFirstAndLast(arr) {} +function swapFirstAndLast(arr) { + let arr = []; //Made arr an array + const first = arr[0]; //Indivates the first digit location of the array + const last = arr[arr.length - 1]; //Indicates the lst digit location of the array + arr[0] = last; //Because I can't reassign a new value to a const and we want the first position to hold the value of the last + arr[arr.length - 1] = first; +} const myArray = [5, 2, 3, 4, 1]; swapFirstAndLast(myArray); From 4a38ce95b7a9e2ea387638cc1ddab8634996cef2 Mon Sep 17 00:00:00 2001 From: Pythia Date: Thu, 6 Nov 2025 14:04:34 +0100 Subject: [PATCH 09/68] Deleted the arr[] as testing indicated it was already declared --- prep/exercise-2.js | 1 - 1 file changed, 1 deletion(-) diff --git a/prep/exercise-2.js b/prep/exercise-2.js index f86376857..fa228871a 100644 --- a/prep/exercise-2.js +++ b/prep/exercise-2.js @@ -2,7 +2,6 @@ // and swaps the first element with the last element function swapFirstAndLast(arr) { - let arr = []; //Made arr an array const first = arr[0]; //Indivates the first digit location of the array const last = arr[arr.length - 1]; //Indicates the lst digit location of the array arr[0] = last; //Because I can't reassign a new value to a const and we want the first position to hold the value of the last From 90d2e3711978bfa772da7a6f6eefb5be86ac75a5 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 11:28:03 +0100 Subject: [PATCH 10/68] Changed the title in html --- Sprint-3/quote-generator/index.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 30b434bcf..4e5d995c8 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -1,15 +1,15 @@ - - - - Title here - - - -

hello there

-

-

- - + + + + Quote generator app + + + +

hello there

+

+

+ + From 2a00029bc506c132f1697a85b5a88f29ed016ea3 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 11:50:01 +0100 Subject: [PATCH 11/68] Changed the header --- Sprint-3/quote-generator/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 4e5d995c8..812f8c7d3 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -7,7 +7,7 @@ -

hello there

+

Food for thought

From ce92cea5d32c80285f5e0c7912d09f03a83b7730 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 11:52:48 +0100 Subject: [PATCH 12/68] Celled pickFromArray --- Sprint-3/quote-generator/quotes.js | 876 ++++++++++++++--------------- 1 file changed, 410 insertions(+), 466 deletions(-) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 4a4d04b72..1ed1be873 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -17,477 +17,421 @@ // You don't need to change this function function pickFromArray(choices) { - return choices[Math.floor(Math.random() * choices.length)]; + return choices[Math.floor(Math.random() * choices.length)]; } // A list of quotes you can use in your app. // DO NOT modify this array, otherwise the tests may break! const quotes = [ - { - quote: "Life isn't about getting and having, it's about giving and being.", - author: "Kevin Kruse", - }, - { - quote: "Whatever the mind of man can conceive and believe, it can achieve.", - author: "Napoleon Hill", - }, - { - quote: "Strive not to be a success, but rather to be of value.", - author: "Albert Einstein", - }, - { - quote: - "Two roads diverged in a wood, and I—I took the one less traveled by, And that has made all the difference.", - author: "Robert Frost", - }, - { - quote: "I attribute my success to this: I never gave or took any excuse.", - author: "Florence Nightingale", - }, - { - quote: "You miss 100% of the shots you don't take.", - author: "Wayne Gretzky", - }, - { - quote: - "I've missed more than 9000 shots in my career. I've lost almost 300 games. 26 times I've been trusted to take the game winning shot and missed. I've failed over and over and over again in my life. And that is why I succeed.", - author: "Michael Jordan", - }, - { - quote: - "The most difficult thing is the decision to act, the rest is merely tenacity.", - author: "Amelia Earhart", - }, - { - quote: "Every strike brings me closer to the next home run.", - author: "Babe Ruth", - }, - { - quote: "Definiteness of purpose is the starting point of all achievement.", - author: "W. Clement Stone", - }, - { - quote: "We must balance conspicuous consumption with conscious capitalism.", - author: "Kevin Kruse", - }, - { - quote: "Life is what happens to you while you're busy making other plans.", - author: "John Lennon", - }, - { - quote: "We become what we think about.", - author: "Earl Nightingale", - }, - { - quote: - "Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do, so throw off the bowlines, sail away from safe harbor, catch the trade winds in your sails. Explore, Dream, Discover.", - author: "Mark Twain", - }, - { - quote: "Life is 10% what happens to me and 90% of how I react to it.", - author: "Charles Swindoll", - }, - { - quote: - "The most common way people give up their power is by thinking they don't have any.", - author: "Alice Walker", - }, - { - quote: "The mind is everything. What you think you become.", - author: "Buddha", - }, - { - quote: - "The best time to plant a tree was 20 years ago. The second best time is now.", - author: "Chinese Proverb", - }, - { - quote: "An unexamined life is not worth living.", - author: "Socrates", - }, - { - quote: "Eighty percent of success is showing up.", - author: "Woody Allen", - }, - { - quote: - "Your time is limited, so don't waste it living someone else's life.", - author: "Steve Jobs", - }, - { - quote: "Winning isn't everything, but wanting to win is.", - author: "Vince Lombardi", - }, - { - quote: - "I am not a product of my circumstances. I am a product of my decisions.", - author: "Stephen Covey", - }, - { - quote: - "Every child is an artist. The problem is how to remain an artist once he grows up.", - author: "Pablo Picasso", - }, - { - quote: - "You can never cross the ocean until you have the courage to lose sight of the shore.", - author: "Christopher Columbus", - }, - { - quote: - "I've learned that people will forget what you said, people will forget what you did, but people will never forget how you made them feel.", - author: "Maya Angelou", - }, - { - quote: "Either you run the day, or the day runs you.", - author: "Jim Rohn", - }, - { - quote: "Whether you think you can or you think you can't, you're right.", - author: "Henry Ford", - }, - { - quote: - "The two most important days in your life are the day you are born and the day you find out why.", - author: "Mark Twain", - }, - { - quote: - "Whatever you can do, or dream you can, begin it. Boldness has genius, power and magic in it.", - author: "Johann Wolfgang von Goethe", - }, - { - quote: "The best revenge is massive success.", - author: "Frank Sinatra", - }, - { - quote: - "People often say that motivation doesn't last. Well, neither does bathing. That's why we recommend it daily.", - author: "Zig Ziglar", - }, - { - quote: "Life shrinks or expands in proportion to one's courage.", - author: "Anais Nin", - }, - { - quote: - "If you hear a voice within you say “you cannot paint,” then by all means paint and that voice will be silenced.", - author: "Vincent Van Gogh", - }, - { - quote: - "There is only one way to avoid criticism: do nothing, say nothing, and be nothing.", - author: "Aristotle", - }, - { - quote: - "Ask and it will be given to you; search, and you will find; knock and the door will be opened for you.", - author: "Jesus", - }, - { - quote: - "The only person you are destined to become is the person you decide to be.", - author: "Ralph Waldo Emerson", - }, - { - quote: - "Go confidently in the direction of your dreams. Live the life you have imagined.", - author: "Henry David Thoreau", - }, - { - quote: - "When I stand before God at the end of my life, I would hope that I would not have a single bit of talent left and could say, I used everything you gave me.", - author: "Erma Bombeck", - }, - { - quote: - "Few things can help an individual more than to place responsibility on him, and to let him know that you trust him.", - author: "Booker T. Washington", - }, - { - quote: - "Certain things catch your eye, but pursue only those that capture the heart.", - author: " Ancient Indian Proverb", - }, - { - quote: "Believe you can and you're halfway there.", - author: "Theodore Roosevelt", - }, - { - quote: "Everything you've ever wanted is on the other side of fear.", - author: "George Addair", - }, - { - quote: - "We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light.", - author: "Plato", - }, - { - quote: - "Teach thy tongue to say, “I do not know,” and thous shalt progress.", - author: "Maimonides", - }, - { - quote: "Start where you are. Use what you have. Do what you can.", - author: "Arthur Ashe", - }, - { - quote: - "When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down ‘happy'. They told me I didn't understand the assignment, and I told them they didn't understand life.", - author: "John Lennon", - }, - { - quote: "Fall seven times and stand up eight.", - author: "Japanese Proverb", - }, - { - quote: - "When one door of happiness closes, another opens, but often we look so long at the closed door that we do not see the one that has been opened for us.", - author: "Helen Keller", - }, - { - quote: "Everything has beauty, but not everyone can see.", - author: "Confucius", - }, - { - quote: - "How wonderful it is that nobody need wait a single moment before starting to improve the world.", - author: "Anne Frank", - }, - { - quote: "When I let go of what I am, I become what I might be.", - author: "Lao Tzu", - }, - { - quote: - "Life is not measured by the number of breaths we take, but by the moments that take our breath away.", - author: "Maya Angelou", - }, - { - quote: - "Happiness is not something readymade. It comes from your own actions.", - author: "Dalai Lama", - }, - { - quote: - "If you're offered a seat on a rocket ship, don't ask what seat! Just get on.", - author: "Sheryl Sandberg", - }, - { - quote: - "First, have a definite, clear practical ideal; a goal, an objective. Second, have the necessary means to achieve your ends; wisdom, money, materials, and methods. Third, adjust all your means to that end.", - author: "Aristotle", - }, - { - quote: "If the wind will not serve, take to the oars.", - author: "Latin Proverb", - }, - { - quote: - "You can't fall if you don't climb. But there's no joy in living your whole life on the ground.", - author: "Unknown", - }, - { - quote: - "We must believe that we are gifted for something, and that this thing, at whatever cost, must be attained.", - author: "Marie Curie", - }, - { - quote: - "Too many of us are not living our dreams because we are living our fears.", - author: "Les Brown", - }, - { - quote: - "Challenges are what make life interesting and overcoming them is what makes life meaningful.", - author: "Joshua J. Marine", - }, - { - quote: "If you want to lift yourself up, lift up someone else.", - author: "Booker T. Washington", - }, - { - quote: - "I have been impressed with the urgency of doing. Knowing is not enough; we must apply. Being willing is not enough; we must do.", - author: "Leonardo da Vinci", - }, - { - quote: - "Limitations live only in our minds. But if we use our imaginations, our possibilities become limitless.", - author: "Jamie Paolinetti", - }, - { - quote: - "You take your life in your own hands, and what happens? A terrible thing, no one to blame.", - author: "Erica Jong", - }, - { - quote: - "What's money? A man is a success if he gets up in the morning and goes to bed at night and in between does what he wants to do.", - author: "Bob Dylan", - }, - { - quote: "I didn't fail the test. I just found 100 ways to do it wrong.", - author: "Benjamin Franklin", - }, - { - quote: - "In order to succeed, your desire for success should be greater than your fear of failure.", - author: "Bill Cosby", - }, - { - quote: "A person who never made a mistake never tried anything new.", - author: " Albert Einstein", - }, - { - quote: - "The person who says it cannot be done should not interrupt the person who is doing it.", - author: "Chinese Proverb", - }, - { - quote: "There are no traffic jams along the extra mile.", - author: "Roger Staubach", - }, - { - quote: "It is never too late to be what you might have been.", - author: "George Eliot", - }, - { - quote: "You become what you believe.", - author: "Oprah Winfrey", - }, - { - quote: "I would rather die of passion than of boredom.", - author: "Vincent van Gogh", - }, - { - quote: - "A truly rich man is one whose children run into his arms when his hands are empty.", - author: "Unknown", - }, - { - quote: - "It is not what you do for your children, but what you have taught them to do for themselves, that will make them successful human beings.", - author: "Ann Landers", - }, - { - quote: - "If you want your children to turn out well, spend twice as much time with them, and half as much money.", - author: "Abigail Van Buren", - }, - { - quote: - "Build your own dreams, or someone else will hire you to build theirs.", - author: "Farrah Gray", - }, - { - quote: - "The battles that count aren't the ones for gold medals. The struggles within yourself-the invisible battles inside all of us-that's where it's at.", - author: "Jesse Owens", - }, - { - quote: "Education costs money. But then so does ignorance.", - author: "Sir Claus Moser", - }, - { - quote: - "I have learned over the years that when one's mind is made up, this diminishes fear.", - author: "Rosa Parks", - }, - { - quote: "It does not matter how slowly you go as long as you do not stop.", - author: "Confucius", - }, - { - quote: - "If you look at what you have in life, you'll always have more. If you look at what you don't have in life, you'll never have enough.", - author: "Oprah Winfrey", - }, - { - quote: - "Remember that not getting what you want is sometimes a wonderful stroke of luck.", - author: "Dalai Lama", - }, - { - quote: "You can't use up creativity. The more you use, the more you have.", - author: "Maya Angelou", - }, - { - quote: "Dream big and dare to fail.", - author: "Norman Vaughan", - }, - { - quote: - "Our lives begin to end the day we become silent about things that matter.", - author: "Martin Luther King Jr.", - }, - { - quote: "Do what you can, where you are, with what you have.", - author: "Teddy Roosevelt", - }, - { - quote: - "If you do what you've always done, you'll get what you've always gotten.", - author: "Tony Robbins", - }, - { - quote: "Dreaming, after all, is a form of planning.", - author: "Gloria Steinem", - }, - { - quote: - "It's your place in the world; it's your life. Go on and do all you can with it, and make it the life you want to live.", - author: "Mae Jemison", - }, - { - quote: - "You may be disappointed if you fail, but you are doomed if you don't try.", - author: "Beverly Sills", - }, - { - quote: "Remember no one can make you feel inferior without your consent.", - author: "Eleanor Roosevelt", - }, - { - quote: "Life is what we make it, always has been, always will be.", - author: "Grandma Moses", - }, - { - quote: - "The question isn't who is going to let me; it's who is going to stop me.", - author: "Ayn Rand", - }, - { - quote: - "When everything seems to be going against you, remember that the airplane takes off against the wind, not with it.", - author: "Henry Ford", - }, - { - quote: - "It's not the years in your life that count. It's the life in your years.", - author: "Abraham Lincoln", - }, - { - quote: "Change your thoughts and you change your world.", - author: "Norman Vincent Peale", - }, - { - quote: - "Either write something worth reading or do something worth writing.", - author: "Benjamin Franklin", - }, - { - quote: "Nothing is impossible, the word itself says, “I'm possible!”", - author: "-Audrey Hepburn", - }, - { - quote: "The only way to do great work is to love what you do.", - author: "Steve Jobs", - }, - { - quote: "If you can dream it, you can achieve it.", - author: "Zig Ziglar", - }, + { + quote: "Life isn't about getting and having, it's about giving and being.", + author: "Kevin Kruse", + }, + { + quote: "Whatever the mind of man can conceive and believe, it can achieve.", + author: "Napoleon Hill", + }, + { + quote: "Strive not to be a success, but rather to be of value.", + author: "Albert Einstein", + }, + { + quote: "Two roads diverged in a wood, and I—I took the one less traveled by, And that has made all the difference.", + author: "Robert Frost", + }, + { + quote: "I attribute my success to this: I never gave or took any excuse.", + author: "Florence Nightingale", + }, + { + quote: "You miss 100% of the shots you don't take.", + author: "Wayne Gretzky", + }, + { + quote: "I've missed more than 9000 shots in my career. I've lost almost 300 games. 26 times I've been trusted to take the game winning shot and missed. I've failed over and over and over again in my life. And that is why I succeed.", + author: "Michael Jordan", + }, + { + quote: "The most difficult thing is the decision to act, the rest is merely tenacity.", + author: "Amelia Earhart", + }, + { + quote: "Every strike brings me closer to the next home run.", + author: "Babe Ruth", + }, + { + quote: "Definiteness of purpose is the starting point of all achievement.", + author: "W. Clement Stone", + }, + { + quote: "We must balance conspicuous consumption with conscious capitalism.", + author: "Kevin Kruse", + }, + { + quote: "Life is what happens to you while you're busy making other plans.", + author: "John Lennon", + }, + { + quote: "We become what we think about.", + author: "Earl Nightingale", + }, + { + quote: "Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do, so throw off the bowlines, sail away from safe harbor, catch the trade winds in your sails. Explore, Dream, Discover.", + author: "Mark Twain", + }, + { + quote: "Life is 10% what happens to me and 90% of how I react to it.", + author: "Charles Swindoll", + }, + { + quote: "The most common way people give up their power is by thinking they don't have any.", + author: "Alice Walker", + }, + { + quote: "The mind is everything. What you think you become.", + author: "Buddha", + }, + { + quote: "The best time to plant a tree was 20 years ago. The second best time is now.", + author: "Chinese Proverb", + }, + { + quote: "An unexamined life is not worth living.", + author: "Socrates", + }, + { + quote: "Eighty percent of success is showing up.", + author: "Woody Allen", + }, + { + quote: "Your time is limited, so don't waste it living someone else's life.", + author: "Steve Jobs", + }, + { + quote: "Winning isn't everything, but wanting to win is.", + author: "Vince Lombardi", + }, + { + quote: "I am not a product of my circumstances. I am a product of my decisions.", + author: "Stephen Covey", + }, + { + quote: "Every child is an artist. The problem is how to remain an artist once he grows up.", + author: "Pablo Picasso", + }, + { + quote: "You can never cross the ocean until you have the courage to lose sight of the shore.", + author: "Christopher Columbus", + }, + { + quote: "I've learned that people will forget what you said, people will forget what you did, but people will never forget how you made them feel.", + author: "Maya Angelou", + }, + { + quote: "Either you run the day, or the day runs you.", + author: "Jim Rohn", + }, + { + quote: "Whether you think you can or you think you can't, you're right.", + author: "Henry Ford", + }, + { + quote: "The two most important days in your life are the day you are born and the day you find out why.", + author: "Mark Twain", + }, + { + quote: "Whatever you can do, or dream you can, begin it. Boldness has genius, power and magic in it.", + author: "Johann Wolfgang von Goethe", + }, + { + quote: "The best revenge is massive success.", + author: "Frank Sinatra", + }, + { + quote: "People often say that motivation doesn't last. Well, neither does bathing. That's why we recommend it daily.", + author: "Zig Ziglar", + }, + { + quote: "Life shrinks or expands in proportion to one's courage.", + author: "Anais Nin", + }, + { + quote: "If you hear a voice within you say “you cannot paint,” then by all means paint and that voice will be silenced.", + author: "Vincent Van Gogh", + }, + { + quote: "There is only one way to avoid criticism: do nothing, say nothing, and be nothing.", + author: "Aristotle", + }, + { + quote: "Ask and it will be given to you; search, and you will find; knock and the door will be opened for you.", + author: "Jesus", + }, + { + quote: "The only person you are destined to become is the person you decide to be.", + author: "Ralph Waldo Emerson", + }, + { + quote: "Go confidently in the direction of your dreams. Live the life you have imagined.", + author: "Henry David Thoreau", + }, + { + quote: "When I stand before God at the end of my life, I would hope that I would not have a single bit of talent left and could say, I used everything you gave me.", + author: "Erma Bombeck", + }, + { + quote: "Few things can help an individual more than to place responsibility on him, and to let him know that you trust him.", + author: "Booker T. Washington", + }, + { + quote: "Certain things catch your eye, but pursue only those that capture the heart.", + author: " Ancient Indian Proverb", + }, + { + quote: "Believe you can and you're halfway there.", + author: "Theodore Roosevelt", + }, + { + quote: "Everything you've ever wanted is on the other side of fear.", + author: "George Addair", + }, + { + quote: "We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light.", + author: "Plato", + }, + { + quote: "Teach thy tongue to say, “I do not know,” and thous shalt progress.", + author: "Maimonides", + }, + { + quote: "Start where you are. Use what you have. Do what you can.", + author: "Arthur Ashe", + }, + { + quote: "When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down ‘happy'. They told me I didn't understand the assignment, and I told them they didn't understand life.", + author: "John Lennon", + }, + { + quote: "Fall seven times and stand up eight.", + author: "Japanese Proverb", + }, + { + quote: "When one door of happiness closes, another opens, but often we look so long at the closed door that we do not see the one that has been opened for us.", + author: "Helen Keller", + }, + { + quote: "Everything has beauty, but not everyone can see.", + author: "Confucius", + }, + { + quote: "How wonderful it is that nobody need wait a single moment before starting to improve the world.", + author: "Anne Frank", + }, + { + quote: "When I let go of what I am, I become what I might be.", + author: "Lao Tzu", + }, + { + quote: "Life is not measured by the number of breaths we take, but by the moments that take our breath away.", + author: "Maya Angelou", + }, + { + quote: "Happiness is not something readymade. It comes from your own actions.", + author: "Dalai Lama", + }, + { + quote: "If you're offered a seat on a rocket ship, don't ask what seat! Just get on.", + author: "Sheryl Sandberg", + }, + { + quote: "First, have a definite, clear practical ideal; a goal, an objective. Second, have the necessary means to achieve your ends; wisdom, money, materials, and methods. Third, adjust all your means to that end.", + author: "Aristotle", + }, + { + quote: "If the wind will not serve, take to the oars.", + author: "Latin Proverb", + }, + { + quote: "You can't fall if you don't climb. But there's no joy in living your whole life on the ground.", + author: "Unknown", + }, + { + quote: "We must believe that we are gifted for something, and that this thing, at whatever cost, must be attained.", + author: "Marie Curie", + }, + { + quote: "Too many of us are not living our dreams because we are living our fears.", + author: "Les Brown", + }, + { + quote: "Challenges are what make life interesting and overcoming them is what makes life meaningful.", + author: "Joshua J. Marine", + }, + { + quote: "If you want to lift yourself up, lift up someone else.", + author: "Booker T. Washington", + }, + { + quote: "I have been impressed with the urgency of doing. Knowing is not enough; we must apply. Being willing is not enough; we must do.", + author: "Leonardo da Vinci", + }, + { + quote: "Limitations live only in our minds. But if we use our imaginations, our possibilities become limitless.", + author: "Jamie Paolinetti", + }, + { + quote: "You take your life in your own hands, and what happens? A terrible thing, no one to blame.", + author: "Erica Jong", + }, + { + quote: "What's money? A man is a success if he gets up in the morning and goes to bed at night and in between does what he wants to do.", + author: "Bob Dylan", + }, + { + quote: "I didn't fail the test. I just found 100 ways to do it wrong.", + author: "Benjamin Franklin", + }, + { + quote: "In order to succeed, your desire for success should be greater than your fear of failure.", + author: "Bill Cosby", + }, + { + quote: "A person who never made a mistake never tried anything new.", + author: " Albert Einstein", + }, + { + quote: "The person who says it cannot be done should not interrupt the person who is doing it.", + author: "Chinese Proverb", + }, + { + quote: "There are no traffic jams along the extra mile.", + author: "Roger Staubach", + }, + { + quote: "It is never too late to be what you might have been.", + author: "George Eliot", + }, + { + quote: "You become what you believe.", + author: "Oprah Winfrey", + }, + { + quote: "I would rather die of passion than of boredom.", + author: "Vincent van Gogh", + }, + { + quote: "A truly rich man is one whose children run into his arms when his hands are empty.", + author: "Unknown", + }, + { + quote: "It is not what you do for your children, but what you have taught them to do for themselves, that will make them successful human beings.", + author: "Ann Landers", + }, + { + quote: "If you want your children to turn out well, spend twice as much time with them, and half as much money.", + author: "Abigail Van Buren", + }, + { + quote: "Build your own dreams, or someone else will hire you to build theirs.", + author: "Farrah Gray", + }, + { + quote: "The battles that count aren't the ones for gold medals. The struggles within yourself-the invisible battles inside all of us-that's where it's at.", + author: "Jesse Owens", + }, + { + quote: "Education costs money. But then so does ignorance.", + author: "Sir Claus Moser", + }, + { + quote: "I have learned over the years that when one's mind is made up, this diminishes fear.", + author: "Rosa Parks", + }, + { + quote: "It does not matter how slowly you go as long as you do not stop.", + author: "Confucius", + }, + { + quote: "If you look at what you have in life, you'll always have more. If you look at what you don't have in life, you'll never have enough.", + author: "Oprah Winfrey", + }, + { + quote: "Remember that not getting what you want is sometimes a wonderful stroke of luck.", + author: "Dalai Lama", + }, + { + quote: "You can't use up creativity. The more you use, the more you have.", + author: "Maya Angelou", + }, + { + quote: "Dream big and dare to fail.", + author: "Norman Vaughan", + }, + { + quote: "Our lives begin to end the day we become silent about things that matter.", + author: "Martin Luther King Jr.", + }, + { + quote: "Do what you can, where you are, with what you have.", + author: "Teddy Roosevelt", + }, + { + quote: "If you do what you've always done, you'll get what you've always gotten.", + author: "Tony Robbins", + }, + { + quote: "Dreaming, after all, is a form of planning.", + author: "Gloria Steinem", + }, + { + quote: "It's your place in the world; it's your life. Go on and do all you can with it, and make it the life you want to live.", + author: "Mae Jemison", + }, + { + quote: "You may be disappointed if you fail, but you are doomed if you don't try.", + author: "Beverly Sills", + }, + { + quote: "Remember no one can make you feel inferior without your consent.", + author: "Eleanor Roosevelt", + }, + { + quote: "Life is what we make it, always has been, always will be.", + author: "Grandma Moses", + }, + { + quote: "The question isn't who is going to let me; it's who is going to stop me.", + author: "Ayn Rand", + }, + { + quote: "When everything seems to be going against you, remember that the airplane takes off against the wind, not with it.", + author: "Henry Ford", + }, + { + quote: "It's not the years in your life that count. It's the life in your years.", + author: "Abraham Lincoln", + }, + { + quote: "Change your thoughts and you change your world.", + author: "Norman Vincent Peale", + }, + { + quote: "Either write something worth reading or do something worth writing.", + author: "Benjamin Franklin", + }, + { + quote: "Nothing is impossible, the word itself says, “I'm possible!”", + author: "-Audrey Hepburn", + }, + { + quote: "The only way to do great work is to love what you do.", + author: "Steve Jobs", + }, + { + quote: "If you can dream it, you can achieve it.", + author: "Zig Ziglar", + }, ]; // call pickFromArray with the quotes array to check you get a random quote +pickFromArray(quotes); From 6d2a073f3c5c26fc0b539c27a76073f09b8bc90f Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 12:02:08 +0100 Subject: [PATCH 13/68] Wrote the function and connected it with the elements of html --- Sprint-3/quote-generator/quotes.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 1ed1be873..843fbc87b 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -434,4 +434,12 @@ const quotes = [ ]; // call pickFromArray with the quotes array to check you get a random quote -pickFromArray(quotes); +function showQuotes() { + const randomQuote = pickFromArray(quotes); + document.getElementById("quote").innerText = randomQuote.quote; + document.getElementById("author").innerText = randomQuote.author; +} + +showQuotes(); + +document.getElementById("new-quote").addEventListener("click", showQuotes); From cd51b549cc2fced5074c58d171a8684fd1ff5aba Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 12:03:36 +0100 Subject: [PATCH 14/68] Added a "-" before the author display --- Sprint-3/quote-generator/quotes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 843fbc87b..c80c630f6 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -437,7 +437,7 @@ const quotes = [ function showQuotes() { const randomQuote = pickFromArray(quotes); document.getElementById("quote").innerText = randomQuote.quote; - document.getElementById("author").innerText = randomQuote.author; + document.getElementById("author").innerText = "-" + randomQuote.author; } showQuotes(); From a0d12fdc01d885fb66d42f66fbc501614c022aee Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 12:44:46 +0100 Subject: [PATCH 15/68] Added the css file link and created the container for css to use. Added my quote icon --- Sprint-3/quote-generator/index.html | 12 ++++++++---- Sprint-3/quote-generator/quotes.js | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 812f8c7d3..bc7ed4807 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -4,12 +4,16 @@ Quote generator app + -

Food for thought

-

-

- +
+ +

Food for thought

+

+

+ +
diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index c80c630f6..05dd83d7b 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -436,7 +436,7 @@ const quotes = [ // call pickFromArray with the quotes array to check you get a random quote function showQuotes() { const randomQuote = pickFromArray(quotes); - document.getElementById("quote").innerText = randomQuote.quote; + document.getElementById("quote").innerText = "randomQuote.quote; document.getElementById("author").innerText = "-" + randomQuote.author; } From aa62448affe209fef0d1268153ad3b92049ae513 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 12:52:18 +0100 Subject: [PATCH 16/68] Stylled the background mostly to see the display atm --- Sprint-3/quote-generator/style.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 63cedf2d2..4ba8b0f48 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -1 +1,9 @@ /** Write your CSS in here **/ +body { + background-color: burlywood; + font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif; + margin: 0; + display: flex; + justify-content: center; + align-items: center; +} From 353e7a914153cc702dfed964023b3fcebace6f96 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 12:54:38 +0100 Subject: [PATCH 17/68] Added the height --- Sprint-3/quote-generator/style.css | 1 + 1 file changed, 1 insertion(+) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 4ba8b0f48..f64f8e34c 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -2,6 +2,7 @@ body { background-color: burlywood; font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif; + height: auto; margin: 0; display: flex; justify-content: center; From d012f970beab5b213959d46e29a2ff45f2918223 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 12:55:28 +0100 Subject: [PATCH 18/68] Fixed typo --- Sprint-3/quote-generator/quotes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 05dd83d7b..e7c300bf5 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -436,7 +436,7 @@ const quotes = [ // call pickFromArray with the quotes array to check you get a random quote function showQuotes() { const randomQuote = pickFromArray(quotes); - document.getElementById("quote").innerText = "randomQuote.quote; + document.getElementById("quote").innerText = "randomQuote.quote"; document.getElementById("author").innerText = "-" + randomQuote.author; } From c8bb5f4f452befc113de4473fa18712d22e4c181 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 13:01:27 +0100 Subject: [PATCH 19/68] Fixed the typo, I will add an icon of double quotation in the css file instead --- Sprint-3/quote-generator/quotes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index e7c300bf5..c80c630f6 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -436,7 +436,7 @@ const quotes = [ // call pickFromArray with the quotes array to check you get a random quote function showQuotes() { const randomQuote = pickFromArray(quotes); - document.getElementById("quote").innerText = "randomQuote.quote"; + document.getElementById("quote").innerText = randomQuote.quote; document.getElementById("author").innerText = "-" + randomQuote.author; } From c181bccfb6a147278f46732657491b0aa84c9bbe Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 13:02:12 +0100 Subject: [PATCH 20/68] Testing the fonts --- Sprint-3/quote-generator/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index f64f8e34c..be5028622 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -1,7 +1,7 @@ /** Write your CSS in here **/ body { background-color: burlywood; - font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif; + font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; height: auto; margin: 0; display: flex; From a87c27bb95bd8701e384404da6c7ba4000b850a6 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 13:03:43 +0100 Subject: [PATCH 21/68] Testing fonts --- Sprint-3/quote-generator/style.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index be5028622..5e3a4f5c3 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -1,7 +1,8 @@ /** Write your CSS in here **/ body { background-color: burlywood; - font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; + font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", + sans-serif; height: auto; margin: 0; display: flex; From edec5f06c4a4985e2d00b972757b51b852a4dd2b Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 13:10:13 +0100 Subject: [PATCH 22/68] Coppied the embed code for my font --- Sprint-3/quote-generator/index.html | 6 ++++++ Sprint-3/quote-generator/style.css | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index bc7ed4807..9049eef7d 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -5,6 +5,12 @@ Quote generator app + + + diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 5e3a4f5c3..175a4d74c 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -1,8 +1,7 @@ /** Write your CSS in here **/ body { background-color: burlywood; - font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", - sans-serif; + font-family: height: auto; margin: 0; display: flex; From 160a8bd1412f52817265f0a80a68744a7c31f55c Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 13:15:58 +0100 Subject: [PATCH 23/68] Added a class to my quote to use the font from google fonts --- Sprint-3/quote-generator/index.html | 2 +- Sprint-3/quote-generator/style.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 9049eef7d..1255f4ceb 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -17,7 +17,7 @@

Food for thought

-

+

diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 175a4d74c..2233363fe 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -1,7 +1,7 @@ /** Write your CSS in here **/ body { background-color: burlywood; - font-family: + font-family: "Bad Script", cursive height: auto; margin: 0; display: flex; From 57d5d2a5ed551274a586fbe80f4e454e9e98edf7 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 13:18:23 +0100 Subject: [PATCH 24/68] Added class to the author for smaller letters --- Sprint-3/quote-generator/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 1255f4ceb..19f4bc371 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -18,7 +18,7 @@

Food for thought

-

+

From 2d3929597cb34d9b05502f101e73fed0e690027e Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 13:20:58 +0100 Subject: [PATCH 25/68] Font style testing --- Sprint-3/quote-generator/style.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 2233363fe..d2568dae1 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -8,3 +8,9 @@ body { justify-content: center; align-items: center; } + +.bad-script-regular { + font-family: "Bad Sript", cursive; + font-weight: 400; + font-style: normal; +} From 246e24fd677cdb923e9bded6f64f7cd9933754f0 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 13:21:21 +0100 Subject: [PATCH 26/68] Font testing --- Sprint-3/quote-generator/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index d2568dae1..95dddf876 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -12,5 +12,5 @@ body { .bad-script-regular { font-family: "Bad Sript", cursive; font-weight: 400; - font-style: normal; + font-style: italic; } From 0c2a9c761b93bf2a274763047d4721fe51a27818 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 13:22:58 +0100 Subject: [PATCH 27/68] Testing fonts --- Sprint-3/quote-generator/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 95dddf876..2594717d2 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -1,7 +1,7 @@ /** Write your CSS in here **/ body { background-color: burlywood; - font-family: "Bad Script", cursive + font-family: "Bad Script"; height: auto; margin: 0; display: flex; @@ -10,7 +10,7 @@ body { } .bad-script-regular { - font-family: "Bad Sript", cursive; + font-family: "Bad Sript"; font-weight: 400; font-style: italic; } From c8def17c240ab010f57582fdd43b2c5d47170532 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 13:25:04 +0100 Subject: [PATCH 28/68] Authors font style --- Sprint-3/quote-generator/style.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 2594717d2..ae8251967 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -14,3 +14,10 @@ body { font-weight: 400; font-style: italic; } + +.bad-script-small { + font-family: "Bad Script"; + font-size: 1em; + font-weight: 400; + font-style: italic; +} From 61b875701767d034eced041ac1d9b35c15716475 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 13:26:43 +0100 Subject: [PATCH 29/68] Testing size of font --- Sprint-3/quote-generator/style.css | 1 + 1 file changed, 1 insertion(+) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index ae8251967..788dbe15e 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -11,6 +11,7 @@ body { .bad-script-regular { font-family: "Bad Sript"; + font-size: 3m; font-weight: 400; font-style: italic; } From c41679b5408174b4b85d918b9ce413b4be73caae Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 13:30:54 +0100 Subject: [PATCH 30/68] Fixed typo --- Sprint-3/quote-generator/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 788dbe15e..236c314f8 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -10,7 +10,7 @@ body { } .bad-script-regular { - font-family: "Bad Sript"; + font-family: "Bad Script"; font-size: 3m; font-weight: 400; font-style: italic; From c507e8ee0a3b11bc584364204457d81305ba964c Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 13:33:27 +0100 Subject: [PATCH 31/68] Fixed typos --- Sprint-3/quote-generator/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 236c314f8..68887cea0 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -11,7 +11,7 @@ body { .bad-script-regular { font-family: "Bad Script"; - font-size: 3m; + font-size: 3em; font-weight: 400; font-style: italic; } From bf9aeee38ef0efd2d5dd27728bca3464f6df5937 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 13:35:55 +0100 Subject: [PATCH 32/68] Identation and moved header over the icon --- Sprint-3/quote-generator/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 19f4bc371..22622163e 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -15,8 +15,8 @@
-

Food for thought

+

From 6574fc237f4d75913377ed51ae003d62245ec7c5 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 13:39:15 +0100 Subject: [PATCH 33/68] Testing the icon --- 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 68887cea0..90a51a7c6 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -11,7 +11,7 @@ body { .bad-script-regular { font-family: "Bad Script"; - font-size: 3em; + font-size: 2.5em; font-weight: 400; font-style: italic; } @@ -22,3 +22,10 @@ body { font-weight: 400; font-style: italic; } + +.quote-icon { + font-size: 2.5em; + color: brown; + vertical-align: middle; + margin-right: 0.2em; +} From 7ba7f0326b461f6d7b44476a00a5bd8fe8632754 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 13:40:50 +0100 Subject: [PATCH 34/68] Color test --- Sprint-3/quote-generator/style.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 90a51a7c6..7d2f542b4 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -2,6 +2,7 @@ body { background-color: burlywood; font-family: "Bad Script"; + color: darkolivegreen; height: auto; margin: 0; display: flex; @@ -11,6 +12,7 @@ body { .bad-script-regular { font-family: "Bad Script"; + color: darkolivegreen; font-size: 2.5em; font-weight: 400; font-style: italic; @@ -18,6 +20,7 @@ body { .bad-script-small { font-family: "Bad Script"; + color: darkolivegreen; font-size: 1em; font-weight: 400; font-style: italic; From e0deddaeb22ff2311dd97a03fc522e03985a1e15 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 13:41:23 +0100 Subject: [PATCH 35/68] Color --- Sprint-3/quote-generator/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 7d2f542b4..a5d574ca2 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -12,7 +12,7 @@ body { .bad-script-regular { font-family: "Bad Script"; - color: darkolivegreen; + color: brown; font-size: 2.5em; font-weight: 400; font-style: italic; From 6616c145262615bd245874aaa897d2e5f0271fd9 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 13:44:16 +0100 Subject: [PATCH 36/68] Moved the icon to display with quote --- Sprint-3/quote-generator/index.html | 2 +- Sprint-3/quote-generator/style.css | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 22622163e..4e0b1c638 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -16,8 +16,8 @@

Food for thought

-

+

diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index a5d574ca2..6e6ad639c 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -31,4 +31,5 @@ body { color: brown; vertical-align: middle; margin-right: 0.2em; + font-style: italic; } From f2a33409fe62abc3f28b4dd0c5283511b1712c89 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 13:46:19 +0100 Subject: [PATCH 37/68] Try to display the quotation --- Sprint-3/quote-generator/index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 4e0b1c638..c5cff0c92 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -16,8 +16,9 @@

Food for thought

-

- +

+ +

From 04b1884397e6ae10860064852138d7fcb1bd071c Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 14:14:01 +0100 Subject: [PATCH 38/68] Fixed the js file to properly dispay the double quotation in the beggining of the quote --- Sprint-3/quote-generator/quotes.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index c80c630f6..9f3d8418f 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -436,7 +436,8 @@ const quotes = [ // call pickFromArray with the quotes array to check you get a random quote function showQuotes() { const randomQuote = pickFromArray(quotes); - document.getElementById("quote").innerText = randomQuote.quote; + document.getElementById("quote").innerHTML = + + randomQuote.quote; document.getElementById("author").innerText = "-" + randomQuote.author; } From 4c009b46b82822730ec54641a3a5d9c911e5e97f Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 14:18:25 +0100 Subject: [PATCH 39/68] Fixed typo --- Sprint-3/quote-generator/quotes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 9f3d8418f..4ab9d12aa 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -437,7 +437,7 @@ const quotes = [ function showQuotes() { const randomQuote = pickFromArray(quotes); document.getElementById("quote").innerHTML = - + randomQuote.quote; + "" + randomQuote.quote; document.getElementById("author").innerText = "-" + randomQuote.author; } From db08a89e130a0eb06e5d041567e1fa7b7640c44c Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 14:22:19 +0100 Subject: [PATCH 40/68] Fixed typo --- Sprint-3/quote-generator/quotes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 4ab9d12aa..e0425b45d 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -437,7 +437,7 @@ const quotes = [ function showQuotes() { const randomQuote = pickFromArray(quotes); document.getElementById("quote").innerHTML = - "" + randomQuote.quote; + '' + randomQuote.quote; document.getElementById("author").innerText = "-" + randomQuote.author; } From f27aff9a7595561257cfb45960ceb1713feb8a59 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 14:24:37 +0100 Subject: [PATCH 41/68] Adjusted size of quotation mark --- Sprint-3/quote-generator/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 6e6ad639c..179212da5 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -27,7 +27,7 @@ body { } .quote-icon { - font-size: 2.5em; + font-size: 1.5em; color: brown; vertical-align: middle; margin-right: 0.2em; From b09bbcb67da672411ef4f357adee299cbe4dc5fb Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 14:33:52 +0100 Subject: [PATCH 42/68] Color of container and container style --- Sprint-3/quote-generator/style.css | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 179212da5..4dd2ac10d 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -1,6 +1,6 @@ /** Write your CSS in here **/ body { - background-color: burlywood; + background-color: brown; font-family: "Bad Script"; color: darkolivegreen; height: auto; @@ -33,3 +33,13 @@ body { margin-right: 0.2em; font-style: italic; } + +.container { + background-color: burlywood; + padding: 48px, 32px, 32px, 32px; + text-align: center; + border-radius: 16px; + box-shadow: 0 6px 24px rgba(60, 40, 20, 0.1); + min-width: 400px; + max-width: 90vw; +} From c3c79f762d40f0a4f8e11745424f0596fe5e3cc9 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 14:47:39 +0100 Subject: [PATCH 43/68] Aligned the box to avoid scrolling --- Sprint-3/quote-generator/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 4dd2ac10d..3ef2aae1b 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -3,7 +3,7 @@ body { background-color: brown; font-family: "Bad Script"; color: darkolivegreen; - height: auto; + height: 100vh; margin: 0; display: flex; justify-content: center; @@ -36,7 +36,7 @@ body { .container { background-color: burlywood; - padding: 48px, 32px, 32px, 32px; + padding: 48px 32px 32px 32px; text-align: center; border-radius: 16px; box-shadow: 0 6px 24px rgba(60, 40, 20, 0.1); From 49f6c62e864198a7f4c50dc4ffc08d17ea4af4a5 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 14:58:25 +0100 Subject: [PATCH 44/68] Trying to align the button --- Sprint-3/quote-generator/style.css | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 3ef2aae1b..712fa57d6 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -43,3 +43,14 @@ body { min-width: 400px; max-width: 90vw; } + +#new-quote { + background-color: brown; + color: burlywood; + font-family: serif; + font-size: 1.5em; + text-align: center; + border-radius: 16px; + box-shadow: 0 6px 24px rgba(60, 40, 20, 0.1); + margin-left: 300px; +} From 09b014bb03f0b17b6663759238b01e84862ca522 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 15:00:41 +0100 Subject: [PATCH 45/68] Floated the button right --- Sprint-3/quote-generator/style.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 712fa57d6..2de692e58 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -48,9 +48,10 @@ body { background-color: brown; color: burlywood; font-family: serif; - font-size: 1.5em; + font-size: 1.2em; text-align: center; border-radius: 16px; box-shadow: 0 6px 24px rgba(60, 40, 20, 0.1); margin-left: 300px; + float: right; } From 48ef082dc485b105b8dd238de28086405c46789a Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 15:06:16 +0100 Subject: [PATCH 46/68] Distance between author and text and button fixed --- Sprint-3/quote-generator/style.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 2de692e58..32c9a0fb4 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -21,9 +21,11 @@ body { .bad-script-small { font-family: "Bad Script"; color: darkolivegreen; - font-size: 1em; + font-size: 1.8em; font-weight: 400; font-style: italic; + text-align: right; + margin-top: -50px; } .quote-icon { From acb5253e1e9f805e406862e6b54ab03a2c08487a Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 15:07:30 +0100 Subject: [PATCH 47/68] Shadow testing --- Sprint-3/quote-generator/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 32c9a0fb4..83fb782d0 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -41,7 +41,7 @@ body { padding: 48px 32px 32px 32px; text-align: center; border-radius: 16px; - box-shadow: 0 6px 24px rgba(60, 40, 20, 0.1); + box-shadow: 0 36px 24px rgba(60, 40, 20, 0.1); min-width: 400px; max-width: 90vw; } From 253a01a9a84bd53d218c5ce1ae57877e7bc624d1 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 15:08:53 +0100 Subject: [PATCH 48/68] Font testing in button --- Sprint-3/quote-generator/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 83fb782d0..f25d4d6c3 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -49,7 +49,7 @@ body { #new-quote { background-color: brown; color: burlywood; - font-family: serif; + font-family: "Bad Script"; font-size: 1.2em; text-align: center; border-radius: 16px; From 6a28e6b734e14796814f41c69a38a649090eb6d4 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 15:14:09 +0100 Subject: [PATCH 49/68] Testing the header --- Sprint-3/quote-generator/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index c5cff0c92..093b28428 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -15,7 +15,7 @@
-

Food for thought

+

~ Food for thought ~

From d1e4c62333c09ecbe80c8c43ab64c7a985f07b38 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 15:22:36 +0100 Subject: [PATCH 50/68] Added auto generate button --- Sprint-3/quote-generator/index.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 093b28428..e3169a0c4 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -21,6 +21,10 @@

~ Food for thought ~

+
From 500371a0d45b1f7befd825cc797d1ae3726908b6 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 15:34:56 +0100 Subject: [PATCH 51/68] Possitioned the toggle button --- Sprint-3/quote-generator/style.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index f25d4d6c3..b944f87cc 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -8,6 +8,7 @@ body { display: flex; justify-content: center; align-items: center; + position: relative; } .bad-script-regular { @@ -57,3 +58,15 @@ body { margin-left: 300px; float: right; } + +.toggle-switch { + font-size: 1.2em; + display: flex; + align-items: center; + gap: 0.5em; + margin-top: 20px; + position: absolute; + bottom: 20px; + left: 20px; + cursor: pointer; +} From 47b69c12b2a144d67936d6fa68d23066de58f9f3 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 15:37:44 +0100 Subject: [PATCH 52/68] POssitioned the button in the left corner of container not body --- Sprint-3/quote-generator/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index b944f87cc..d7a3ade24 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -8,7 +8,6 @@ body { display: flex; justify-content: center; align-items: center; - position: relative; } .bad-script-regular { @@ -45,6 +44,7 @@ body { box-shadow: 0 36px 24px rgba(60, 40, 20, 0.1); min-width: 400px; max-width: 90vw; + position: relative; } #new-quote { From 1f6611851e8bb63b6e3adb9a6a897f4b54d5e443 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 15:42:47 +0100 Subject: [PATCH 53/68] Added the auto status in html --- Sprint-3/quote-generator/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index e3169a0c4..dde4ea4db 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -25,6 +25,7 @@

~ Food for thought ~

Auto generate quotes +

From 419f9ec2f1aea3ab12619d32359f125602e0df0b Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 15:49:27 +0100 Subject: [PATCH 54/68] Created the on off in css --- Sprint-3/quote-generator/style.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index d7a3ade24..88e95320b 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -70,3 +70,13 @@ body { left: 20px; cursor: pointer; } + +.auto-status { + font-size: 1.2em; + font-style: italic; + color: darkolivegreen; + margin: 0; + position: absolute; + bottom: 40px; + left: 20px; +} From 1afd29b9a01b5df7c23510259aebb5cb43748eae Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 16:14:48 +0100 Subject: [PATCH 55/68] Wrote the function for the toggle button --- Sprint-3/quote-generator/quotes.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index e0425b45d..c8938a4ee 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -444,3 +444,31 @@ function showQuotes() { showQuotes(); document.getElementById("new-quote").addEventListener("click", showQuotes); + +let autoInterval = null; +function setAutoStatus(on) { + // Update the status text + const status = document.getElementById("auto-status"); + if (status === on) { + return "Auto-play: ON"; + } + return ""; +} + +function handleAutoToggle() { + const autoToggle = document.getElementById("auto-toggle"); + if (autoToggle.checked) { + showQuotes(); // To show a quote directly when turned on + setAutoStatus(true); + autoInterval = setInterval(showQuotes, 5000); + } else { + clearInterval(autoInterval); + autoInterval = null; + setAutoStatus(false); + } +} + +document + .getElementById("auto-toggle") + .addEventListener("change", handleAutoToggle); +setAutoStatus(false); From 2efa6f44e004a541eb97638d845e8fa0385e1daf Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 16:17:55 +0100 Subject: [PATCH 56/68] try to show the text when button is on --- Sprint-3/quote-generator/quotes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index c8938a4ee..47568b0bf 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -449,7 +449,7 @@ let autoInterval = null; function setAutoStatus(on) { // Update the status text const status = document.getElementById("auto-status"); - if (status === on) { + if (status.innerText === on) { return "Auto-play: ON"; } return ""; From 795bb7912783fe7f297558db4a35cefe375f8f59 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 16:21:39 +0100 Subject: [PATCH 57/68] Trying with different methods --- Sprint-3/quote-generator/quotes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 47568b0bf..c7cfff46c 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -449,7 +449,7 @@ let autoInterval = null; function setAutoStatus(on) { // Update the status text const status = document.getElementById("auto-status"); - if (status.innerText === on) { + if (status.textContent === on) { return "Auto-play: ON"; } return ""; From 0bdf8360aff7c50b09f90f36d71424ea7d41d427 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 16:25:55 +0100 Subject: [PATCH 58/68] Corrected the button function --- Sprint-3/quote-generator/quotes.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index c7cfff46c..bd01d1b46 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -449,10 +449,11 @@ let autoInterval = null; function setAutoStatus(on) { // Update the status text const status = document.getElementById("auto-status"); - if (status.textContent === on) { - return "Auto-play: ON"; + if (on) { + status.textContent = "Auto-play: ON"; + } else { + status.textContent = ""; } - return ""; } function handleAutoToggle() { From 88bb39ab43f57ec7bb00b5982c04443f5b798730 Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 16:56:01 +0100 Subject: [PATCH 59/68] Trying to display different message when toggle button is on --- Sprint-3/quote-generator/index.html | 2 +- Sprint-3/quote-generator/quotes.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index dde4ea4db..45058d570 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -21,11 +21,11 @@

~ Food for thought ~

+

-

diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index bd01d1b46..b55437c88 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -452,7 +452,7 @@ function setAutoStatus(on) { if (on) { status.textContent = "Auto-play: ON"; } else { - status.textContent = ""; + status.textContent = "Auto generate quotes"; } } From ffaf9939c1da07fe92d65b0bff7a15113a0404ba Mon Sep 17 00:00:00 2001 From: Pythia Date: Sat, 22 Nov 2025 17:07:24 +0100 Subject: [PATCH 60/68] trying to aligh text and checkbox and also replace the text display dependinf weather the box is checked or not --- Sprint-3/quote-generator/index.html | 7 +++---- Sprint-3/quote-generator/style.css | 10 ++-------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 45058d570..1af40034d 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -21,11 +21,10 @@

~ Food for thought ~

-

-