forked from ReeteshShrivastava/PlantOrder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSingUp.html
More file actions
117 lines (99 loc) · 3.95 KB
/
SingUp.html
File metadata and controls
117 lines (99 loc) · 3.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Green paradise SingUp</title>
<link rel="stylesheet" href="./CSS/SingUp.css">
<link rel="stylesheet" href="./CSS/navbar.css">
<link rel="stylesheet" href="./CSS/footer.css">
<link rel="stylesheet" href="./CSS/style.css">
<!-- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT Mono"/> -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
</head>
<body>
<div id="nav-bar"></div>
<div id="navbar"></div>
<div id="popup">
<table></table>
</div>
<div id="sgnup">
<div class="container">
<div class="login-form">
<h1>Create account</h1>
<form id="registration_form">
<p class="form-p1">Your name</p>
<input type="text" id="name" placeholder="Enter your first and last name" required>
<p class="form-p1">Email</p>
<input type="text" id="email" placeholder="Enter your email" required>
<p class="form-p1">Password</p>
<input type="password" id="password" placeholder="Enter your password" required autocomplete="on">
<button type="button" id="register">Continue</button>
<p class="form-p2">By creating an account, you agree to Green paradise's <br><a href="">Conditions of Use
</a>and <a href="">Privacy Notice.</a></p>
<a href="">Need Help?</a>
</form>
</div>
</div>
<div class="Amazon-singin">
<p>Already have an account? <a href="./SingIn.html">Sign in</a></p>
<p>Buying for work? <a href="">Create a free business account</a></p>
</div>
<div class="foot-last">
<div class="pages">
<a href="">Conditions of Use</a>
<a href="">Privacy Notice</a>
<a href="">Help</a>
</div>
<div class="copyright">
© 1996-2023, Green paradise, Inc. or its affiliates
</div>
</div>
</div>
</div>
<div id="footer" style="background-color: #fff;"></div>
</body>
</html>
<script type="module" src="./SCRIPTS/index.js"></script>
<script type="module">
// Import the functions you need from the SDKs you need
import { initializeApp } from "https://www.gstatic.com/firebasejs/9.23.0/firebase-app.js";
import { getAuth, createUserWithEmailAndPassword } from "https://www.gstatic.com/firebasejs/9.23.0/firebase-auth.js";
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "AIzaSyBMIL67ViXQEh_whvTjgVziJUU_vM6XZck",
authDomain: "plantorder-91f12.firebaseapp.com",
projectId: "plantorder-91f12",
storageBucket: "plantorder-91f12.appspot.com",
messagingSenderId: "990590263180",
appId: "1:990590263180:web:20c3d28cd68ddcbe5c40a9"
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
console.log(app);
const auth = getAuth();
document.getElementById("register").addEventListener("click", function () {
let email = document.getElementById("email").value;
let password = document.getElementById("password").value;
let name = document.getElementById("name").value;
createUserWithEmailAndPassword(auth, email, password)
.then((userCredential) => {
// Signed in
const user = userCredential.user;
alert("Registered Succesfully");
console.log(user);
// ...
})
.catch((error) => {
const errorCode = error.code;
const errorMessage = error.message;
alert("Registered Not Succesfully");
console.log(errorMessage)
// ..
});
})
</script>