diff --git a/src/index.html b/src/index.html index 04bd19e..3735bc2 100644 --- a/src/index.html +++ b/src/index.html @@ -1,83 +1,76 @@ - - - JobSimulator.Dev - - - - - - - - - + + + + + -
-
-

Browse Our Challenges

- + + + +
+
+

Browse Our Challenges

+ -
+
+
-
-
-
-

Sign Up & Get Started

-
- - - - - -
-
+
+
+
+

Sign Up & Get Started

+
+ + + + + +
-
- - +
+
+ + + \ No newline at end of file diff --git a/src/script.js b/src/script.js index 529f585..62d0a3f 100644 --- a/src/script.js +++ b/src/script.js @@ -30,6 +30,17 @@ addEventListener("submit", (event) => { // 2. empty email // 3. taken email // 4. repeat email + + if (email === "") { + renderEmailEmptyError(); // 2. empty email + } else if (usersTable.some((user) => user.username === email)) { + renderEmailTakenError(); // 3. taken email + } else { + usersTable.push({ username: email }); + renderSuccess(); // 1. successful signup, which pushes the email to the usersTable. This means that whenever the user tries to sign up with the same email, it will be rejected as a repeat email, solving 4. repeat email. + } + + }); let toggleNav = () => { diff --git a/src/styles.css b/src/styles.css index 2cbb72e..53ce34b 100644 --- a/src/styles.css +++ b/src/styles.css @@ -33,6 +33,7 @@ a { } img { border-style: none; + filter: invert(100%); /* Inverted all colors */ } button, @@ -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, minmax(0, 1fr)); /*made grid 2x2 */ grid-auto-rows: 10rem; gap: 1rem; padding-top: 2rem;