From 3f9498ae8822ce9aad6a1a0d9daa4d67e05ea875 Mon Sep 17 00:00:00 2001 From: benjamincracknell Date: Tue, 19 Sep 2023 22:23:10 +1000 Subject: [PATCH 1/4] All Issues resolved .. attempt 1 --- src/index.html | 8 ++++---- src/script.js | 21 +++++++++++++++++++++ src/styles.css | 3 ++- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/src/index.html b/src/index.html index 04bd19e..9558d92 100644 --- a/src/index.html +++ b/src/index.html @@ -24,14 +24,14 @@ > - Browse Challenges - Sign Up + Browse Challenges + Sign Up
- Browse Challenges - Sign Up + Browse Challenges + Sign Up
diff --git a/src/script.js b/src/script.js index 529f585..0834890 100644 --- a/src/script.js +++ b/src/script.js @@ -25,6 +25,27 @@ addEventListener("submit", (event) => { let email = document.getElementById("email").value; + let emailExists = false; + + if(!email) { + renderEmailEmptyError(); + } else { + for(const obj of usersTable) { + if(obj.username == email.toLowerCase()) { + emailExists = true; + break; + } + } + if(emailExists) { + renderEmailTakenError(); + } else { + usersTable.push({ username: email }); + renderSuccess(); + } + } + + + // TODO: Show Correct Status Messages on Signup Form // 1. successful signup // 2. empty email diff --git a/src/styles.css b/src/styles.css index 2cbb72e..ae57cc4 100644 --- a/src/styles.css +++ b/src/styles.css @@ -670,6 +670,7 @@ form > span { #jumbo-image { max-height: 20rem; /* TODO: Invert banner colors using CSS */ + -webkit-filter: invert(100%); } @media (max-width: 600px) { @@ -877,7 +878,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 e6ea4831d78f27aa63e6e08cf0d8d58659f7ec7a Mon Sep 17 00:00:00 2001 From: benjamincracknell Date: Fri, 22 Sep 2023 17:29:53 +1000 Subject: [PATCH 2/4] Invert Image Colour Attempt 2 --- src/styles.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/styles.css b/src/styles.css index ae57cc4..a0e8e16 100644 --- a/src/styles.css +++ b/src/styles.css @@ -670,7 +670,8 @@ form > span { #jumbo-image { max-height: 20rem; /* TODO: Invert banner colors using CSS */ - -webkit-filter: invert(100%); + -webkit-filter: invert(1); + filter: invert(1); } @media (max-width: 600px) { From b218fa2d69e6fd6ab94224e90fabbc79fce13a73 Mon Sep 17 00:00:00 2001 From: benjamincracknell Date: Fri, 22 Sep 2023 17:33:23 +1000 Subject: [PATCH 3/4] Fix Nav buttons Attempt 2 --- src/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index 9558d92..4bcaeb2 100644 --- a/src/index.html +++ b/src/index.html @@ -23,7 +23,7 @@ > - + Browse Challenges Sign Up From 99d511c88e6d8f1f8e985ceada3a3e740618cfa7 Mon Sep 17 00:00:00 2001 From: benjamincracknell Date: Fri, 22 Sep 2023 17:38:33 +1000 Subject: [PATCH 4/4] Fixed Nav Buttons - Attempt 3 --- src/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index 4bcaeb2..1621731 100644 --- a/src/index.html +++ b/src/index.html @@ -23,7 +23,7 @@ > - + Browse Challenges Sign Up