From ca50adf21e4fe110078a2c3eebb25d2385c1abf0 Mon Sep 17 00:00:00 2001 From: Prem Kolte Date: Thu, 3 Oct 2024 19:02:27 +0530 Subject: [PATCH] improve login and register page --- frontend/src/Pages/LoginPage.jsx | 36 ++++++++++++++----------- frontend/src/Pages/Register.jsx | 45 +++++++++++++++++++------------- 2 files changed, 48 insertions(+), 33 deletions(-) diff --git a/frontend/src/Pages/LoginPage.jsx b/frontend/src/Pages/LoginPage.jsx index c32e4f1..466d8de 100644 --- a/frontend/src/Pages/LoginPage.jsx +++ b/frontend/src/Pages/LoginPage.jsx @@ -7,43 +7,44 @@ const Login = () => { const handleLogin = (e) => { e.preventDefault(); + // Handle login logic }; return ( -
+
{/* Logo, Title, and Tagline */}
- Station Saarthi Logo {/* Adjust width/height as needed */} -

Station Saarthi

-

Your Trusted Platform Guide

+ Station Saarthi Logo {/* Larger logo */} +

Station Saarthi

+

Your Trusted Platform Guide

{/* Login Form */} -
+ {/* Username Input */} -
- +
+ setUsername(e.target.value)} placeholder="Enter your username" - className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:border-blue-500" + className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition duration-300" required />
{/* Password Input */}
- + setPassword(e.target.value)} placeholder="Enter your password" - className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:border-blue-500" + className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition duration-300" required />
@@ -51,16 +52,21 @@ const Login = () => { {/* Login Button */} - {/* Don't have an account link */} -

- Don't have an account? - + {/* Divider */} +

+ + {/* Register Link */} +

+ Don't have an account?{' '} + Register

diff --git a/frontend/src/Pages/Register.jsx b/frontend/src/Pages/Register.jsx index deec131..9166165 100644 --- a/frontend/src/Pages/Register.jsx +++ b/frontend/src/Pages/Register.jsx @@ -1,4 +1,5 @@ import React, { useState } from 'react'; +import logo from '../assets/stationsaarthi.svg'; // Import your logo const Register = () => { const [name, setName] = useState(''); @@ -8,65 +9,72 @@ const Register = () => { const handleRegister = (e) => { e.preventDefault(); + // Handle registration logic here }; return ( -
-

Register New User

-
+
+ {/* Logo and Title */} +
+ Station Saarthi Logo +

Station Saarthi

+

Register New User

+
+ {/* Registration Form */} + {/* Name Input */} -
- +
+ setName(e.target.value)} placeholder="Enter your name" - className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:border-blue-500" + className="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition duration-300" required />
{/* Phone Number Input */} -
- +
+ setPhoneNumber(e.target.value)} placeholder="Enter your phone number" - className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:border-blue-500" + className="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition duration-300" required />
{/* Email Input */} -
- +
+ setEmail(e.target.value)} placeholder="Enter your email" - className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:border-blue-500" + className="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition duration-300" required />
{/* Password Input */}
- + setPassword(e.target.value)} placeholder="Create a password" - className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:border-blue-500" + className="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition duration-300" required />
@@ -74,15 +82,16 @@ const Register = () => { {/* Register Button */} + {/* Already have an account link */} -

- Already have an account? - +

+ Already have an account?{' '} + Log in