diff --git a/Sprint-1/implement/dedupe.test.js b/Sprint-1/implement/dedupe.test.js index d7c8e3d8e..23e0f8638 100644 --- a/Sprint-1/implement/dedupe.test.js +++ b/Sprint-1/implement/dedupe.test.js @@ -6,9 +6,9 @@ Dedupe Array In this kata, you will need to deduplicate the elements of an array -E.g. dedupe(['a','a','a','b','b','c']) returns ['a','b','c'] -E.g. dedupe([5, 1, 1, 2, 3, 2, 5, 8]) returns [5, 1, 2, 3, 8] -E.g. dedupe([1, 2, 1]) returns [1, 2] +E.g. dedupe(['a','a','a','b','b','c']) target output: ['a','b','c'] +E.g. dedupe([5, 1, 1, 2, 3, 2, 5, 8]) target output: [5, 1, 2, 3, 8] +E.g. dedupe([1, 2, 1]) target output: [1, 2] */ // Acceptance Criteria: @@ -22,7 +22,6 @@ test.todo("given an empty array, it returns an empty array"); // When passed to the dedupe function // Then it should return a copy of the original array -// Given an array of strings or numbers +// Given an array with strings or numbers // When passed to the dedupe function -// Then it should return a new array with duplicates removed while preserving the -// first occurrence of each element from the original array. +// Then it should remove the duplicate values, preserving the first occurence of each element diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 30b434bcf..c2a0bf214 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -1,15 +1,22 @@ - + - Title here + Quote Generator + -

hello there

-

-

- +
+

Quote Generator

+ +
+

+

+
+ + +
diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 4a4d04b72..ca742f8a9 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -1,3 +1,15 @@ +const quoteP = document.querySelector("#quote"); +const authorP = document.querySelector("#author"); +const button = document.querySelector("#new-quote"); + +function displayQuote() { + const randomQuote = pickFromArray(quotes); + quoteP.innerText = randomQuote.quote; + authorP.innerText = randomQuote.author; +} + +button.addEventListener("click", displayQuote); + // DO NOT EDIT BELOW HERE // pickFromArray is a function which will return one item, at @@ -491,3 +503,4 @@ const quotes = [ ]; // call pickFromArray with the quotes array to check you get a random quote +displayQuote(); diff --git a/Sprint-3/quote-generator/style.css b/Sprint-3/quote-generator/style.css index 63cedf2d2..412d16d97 100644 --- a/Sprint-3/quote-generator/style.css +++ b/Sprint-3/quote-generator/style.css @@ -1 +1,87 @@ -/** Write your CSS in here **/ +* { + margin: 0; + padding: 0; + box-sizing: border-box; + font-family: "Poppins", Arial, sans-serif; +} + +body { + height: 100vh; + background: linear-gradient(135deg, #fbc2eb, #a6c1ee); + display: flex; + justify-content: center; + align-items: center; +} + +.container { + position: relative; + width: 90%; + max-width: 520px; + height: 360px; + + background: rgba(255, 255, 255, 0.75); + backdrop-filter: blur(10px); + + border-radius: 24px; + box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15); + + display: flex; + flex-direction: column; + padding: 25px; +} + +h1 { + text-align: center; + font-size: 1.6rem; + color: #6d5dfc; + font-weight: 600; + letter-spacing: 1px; +} + +.quote-box { + flex: 1; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + + text-align: center; +} + +#quote { + font-size: 1.3rem; + color: #333; + line-height: 1.6; + font-style: italic; + padding: 0 10px; +} + +#author { + margin-top: 12px; + font-size: 0.95rem; + color: #7a7a7a; +} + +#new-quote { + position: absolute; + bottom: 18px; + right: 18px; + + background: linear-gradient(135deg, #ff9a9e, #fad0c4); + color: white; + border: none; + + padding: 10px 16px; + border-radius: 50px; + + cursor: pointer; + font-weight: 500; + + box-shadow: 0 6px 15px rgba(255, 154, 158, 0.4); + transition: all 0.3s ease; +} + +#new-quote:hover { + transform: translateY(-2px) scale(1.05); + box-shadow: 0 10px 20px rgba(255, 154, 158, 0.5); +}