From 9ad44f0def966f1cc8152ef01235eef0734b71d0 Mon Sep 17 00:00:00 2001 From: Juan Carrillo Date: Sun, 4 Jun 2023 14:06:22 -0600 Subject: [PATCH 1/6] fix: [Bug] Nav Buttons Don't Work (Desktop & Mobile) #1 --- src/index.html | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/index.html b/src/index.html index 04bd19e..21b4e6f 100644 --- a/src/index.html +++ b/src/index.html @@ -11,7 +11,6 @@ - From cccdfda86d2870e0417e50b7cd774ec441183923 Mon Sep 17 00:00:00 2001 From: Juan Carrillo Date: Sun, 4 Jun 2023 14:24:43 -0600 Subject: [PATCH 2/6] fix: [Bug] Desktop Nav Is Visible on Mobile #2 --- src/index.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/index.html b/src/index.html index 21b4e6f..002d813 100644 --- a/src/index.html +++ b/src/index.html @@ -21,10 +21,9 @@ title="Toggle Navigation Menu" > - - Browse Challenges - Sign Up + Browse Challenges + Sign Up From 9d62f4025f078b21af8a674ade11c352f1047624 Mon Sep 17 00:00:00 2001 From: Juan Carrillo Date: Sun, 4 Jun 2023 14:29:01 -0600 Subject: [PATCH 3/6] fix: [Bug] Invert Banner Image Colors #3 --- src/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles.css b/src/styles.css index 2cbb72e..cb9a90d 100644 --- a/src/styles.css +++ b/src/styles.css @@ -669,7 +669,7 @@ form > span { #jumbo-image { max-height: 20rem; - /* TODO: Invert banner colors using CSS */ + filter: invert(1); } @media (max-width: 600px) { From a8352a63efb4d13d2133a3f898d3df43d0b445f5 Mon Sep 17 00:00:00 2001 From: Juan Carrillo Date: Sun, 4 Jun 2023 14:32:49 -0600 Subject: [PATCH 4/6] feat: [Feature Request] Tiles Need to be 2x2 CSS Grid --- src/styles.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/styles.css b/src/styles.css index cb9a90d..72dfcad 100644 --- a/src/styles.css +++ b/src/styles.css @@ -876,8 +876,7 @@ form > span { #challenge-grid { display: grid; - /* TODO: Fix Issue, Tiles Need to be 2x2 Grid. Change only grid-template-columns */ - grid-template-columns: none; + grid-template-columns: repeat(2, 1fr); grid-auto-rows: 10rem; gap: 1rem; padding-top: 2rem; From baf63b6c73586464315f54338b300c6cba4ac519 Mon Sep 17 00:00:00 2001 From: Juan Carrillo Date: Sun, 4 Jun 2023 15:04:14 -0600 Subject: [PATCH 5/6] feat: [Feature Request] Improve Errors on Signup Form Validation #5 --- src/script.js | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/src/script.js b/src/script.js index 529f585..94654c9 100644 --- a/src/script.js +++ b/src/script.js @@ -25,11 +25,31 @@ addEventListener("submit", (event) => { let email = document.getElementById("email").value; - // TODO: Show Correct Status Messages on Signup Form - // 1. successful signup - // 2. empty email - // 3. taken email - // 4. repeat email + // Check if the email is empty, and if is, render empty error. + if (!email) { + renderEmailEmptyError(); + } else { + // If it is not empty, check if already exists. + // This is just a boolean flag. + let emailExists = false; + // Check if the email already existe in the usersTable array. + for (const obj of usersTable) { + if (obj.username === email) { + // If the email exists, toggle flag and break cycle. + emailExists = true; + break; + } + } + + // If the email exists, render error. + if (emailExists) { + renderEmailTakenError(); + } else { + // Otherwise, save the email to the usersTable array and render success. + usersTable.push({ username: email }); + renderSuccess(); + } + } }); let toggleNav = () => { From cb9f4c11b6249f6aff7ebb81cebec966e7435275 Mon Sep 17 00:00:00 2001 From: Juan Carrillo Date: Sun, 4 Jun 2023 15:10:52 -0600 Subject: [PATCH 6/6] fix(#1): Expected value to be strictly equal to '#header' instead of '#' --- src/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index 002d813..195c1fd 100644 --- a/src/index.html +++ b/src/index.html @@ -21,7 +21,7 @@ title="Toggle Navigation Menu" > - + Browse Challenges Sign Up