diff --git a/website3.0/components/Login-Signup.js b/website3.0/components/Login-Signup.js index 8ec7007f..b90abf5c 100644 --- a/website3.0/components/Login-Signup.js +++ b/website3.0/components/Login-Signup.js @@ -22,7 +22,9 @@ export const Login = ({ onClose, onSignupClick }) => {
New here? Sign up now
- + ); }; @@ -106,7 +108,9 @@ export const Signup = ({ onClose, onLoginClick }) => { />
Already have an account? Login
- + ); }; \ No newline at end of file diff --git a/website3.0/pages/OTP.js b/website3.0/pages/OTP.js index 261f693e..05acda70 100644 --- a/website3.0/pages/OTP.js +++ b/website3.0/pages/OTP.js @@ -40,6 +40,10 @@ const OTP = ({ onClose, onOTPSubmit, onBack }) => { + {/* Close button */} +
To continue, enter the OTP sent to your registered email address.

This helps us keep your account secure.

{/* OTP input fields */} diff --git a/website3.0/pages/Profile.js b/website3.0/pages/Profile.js index 49c205b6..97129bbc 100644 --- a/website3.0/pages/Profile.js +++ b/website3.0/pages/Profile.js @@ -3,7 +3,6 @@ import React, { useState } from 'react'; import "@stylesheets/profile.css" const Profile = ({ onClose }) => { - // State for form fields const [username, setUsername] = useState(''); const [password, setPassword] = useState(''); const [confirmPassword, setConfirmPassword] = useState(''); @@ -11,13 +10,12 @@ const Profile = ({ onClose }) => { // Handle form submission const handleSubmit = async (e) => { e.preventDefault(); - // TODO: Add account creation logic here - await fetch('/api/createaccount',{ - method:'POST', - body:JSON.stringify({ - email:localStorage.getItem('email'), - name:username, - password:password + await fetch('/api/createaccount', { + method: 'POST', + body: JSON.stringify({ + email: localStorage.getItem('email'), + name: username, + password: password }) }) onClose(); @@ -25,6 +23,10 @@ const Profile = ({ onClose }) => { return (
+ {/* Close button */} +

Profile

Profile-circle
diff --git a/website3.0/stylesheets/login-signup.css b/website3.0/stylesheets/login-signup.css index f95a7044..9f81b208 100644 --- a/website3.0/stylesheets/login-signup.css +++ b/website3.0/stylesheets/login-signup.css @@ -225,6 +225,11 @@ background-color: #ff8c00; } + .dark-mode .login-auth-container .close-btn, + .dark-mode .signup-auth-container .close-btn{ + color: #f5f5f5; + } + @media screen and (max-width: 600px) { .login-auth-container, diff --git a/website3.0/stylesheets/otp.css b/website3.0/stylesheets/otp.css index 0c5a2bbf..23e455fe 100644 --- a/website3.0/stylesheets/otp.css +++ b/website3.0/stylesheets/otp.css @@ -54,4 +54,100 @@ border-radius: 16px; cursor: pointer; margin-top: 20px; + } + + .otp-container .close-btn { + position: absolute; + background: none; + border: none; + font-size: 24px; + cursor: pointer; + color: #333; + } + + .otp-container .close-btn { + top: 10px; + right: 10px; + } + + .otp-container .close-btn:hover { + color: #666; + } + + .dark-mode .otp-container{ + background-color: #333; + } + + .dark-mode .otp-container button{ + color: black; + } + + .dark-mode .otp-container .back-arrow{ + color: #f5f5f5; + } + + .dark-mode .otp-container .close-btn{ + color: #f5f5f5; + } + + /* Responsiveness for smaller screens */ + @media screen and (max-width: 768px) { + .otp-container { + width: 90%; + height: auto; + min-height: 400px; + margin-left: 15px; + } + + .otp-container h5 { + margin-top: 40px; + font-size: 16px; + } + + .otp-container p { + font-size: 14px; + } + + .otp-input { + margin-top: 30px; + } + + .otp-field { + width: 35px; + height: 40px; + font-size: 16px; + } + } + + @media screen and (max-width: 480px) { + .otp-container { + width: 90%; + min-height: 350px; + margin-left: 15px; + } + + .otp-container h5 { + margin-top: 30px; + font-size: 14px; + } + + .otp-container p { + font-size: 13px; + } + + .otp-input { + margin-top: 20px; + } + + .otp-field { + width: 30px; + height: 35px; + font-size: 14px; + margin: 0 3px; + } + + .continue-btn { + padding: 8px 16px; + font-size: 14px; + } } \ No newline at end of file diff --git a/website3.0/stylesheets/profile.css b/website3.0/stylesheets/profile.css index 74b214ab..ce16a694 100644 --- a/website3.0/stylesheets/profile.css +++ b/website3.0/stylesheets/profile.css @@ -6,6 +6,7 @@ text-align: center; width: 650px; height: 500px; + position: relative; } .profile-container h1 { @@ -46,4 +47,92 @@ border-radius: 16px; cursor: pointer; margin-top: 20px; + } + + .close-btn { + position: absolute; + background: none; + border: none; + font-size: 24px; + cursor: pointer; + color: #333; + } + + + .close-btn { + top: 10px; + right: 10px; + } + + .close-btn:hover { + color: #666; + } + + .dark-mode .close-btn{ + color: #f5f5f5; + } + + .dark-mode .profile-container{ + background-color: #333; + } + + .dark-mode .profile-container input{ + border-bottom: 1px solid #f5f5f5; + color: #f5f5f5; + } + + .dark-mode .profile-container .create-account-btn{ + background-color: #ffa500; + color: black; + } + + /* Responsiveness for smaller screens */ + @media screen and (max-width: 768px) { + .profile-container { + width: 400px; + height: auto; + min-height: 450px; + padding: 15px; + } + + .profile-container h1 { + font-size: 22px; + } + + .profile-container img { + margin-left: 40%; + width: 20%; + } + + .profile-container .form-group input { + width: 80%; + margin-left: 10%; + } + } + + @media screen and (max-width: 480px) { + .profile-container { + width: 300px; + min-height: 420px; + } + + .profile-container h1 { + font-size: 20px; + } + + .profile-container img { + margin-left: 35%; + width: 30%; + } + + .profile-container .form-group input { + width: 90%; + margin-left: 5%; + font-size: 14px; + } + + .profile-container .create-account-btn { + padding: 8px 16px; + font-size: 14px; + } } \ No newline at end of file