From 76115ef82b8a0a252dbf8ca4572e1583be94a926 Mon Sep 17 00:00:00 2001 From: Aditya Bhaumik <92214013+aditya-bhaumik@users.noreply.github.com> Date: Fri, 9 Aug 2024 19:08:10 +0530 Subject: [PATCH 1/3] Update styles1.css --- Login/styles1.css | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/Login/styles1.css b/Login/styles1.css index a93e625..4896db9 100644 --- a/Login/styles1.css +++ b/Login/styles1.css @@ -718,3 +718,45 @@ body { color: white; transition: all ease-in 0.1s; } + + + .captcha-container { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 1rem; + width: 100%; +} + +.captcha-text { + font-size: 1rem; + font-weight: bold; + color: #f09819; + padding: 0.5rem; + background-color: #333; + border-radius: 5px; + flex: 1; + text-align: center; + margin-right: 10px; +} + +.refresh-captcha { + background-color: transparent; + border: none; + cursor: pointer; + font-size: 1.5rem; + color: #f09819; +} + +.refresh-captcha:hover { + color: #ffba08; +} + +#captcha-input { + width: 100%; + padding: 0.5rem; + border: 1px solid #ccc; + border-radius: 5px; + margin-bottom: 1rem; + font-size: 1rem; +} From 8c8fb1c43edde482f41ba1ebea9a2fc2097a46b3 Mon Sep 17 00:00:00 2001 From: Aditya Bhaumik <92214013+aditya-bhaumik@users.noreply.github.com> Date: Fri, 9 Aug 2024 19:08:28 +0530 Subject: [PATCH 2/3] Update script1.js --- Login/script1.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/Login/script1.js b/Login/script1.js index 6ebf6a2..0bdbd9d 100644 --- a/Login/script1.js +++ b/Login/script1.js @@ -92,3 +92,33 @@ document.addEventListener('DOMContentLoaded', function() { }); } }); + +document.addEventListener('DOMContentLoaded', function() { + const captchaText = document.getElementById('captcha-text'); + const captchaInput = document.getElementById('captcha-input'); + const refreshCaptchaBtn = document.getElementById('refresh-captcha'); + const signInForm = document.querySelector('.form-container.sign-in form'); + + function generateCaptcha() { + const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + let captcha = ''; + for (let i = 0; i < 6; i++) { + captcha += characters.charAt(Math.floor(Math.random() * characters.length)); + } + captchaText.textContent = captcha; + } + + refreshCaptchaBtn.addEventListener('click', generateCaptcha); + + signInForm.addEventListener('submit', function(event) { + const enteredCaptcha = captchaInput.value; + if (enteredCaptcha !== captchaText.textContent) { + event.preventDefault(); + alert('CAPTCHA does not match. Please try again.'); + generateCaptcha(); // Generate new CAPTCHA on failed attempt + } + }); + + // Generate initial CAPTCHA on page load + generateCaptcha(); +}); From 3f22c33293b85a532ccea8699bd10a029e278bac Mon Sep 17 00:00:00 2001 From: Aditya Bhaumik <92214013+aditya-bhaumik@users.noreply.github.com> Date: Fri, 9 Aug 2024 19:09:28 +0530 Subject: [PATCH 3/3] Update index1.html --- Login/index1.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Login/index1.html b/Login/index1.html index 3ee5644..6a7185e 100644 --- a/Login/index1.html +++ b/Login/index1.html @@ -185,6 +185,14 @@

Activate Your Account

+
+ ABCD + +
+ + Forget Your Password?