From 3489fe300b552953109a35040e7cf1d91277c4bf Mon Sep 17 00:00:00 2001 From: Waleed Yahya Date: Thu, 31 Jul 2025 02:37:11 +0100 Subject: [PATCH 1/6] changed the title to Quote Generator App --- 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 30b434bcf..0cf139636 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -3,7 +3,7 @@ - Title here + Quote Generator App From 4d5ffa48718818827373f5c127e40e2259952444 Mon Sep 17 00:00:00 2001 From: Waleed Yahya Date: Thu, 31 Jul 2025 02:50:59 +0100 Subject: [PATCH 2/6] changed html code added CSS file linck. --- Sprint-3/quote-generator/index.html | 37 +++++++++++++++++++---------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 0cf139636..90689a7d8 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -1,15 +1,28 @@ - - - - Quote Generator App - - - -

hello there

-

-

- - + + + + Quote Generator App + + + + + + + + +
+

Quote Generator

+ +
+

+

+
+ + +
+ From 78b12d49ae22f4547e5e05d4190e35c0982920c8 Mon Sep 17 00:00:00 2001 From: Waleed Yahya Date: Thu, 31 Jul 2025 02:56:24 +0100 Subject: [PATCH 3/6] created a function to get rndom quote, and a function to display quote with the author. --- Sprint-3/quote-generator/quotes.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 4a4d04b72..2b96ef639 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -491,3 +491,24 @@ const quotes = [ ]; // call pickFromArray with the quotes array to check you get a random quote +function getRandomQuote() { + const index = Math.floor(Math.random() * quotes.length); + return quotes[index]; +} +function displayQuote(quoteObj) { + const quoteElement = document.getElementById("quote"); + const authorElement = document.getElementById("author"); + + quoteElement.innerText = quoteObj.quote; + authorElement.innerText = quoteObj.author; +} +window.addEventListener("DOMContentLoaded", () => { + const newQuoteBtn = document.getElementById("new-quote"); + + // Show initial quote + displayQuote(getRandomQuote()); + // Show a new quote when the button is clicked + newQuoteBtn.addEventListener("click", () => { + displayQuote(getRandomQuote()); + }); +}); \ No newline at end of file From 1da5a133665d902ea7fefe3790c9d943042f3c51 Mon Sep 17 00:00:00 2001 From: Waleed Yahya Date: Thu, 31 Jul 2025 03:05:55 +0100 Subject: [PATCH 4/6] edited the CSS file code --- Sprint-3/quote-generator/style.css | 68 ++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 63cedf2d2..0a8b8f216 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -1 +1,69 @@ /** Write your CSS in here **/ +* { + margin: 2px; + padding: 2px; + box-sizing: border-box; +} + +body.centre { + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + background: linear-gradient(to right, #1644da, #e2e2e2); + min-height: 100vh; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 2rem; +} + +/* Heading */ +h1 { + margin-bottom: 2rem; + color: #2c3e50; +} + +/* Quote Box */ +#quote-box { + background: linear-gradient(135deg, #2980b9, #6dd5fa); + color: white; + border-radius: 15px; + box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); + padding: 2rem 3rem; + max-width: 600px; + width: 90%; + text-align: center; + margin-bottom: 2rem; +} + +/* Quote Text */ +#quote { + font-size: 1.5rem; + font-weight: 600; + margin-bottom: 1rem; + text-align: center; +} + +/* Author Text */ +#author { + font-size: 1.1rem; + font-style: italic; +} + +/* Button */ +#new-quote { + background-color: #ffffff; + color: #2980b9; + border: none; + padding: 0.75rem 1.5rem; + font-size: 1rem; + font-weight: bold; + border-radius: 8px; + cursor: pointer; + transition: all 0.3s ease; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); +} + +#new-quote:hover { + background-color: #2abfe4; + transform: translateY(-2px); +} \ No newline at end of file From cce2eca8e9786ec22ddc8742ea04f68582ceac1a Mon Sep 17 00:00:00 2001 From: Waleed Yahya Date: Sat, 2 Aug 2025 12:50:13 +0100 Subject: [PATCH 5/6] fixed the link for the CSS file contion. --- 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 90689a7d8..83e4b6f50 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -6,7 +6,7 @@ Quote Generator App - + From 97e30960f0a67d098338e490d3c5bd4200892a6c Mon Sep 17 00:00:00 2001 From: Waleed Yahya Date: Sat, 2 Aug 2025 12:57:03 +0100 Subject: [PATCH 6/6] removed the aira-label accessibility from the button New Quote --- Sprint-3/quote-generator/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 83e4b6f50..aed682da2 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -20,8 +20,8 @@

Quote Generator

-