From c57cc66f366e2bb16f6356d23e68a62594d4caee Mon Sep 17 00:00:00 2001 From: adhishVerma Date: Fri, 7 Jul 2023 19:02:07 +0530 Subject: [PATCH 1/6] fix : all mentioned issues --- src/index.html | 14 +++++++------- src/script.js | 18 ++++++++++++++++++ src/styles.css | 4 +++- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/src/index.html b/src/index.html index 04bd19e..9e4b173 100644 --- a/src/index.html +++ b/src/index.html @@ -15,7 +15,7 @@ diff --git a/src/script.js b/src/script.js index 529f585..4069c21 100644 --- a/src/script.js +++ b/src/script.js @@ -24,6 +24,23 @@ addEventListener("submit", (event) => { resetMessage(); let email = document.getElementById("email").value; + + // if empty give error + if (email.length === 0){ + renderEmailEmptyError(); + return null; + } + + const user = usersTable.find(user => user.username === email); + + if (user){ + // if taken already taken, repeat also same case + renderEmailTakenError(); + }else{ + // succesful signup where email doesnt exist and is correct, add user + usersTable.push({username: email}); + renderSuccess(); + } // TODO: Show Correct Status Messages on Signup Form // 1. successful signup @@ -34,6 +51,7 @@ addEventListener("submit", (event) => { let toggleNav = () => { var nav = document.getElementById("mobile-nav"); + console.log(nav.className) if (nav.className.indexOf("show") == -1) { nav.className += " show"; } else { diff --git a/src/styles.css b/src/styles.css index 2cbb72e..a405984 100644 --- a/src/styles.css +++ b/src/styles.css @@ -665,11 +665,13 @@ form > span { .auto { max-width: 95%; } + } #jumbo-image { max-height: 20rem; /* TODO: Invert banner colors using CSS */ + filter: invert(); } @media (max-width: 600px) { @@ -877,7 +879,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: 1fr 1fr; grid-auto-rows: 10rem; gap: 1rem; padding-top: 2rem; From 2d27100370a6825e220926c561d0f83f13033ee6 Mon Sep 17 00:00:00 2001 From: adhishVerma Date: Fri, 7 Jul 2023 19:09:32 +0530 Subject: [PATCH 2/6] fix : header --- src/index.html | 2 +- src/script.js | 2 +- src/styles.css | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.html b/src/index.html index 9e4b173..a9f54bd 100644 --- a/src/index.html +++ b/src/index.html @@ -23,7 +23,7 @@ > - + Browse Challenges Sign Up diff --git a/src/script.js b/src/script.js index 4069c21..16f29bd 100644 --- a/src/script.js +++ b/src/script.js @@ -38,8 +38,8 @@ addEventListener("submit", (event) => { renderEmailTakenError(); }else{ // succesful signup where email doesnt exist and is correct, add user - usersTable.push({username: email}); renderSuccess(); + usersTable.push({username: email}); } // TODO: Show Correct Status Messages on Signup Form diff --git a/src/styles.css b/src/styles.css index a405984..07f17b2 100644 --- a/src/styles.css +++ b/src/styles.css @@ -671,7 +671,7 @@ form > span { #jumbo-image { max-height: 20rem; /* TODO: Invert banner colors using CSS */ - filter: invert(); + filter: invert(1); } @media (max-width: 600px) { From 837e3fec301b9206b3cfd35ab2ebda8aedbb928f Mon Sep 17 00:00:00 2001 From: adhishVerma Date: Fri, 7 Jul 2023 19:17:18 +0530 Subject: [PATCH 3/6] fix: hide-small --- src/index.html | 14 +++++++------- src/script.js | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/index.html b/src/index.html index a9f54bd..1980207 100644 --- a/src/index.html +++ b/src/index.html @@ -11,11 +11,11 @@ - + diff --git a/src/script.js b/src/script.js index 16f29bd..a61541d 100644 --- a/src/script.js +++ b/src/script.js @@ -42,7 +42,7 @@ addEventListener("submit", (event) => { usersTable.push({username: email}); } - // TODO: Show Correct Status Messages on Signup Form + // Done: Show Correct Status Messages on Signup Form // 1. successful signup // 2. empty email // 3. taken email From ac0eb0a44151f91a16406854e859ed9a8e089821 Mon Sep 17 00:00:00 2001 From: adhishVerma Date: Fri, 7 Jul 2023 19:21:51 +0530 Subject: [PATCH 4/6] fixed : formatting --- src/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.html b/src/index.html index 1980207..dfb652d 100644 --- a/src/index.html +++ b/src/index.html @@ -23,9 +23,9 @@ > - - Sign Up + + Browse Challenges + Sign Up From beaf323b25e181be5b0a661696520ed3afcdb590 Mon Sep 17 00:00:00 2001 From: adhishVerma Date: Fri, 7 Jul 2023 19:31:42 +0530 Subject: [PATCH 5/6] fix:hide-small --- src/index.html | 4 ++-- src/script.js | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/index.html b/src/index.html index dfb652d..32feb7a 100644 --- a/src/index.html +++ b/src/index.html @@ -24,8 +24,8 @@ > - Browse Challenges - Sign Up + Browse Challenges + Sign Up diff --git a/src/script.js b/src/script.js index a61541d..ae5703f 100644 --- a/src/script.js +++ b/src/script.js @@ -51,7 +51,6 @@ addEventListener("submit", (event) => { let toggleNav = () => { var nav = document.getElementById("mobile-nav"); - console.log(nav.className) if (nav.className.indexOf("show") == -1) { nav.className += " show"; } else { From f30324329594ca3c0c2efe9517835741e5583cfe Mon Sep 17 00:00:00 2001 From: adhishVerma Date: Fri, 7 Jul 2023 19:33:33 +0530 Subject: [PATCH 6/6] fix: css --- src/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles.css b/src/styles.css index 07f17b2..fb1f060 100644 --- a/src/styles.css +++ b/src/styles.css @@ -727,7 +727,7 @@ form > span { } } @media (max-width: 992px) and (min-width: 601px) { - .hide-medium { + .hide-small { display: none !important; } }