From 59a0e6b1332b42cf77d49ec5c4ea88f6801823cb Mon Sep 17 00:00:00 2001 From: Arunkumar Akilan Date: Sun, 22 Mar 2026 06:11:39 +0000 Subject: [PATCH 1/3] hhs --- prep/index.html | 24 ++++++++++++++++++++++++ prep/script.js | 11 +++++++++++ 2 files changed, 35 insertions(+) create mode 100644 prep/index.html create mode 100644 prep/script.js diff --git a/prep/index.html b/prep/index.html new file mode 100644 index 000000000..c627c419f --- /dev/null +++ b/prep/index.html @@ -0,0 +1,24 @@ + + + + + + Document + + + +
+

Example character limit comment component

+ + +

You have 200 characters remaining

+
+ + \ No newline at end of file diff --git a/prep/script.js b/prep/script.js new file mode 100644 index 000000000..effce0819 --- /dev/null +++ b/prep/script.js @@ -0,0 +1,11 @@ +const characterLimit = 200; +const textarea = document.querySelector("textarea"); + + +function updateCharacterLimit(){ + +const remainingCharacters = characterLimit - textarea.value.length; +const limitDisplay = document.querySelector("#character-limit-info"); +limitDisplay.textContent = `you have ${remainingCharacters} characters remaining`; +} +textarea.addEventListener("keyup", updateCharacterLimit); \ No newline at end of file From 013e18e03109a2f7192b823a37f826ccab28ea5b Mon Sep 17 00:00:00 2001 From: Arunkumar Akilan Date: Sun, 22 Mar 2026 16:06:58 +0000 Subject: [PATCH 2/3] feat: clean sprint 3 quote generator --- Sprint-3/quote-generator/index.html | 12 ++++---- Sprint-3/quote-generator/package.json | 7 ++++- Sprint-3/quote-generator/quotes.js | 17 +++++++++++- Sprint-3/quote-generator/quotes.test.js | 1 + Sprint-3/quote-generator/style.css | 37 ++++++++++++++++++++++++- 5 files changed, 66 insertions(+), 8 deletions(-) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 30b434bcf..4e2ccc9a2 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

-

-

+
+

+

+
+ diff --git a/Sprint-3/quote-generator/package.json b/Sprint-3/quote-generator/package.json index 0f6f98917..068b6298c 100644 --- a/Sprint-3/quote-generator/package.json +++ b/Sprint-3/quote-generator/package.json @@ -13,5 +13,10 @@ "bugs": { "url": "https://github.com/CodeYourFuture/CYF-Coursework-Template/issues" }, - "homepage": "https://github.com/CodeYourFuture/CYF-Coursework-Template#readme" + "homepage": "https://github.com/CodeYourFuture/CYF-Coursework-Template#readme", + "dependencies": { + "@testing-library/jest-dom": "^6.9.1", + "jest": "^30.3.0", + "jsdom": "^26.1.0" + } } diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 4a4d04b72..e2b65e00d 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -490,4 +490,19 @@ const quotes = [ }, ]; -// call pickFromArray with the quotes array to check you get a random quote +function quoteGenerator() +{ + +let randomQuote = pickFromArray(quotes); +let accessQuote = document.querySelector("#quote"); +accessQuote.textContent = randomQuote.quote; +let accessAuthor = document.querySelector("#author"); +accessAuthor.textContent = randomQuote.author; + +} + +quoteGenerator(); +let newQuote = document.querySelector("#new-quote"); +newQuote.addEventListener("click",quoteGenerator) + + diff --git a/Sprint-3/quote-generator/quotes.test.js b/Sprint-3/quote-generator/quotes.test.js index f7b128bf7..2d327d06a 100644 --- a/Sprint-3/quote-generator/quotes.test.js +++ b/Sprint-3/quote-generator/quotes.test.js @@ -75,3 +75,4 @@ describe("Quote generator", () => { expect(authorP).toHaveTextContent("Rosa Parks"); }); }); + diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 63cedf2d2..941a22aa4 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -1 +1,36 @@ -/** Write your CSS in here **/ +body{ + background-color:orange; + padding: 200px; + padding-right: 300px; + text-align: center; + font-weight: bold; + font-family:'Times New Roman', Times, serif; + font-size: 20px; +} +#quote{ + color:orange; + padding: 20px; + font-size: 30px; +} +#author{ + color:orange; + text-align: right; + font-size: 25px; + margin-top: 20px; +} +#card{ + background-color: white; + padding: 40px; + margin-top: 20px; +} +#new-quote{ + background-color: orange; + color: white; + display: block; + margin-left: auto; + margin-top: 10px; + padding: 10px 20px; + border: none; + font-size: 20px; + cursor: pointer; +} \ No newline at end of file From 8bcf1e36ffef5162b75568abb04b2bf073f067e5 Mon Sep 17 00:00:00 2001 From: Arunkumar Akilan Date: Sun, 22 Mar 2026 16:10:37 +0000 Subject: [PATCH 3/3] remove prep folder from PR --- prep/index.html | 24 ------------------------ prep/script.js | 11 ----------- 2 files changed, 35 deletions(-) delete mode 100644 prep/index.html delete mode 100644 prep/script.js diff --git a/prep/index.html b/prep/index.html deleted file mode 100644 index c627c419f..000000000 --- a/prep/index.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - Document - - - -
-

Example character limit comment component

- - -

You have 200 characters remaining

-
- - \ No newline at end of file diff --git a/prep/script.js b/prep/script.js deleted file mode 100644 index effce0819..000000000 --- a/prep/script.js +++ /dev/null @@ -1,11 +0,0 @@ -const characterLimit = 200; -const textarea = document.querySelector("textarea"); - - -function updateCharacterLimit(){ - -const remainingCharacters = characterLimit - textarea.value.length; -const limitDisplay = document.querySelector("#character-limit-info"); -limitDisplay.textContent = `you have ${remainingCharacters} characters remaining`; -} -textarea.addEventListener("keyup", updateCharacterLimit); \ No newline at end of file