From ddd07f5ef9ab7fd93c50410236aa730715500342 Mon Sep 17 00:00:00 2001 From: Moez Khalid <29011087+mightymozdef@users.noreply.github.com> Date: Wed, 3 Jan 2024 14:06:35 -0500 Subject: [PATCH 1/2] Pushed code changes fixing bugs --- src/index.html | 6 +++--- src/script.js | 8 ++++++++ src/styles.css | 5 +++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/index.html b/src/index.html index e7c4417..d4cf6a8 100644 --- a/src/index.html +++ b/src/index.html @@ -9,15 +9,15 @@
- + - + - +
diff --git a/src/script.js b/src/script.js index 4e3be16..93f6b46 100644 --- a/src/script.js +++ b/src/script.js @@ -30,4 +30,12 @@ addEventListener("submit", (event) => { 2. If they are, call renderSuccess() 3. If they are not, call renderError() */ + const validUser = usersTable.some((user) => { + return user.username === email && user.password === password; + }); + if (validUser) { + renderSuccess(); + } else { + renderError(); + } }); diff --git a/src/styles.css b/src/styles.css index 25969e5..6ef3ebe 100644 --- a/src/styles.css +++ b/src/styles.css @@ -3,6 +3,7 @@ body { display: flex; /* TODO: Adjust CSS so that form is centered on page */ align-items: center; + justify-content: center; } form { @@ -13,7 +14,7 @@ form { border-radius: 2rem; } -form > img { +form>img { margin: auto; } @@ -37,4 +38,4 @@ button { #error-message { color: red; -} +} \ No newline at end of file From 1cb5902461da6a32af57bb020b5871bd383c6b79 Mon Sep 17 00:00:00 2001 From: Moez Khalid <29011087+mightymozdef@users.noreply.github.com> Date: Wed, 3 Jan 2024 14:08:03 -0500 Subject: [PATCH 2/2] removed pattern from input --- src/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index d4cf6a8..187b8b0 100644 --- a/src/index.html +++ b/src/index.html @@ -14,7 +14,7 @@ - +