From 275a7f53e0458752f4dcead76cf18ab7e4f0170d Mon Sep 17 00:00:00 2001 From: matejhegedus Date: Tue, 25 Mar 2025 22:21:30 +0100 Subject: [PATCH 1/6] fixed logo rendering --- src/index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.html b/src/index.html index e7c4417..7246762 100644 --- a/src/index.html +++ b/src/index.html @@ -8,8 +8,7 @@
- - + From 1494c2e0a0cb8a46ecc0166826e6b07c14cd6369 Mon Sep 17 00:00:00 2001 From: matejhegedus Date: Tue, 25 Mar 2025 22:22:54 +0100 Subject: [PATCH 2/6] hide password while typing it in the input field --- src/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index 7246762..fe29ce0 100644 --- a/src/index.html +++ b/src/index.html @@ -16,7 +16,7 @@ - + From 72e733b0b634ae2afc890aa0b5842d0916765690 Mon Sep 17 00:00:00 2001 From: matejhegedus Date: Tue, 25 Mar 2025 22:27:13 +0100 Subject: [PATCH 3/6] email validation --- src/index.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/index.html b/src/index.html index fe29ce0..40c6a5e 100644 --- a/src/index.html +++ b/src/index.html @@ -12,10 +12,8 @@ - - + - From dd0d6eb26fdfd5b007d1da67f096fbbf44f82b18 Mon Sep 17 00:00:00 2001 From: matejhegedus Date: Tue, 25 Mar 2025 22:28:57 +0100 Subject: [PATCH 4/6] login form centered --- src/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles.css b/src/styles.css index 25969e5..0dbb1fd 100644 --- a/src/styles.css +++ b/src/styles.css @@ -1,7 +1,7 @@ body { height: 100vh; display: flex; - /* TODO: Adjust CSS so that form is centered on page */ + justify-content: center; align-items: center; } From c278db3d02a58dbf00c9c79dd43517186aace12e Mon Sep 17 00:00:00 2001 From: matejhegedus Date: Tue, 25 Mar 2025 22:36:32 +0100 Subject: [PATCH 5/6] check if email and password are correct and display success or fail message --- src/script.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/script.js b/src/script.js index 4e3be16..6987f8f 100644 --- a/src/script.js +++ b/src/script.js @@ -24,10 +24,13 @@ addEventListener("submit", (event) => { console.log(`email submitted: ${email}`); console.log(`password submitted: ${password}`); - /* - TODO: - 1. Check if the email and password are valid (using the usersTable) - 2. If they are, call renderSuccess() - 3. If they are not, call renderError() - */ + + for (const element of usersTable) { + if (email === element.username && password === element.password) { + renderSuccess(); + break; + } + else + renderError(); + } }); From b1f185ff83811fa78f30841fa591481cbddbe868 Mon Sep 17 00:00:00 2001 From: matejhegedus Date: Tue, 25 Mar 2025 22:48:13 +0100 Subject: [PATCH 6/6] fix logo (was displayed in vscode preview, but not in browser) --- src/index.html | 2 +- src/script.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.html b/src/index.html index 40c6a5e..5334525 100644 --- a/src/index.html +++ b/src/index.html @@ -8,7 +8,7 @@
- + diff --git a/src/script.js b/src/script.js index 6987f8f..21f90ee 100644 --- a/src/script.js +++ b/src/script.js @@ -24,7 +24,7 @@ addEventListener("submit", (event) => { console.log(`email submitted: ${email}`); console.log(`password submitted: ${password}`); - + for (const element of usersTable) { if (email === element.username && password === element.password) { renderSuccess();