You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
223 lines
6.1 KiB
223 lines
6.1 KiB
6 months ago
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
<title>Seller Signup</title>
|
||
|
<style>
|
||
|
/* General Styles */
|
||
|
body {
|
||
|
font-family: Arial, sans-serif;
|
||
|
background-color: #0ced0c;
|
||
|
color: #04e64c;
|
||
|
background-image: url('./images/alok.png'); /* Add background image */
|
||
|
background-size: cover; /* Ensures the image covers the entire background */
|
||
|
background-position: center; /* Center the background image */
|
||
|
background-attachment: fixed; /* Keeps the background fixed during scroll */
|
||
|
margin: 0;
|
||
|
padding: 0;
|
||
|
font-family: Arial, sans-serif;
|
||
|
background-color: #f4f4f9;
|
||
|
display: flex;
|
||
|
justify-content: center;
|
||
|
align-items: center;
|
||
|
height: 100vh; /* Full viewport height */
|
||
|
box-sizing: border-box;
|
||
|
flex-direction: column;
|
||
|
}
|
||
|
|
||
|
/* Signup Container */
|
||
|
.signup-container {
|
||
|
width: 100%;
|
||
|
max-width: 400px; /* Maximum width of the form */
|
||
|
padding: 30px;
|
||
|
background: #fff;
|
||
|
border: 2px solid #ccc; /* Border for the container */
|
||
|
border-radius: 10px;
|
||
|
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Subtle shadow */
|
||
|
text-align: center;
|
||
|
}
|
||
|
|
||
|
/* Form Heading */
|
||
|
.signup-container h1 {
|
||
|
font-size: 1.8rem;
|
||
|
margin-bottom: 20px;
|
||
|
color: #333;
|
||
|
text-align: center;
|
||
|
}
|
||
|
|
||
|
/* Form Styles */
|
||
|
.signup-form {
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
gap: 15px; /* Space between form elements */
|
||
|
}
|
||
|
|
||
|
/* Form Group */
|
||
|
.form-group {
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
align-items: flex-start;
|
||
|
width: 100%;
|
||
|
}
|
||
|
|
||
|
/* Labels */
|
||
|
.form-group label {
|
||
|
font-size: 1rem;
|
||
|
font-weight: bold;
|
||
|
margin-bottom: 5px;
|
||
|
color: #555;
|
||
|
}
|
||
|
|
||
|
/* Input Fields */
|
||
|
input,
|
||
|
textarea {
|
||
|
width: 100%; /* Full width of the container */
|
||
|
padding: 10px;
|
||
|
border: 1px solid #ccc;
|
||
|
border-radius: 5px;
|
||
|
font-size: 1rem;
|
||
|
color: #333;
|
||
|
box-sizing: border-box;
|
||
|
}
|
||
|
|
||
|
input:focus,
|
||
|
textarea:focus {
|
||
|
border-color: #007bff; /* Highlighted border on focus */
|
||
|
outline: none;
|
||
|
}
|
||
|
|
||
|
/* Textarea */
|
||
|
textarea {
|
||
|
resize: none;
|
||
|
height: 80px;
|
||
|
}
|
||
|
|
||
|
/* Submit Button */
|
||
|
button {
|
||
|
width: 100%; /* Full width of the container */
|
||
|
padding: 10px;
|
||
|
font-size: 1rem;
|
||
|
font-weight: bold;
|
||
|
color: #fff;
|
||
|
background-color: #007bff;
|
||
|
border: none;
|
||
|
border-radius: 5px;
|
||
|
cursor: pointer;
|
||
|
transition: background-color 0.3s;
|
||
|
}
|
||
|
|
||
|
button:hover {
|
||
|
background-color: #0056b3;
|
||
|
}
|
||
|
|
||
|
/* Back Button */
|
||
|
.back-btn {
|
||
|
padding: 10px 20px;
|
||
|
background-color: #ccc;
|
||
|
border: none;
|
||
|
border-radius: 5px;
|
||
|
font-size: 1rem;
|
||
|
cursor: pointer;
|
||
|
margin-top: 20px;
|
||
|
text-decoration: none;
|
||
|
color: #333;
|
||
|
display: inline-block;
|
||
|
}
|
||
|
|
||
|
.back-btn:hover {
|
||
|
background-color: #bbb;
|
||
|
}
|
||
|
|
||
|
/* Footer */
|
||
|
footer {
|
||
|
background-color: #333;
|
||
|
color: #fff;
|
||
|
text-align: center;
|
||
|
padding: 10px;
|
||
|
width: 100%;
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div class="signup-container">
|
||
|
<h1>Seller Signup</h1>
|
||
|
<form class="signup-form">
|
||
|
<div class="form-group">
|
||
|
<label for="seller-name">Full Name:</label>
|
||
|
<input type="text" id="seller-name" name="seller-name" required>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label for="seller-email">Email:</label>
|
||
|
<input type="email" id="seller-email" name="seller-email" required>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label for="seller-password">Password:</label>
|
||
|
<input type="password" id="seller-password" name="seller-password" required>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label for="seller-business-name">Business Name:</label>
|
||
|
<input type="text" id="seller-business-name" name="seller-business-name" required>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label for="seller-contact">Contact Number:</label>
|
||
|
<input type="tel" id="seller-contact" name="seller-contact" required>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label for="seller-address">Address:</label>
|
||
|
<textarea id="seller-address" name="seller-address" required></textarea>
|
||
|
</div>
|
||
|
<button type="submit">Register as Seller</button>
|
||
|
</form>
|
||
|
|
||
|
<!-- Back Button below the form -->
|
||
|
<a href="index.html" class="back-btn">Back</a>
|
||
|
</div>
|
||
|
|
||
|
<!-- Footer below the back button -->
|
||
|
<footer>
|
||
|
<p>© 2025 GREENTECH. All rights reserved.</p>
|
||
|
</footer>
|
||
|
|
||
|
<script>
|
||
|
// Get the seller signup form
|
||
|
const sellerSignupForm = document.querySelector('.signup-form');
|
||
|
|
||
|
// Handle seller registration
|
||
|
sellerSignupForm.addEventListener('submit', (event) => {
|
||
|
event.preventDefault(); // Prevent form submission
|
||
|
|
||
|
// Get form values
|
||
|
const name = document.getElementById('seller-name').value.trim();
|
||
|
const email = document.getElementById('seller-email').value.trim();
|
||
|
const password = document.getElementById('seller-password').value;
|
||
|
const businessName = document.getElementById('seller-business-name').value.trim();
|
||
|
const contact = document.getElementById('seller-contact').value.trim();
|
||
|
const address = document.getElementById('seller-address').value.trim();
|
||
|
|
||
|
// Check if the email is already registered
|
||
|
const users = JSON.parse(localStorage.getItem('users')) || {};
|
||
|
if (users[email]) {
|
||
|
alert('Email is already registered. Please use a different email.');
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
// Save seller details to localStorage
|
||
|
users[email] = {
|
||
|
name,
|
||
|
password,
|
||
|
businessName,
|
||
|
contact,
|
||
|
address,
|
||
|
userType: 'Seller'
|
||
|
};
|
||
|
localStorage.setItem('users', JSON.stringify(users));
|
||
|
|
||
|
// Redirect to the login page
|
||
|
alert('Registration successful! Redirecting to the login page...');
|
||
|
window.location.href = 'login.html'; // Redirect to the login page
|
||
|
});
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|