-
Notifications
You must be signed in to change notification settings - Fork 2
/
signUp.html
202 lines (188 loc) · 6.26 KB
/
signUp.html
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Meesho SignUp</title>
<link rel="icon" href="./images/meesho_icon.jpg" />
<link rel="stylesheet" href="./styles/navbar.css" />
<link rel="stylesheet" href="./styles/index.css" />
<link rel="stylesheet" href="./styles/signup.css" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css"
/>
</head>
<body>
<header>
<section class="header">
<div class="headerLeft">
<div class="logoContainer">
<a href="index.html"
><img src="./images/HomePage/NavBar/logo.png"
/></a>
</div>
<!--Search Box-->
<div class="searchInputContainer">
<div class="searchIcon">
<img src="./images/HomePage/NavBar/search.png" />
</div>
<form action="" id="inputForm">
<input
type="text"
placeholder="Try Saree, Kurti or Search by Product Code"
class="inputSearch"
/>
</form>
<div class="inputCloseSearch">
<i class="fa-solid fa-xmark" id="closeSearch"></i>
</div>
<div class="searchRecentProduct">
<h3>Recent Searches</h3>
<div class="listofRecent"></div>
</div>
</div>
</div>
<div class="headerRight">
<div class="downloadContainer">
<div class="mobileIcon">
<img src="./images/HomePage/NavBar/mobile.png" />
</div>
<p>Download App</p>
<div class="downloadHoverBtnContainer">
<h3>Download From</h3>
<a href="" class="downloadBtn">
<img
src="https://images.meesho.com/images/pow/playstore-icon-big.webp"
/>
</a>
<a href="" class="downloadBtn">
<img
src="https://images.meesho.com/images/pow/appstore-icon-big.webp"
/>
</a>
</div>
</div>
<div class="becomeSupplierContainer">
<p>Become a Supplier</p>
</div>
</div>
</section>
</header>
<div id="CardContainer">
<div id="main-card">
<div id="image">
<a href="#"
><img
src="https://images.meesho.com/images/marketing/1661417516766.webp"
/></a>
</div>
<div id="inner-card">
<div id="inner-card-h6">
<h6>Sign Up to view your profile</h6>
</div>
<div id="inner-card-country">
<span
id="inner-card-country-c"
font-size="12px"
font-weight="book"
color="greyT2"
class="sc-gswNZR eSwJjG"
></span>
</div>
<div id="inner-card-num">
<span
id="inner-card-country-9"
font-size="16px"
font-weight="demi"
color="greyBase"
class="sc-gswNZR exDxE"
></span>
<input id="inner-card-phn" type="email" placeholder="E-mail" />
<input id="inner-card-pas" type="password" placeholder="password" />
</div>
</div>
<div id="mid-card-btn">
<a href="#"><button id="mid-card-btn-btn">Sign Up</button></a>
</div>
<div id="last-card"></div>
<div id="last-card-2">
<p>By continuing, you agree to Meesho’s</p>
<span style="color: #f980ab">Terms and Conditions</span>
<span> and</span> <span style="color: #f980ab"> Privacy Policy</span>
</div>
</div>
</div>
</body>
<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
</html>
<script type="module">
// Import the functions you need from the SDKs you need
import { initializeApp } from "https://www.gstatic.com/firebasejs/9.15.0/firebase-app.js";
import {
getAuth,
createUserWithEmailAndPassword,
signInWithEmailAndPassword,
} from "https://www.gstatic.com/firebasejs/9.15.0/firebase-auth.js";
import {
getDatabase,
set,
ref,
} from "https://www.gstatic.com/firebasejs/9.15.0/firebase-database.js";
const firebaseConfig = {
apiKey: "AIzaSyCjfUlQxcKQgC300166izupqNO6kdODio0",
authDomain: "form-login-797f8.firebaseapp.com",
projectId: "form-login-797f8",
storageBucket: "form-login-797f8.appspot.com",
messagingSenderId: "989496987982",
appId: "1:989496987982:web:3d325232334fa8d35a4e1f",
};
const app = initializeApp(firebaseConfig);
const auth = getAuth(app);
const database = getDatabase(app);
var signup = document.getElementById("mid-card-btn-btn");
signup.addEventListener("click", (e) => {
var email = document.getElementById("inner-card-phn").value;
let password = document.getElementById("inner-card-pas").value;
createUserWithEmailAndPassword(auth, email, password)
.then((userCredential) => {
// Signed in
const user = userCredential.user;
set(ref(database, "users/" + user.uid), {
username: email,
password: password,
})
.then(() => {
// Data saved successfully!
Swal.fire({
position: "top",
icon: "success",
title: "SignUp Successfull",
showConfirmButton: false,
timer: 1500,
});
// window.location.href = "signIn.html";
setTimeout(() => {
window.location.href = "signIn.html";
},0);
})
.catch((error) => {
// The write failed...
console.log(error);
});
// alert("signed in ")
// ...
})
.catch((error) => {
const errorCode = error.code;
const errorMessage = error.message;
Swal.fire({
icon: "error",
title: "Oops...",
text: errorMessage,
footer: '<a href="">Why do I have this issue?</a>',
});
});
});
</script>