From 18e35a111add564667822ee06e7a492c5838185a Mon Sep 17 00:00:00 2001 From: Kushal Bansal <321kushalbansal.kb@gmail.com> Date: Tue, 8 Oct 2024 11:17:15 +0000 Subject: [PATCH] added password toggle and improved ui --- firebase.js | 9 +++++++++ login.css | 24 ++++++++++++++++++++++-- login.html | 11 +++++++++-- signUp.css | 24 ++++++++++++++++++++++-- signUp.html | 29 +++++++++++++++++++---------- 5 files changed, 81 insertions(+), 16 deletions(-) diff --git a/firebase.js b/firebase.js index 8ae45553..d355b3a1 100644 --- a/firebase.js +++ b/firebase.js @@ -131,3 +131,12 @@ document.getElementById('loginForm').addEventListener('submit', function (e) { // Call the login function loginWithEmailAndPassword(email, password); }); + +function togglePassword(fieldId) { + const passwordField = document.getElementById(fieldId); + if (passwordField.type === "password") { + passwordField.type = "text"; + } else { + passwordField.type = "password"; + } +} \ No newline at end of file diff --git a/login.css b/login.css index 88fcabdc..d87e3d37 100644 --- a/login.css +++ b/login.css @@ -92,7 +92,7 @@ body { .input-field label { display: block; margin-bottom: 0.5rem; - font-weight: bold; + font-weight: 600; } .input-field input { @@ -131,9 +131,29 @@ body { .signUp-link a { color: #3066dc; /* Match the link color with the theme */ text-decoration: none; /* Remove underline from the link */ - font-weight: 100; /* Make the link text bold */ + font-weight: 300; /* Make the link text bold */ } .signUp-link a:hover { text-decoration: underline; /* Add underline on hover for better UX */ } + +.req{ + color: red; +} + +.toggle-password { + cursor: pointer; + position: absolute; + right: 10px; + top: 55%; +} + +.input-field { + position: relative; +} + +.toggle-password svg { + width: 20px; + height: 20px; +} \ No newline at end of file diff --git a/login.html b/login.html index a7f5182b..121bc701 100644 --- a/login.html +++ b/login.html @@ -44,12 +44,19 @@