This repository has been archived by the owner on Jan 23, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
199 lines (150 loc) · 6.5 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="MYPROJECT.css"/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.0.1/remixicon.css"
/>
</head>
<body>
<header class="header" id="header">
<nav class="nav container">
<a href="#" class="nav__logo">
<img
src="C:\Users\soman\OneDrive\Desktop\OfficialLogoedited.jpg"
alt="PixelQuest Logo" class="as"
width="70px"
height="50px"
/>
</a>
<div class="nav__menu" id="nav__menu">
<ul class="nav__list">
<li class="nav__item">
<a href="#" class="nav__link">Home</a>
</li>
<li class="nav__item">
<a href="#" class="nav__link">About</a>
</li>
<li class="nav__item">
<a href="#" class="nav__link">Explore</a>
</li>
<li class="nav__item">
<a href="creators.html" class="nav__link">Creators</a>
</li>
<li class="nav__item">
<a href="about NFTs.html" class="nav__link">Collections</a>
</li>
<li class="nav__item">
<a href="#" class="nav__link">Blog</a>
</li>
<li class="nav__item">
<a href="#" class="nav__link">Contact</a>
</li>
</ul>
<div class="nav__close" id="nav__close">
<i class="ri-close-line"></i>
</div>
</div>
<div class="nav__actions">
<i class="ri-search-line nav__search" id="search-btn"></i>
<i class="ri-user-line nav__login" id="login-btn"></i>
<div class="nav__toggle" id="nav__toggle">
<i class="ri-menu-line"></i>
</div>
</div>
</nav>
</header>
<div class="search" id="search">
<form action="" class="search__form">
<i class="ri-search-line search__icon"></i>
<input type="search" placeholder="Search..." class="search__input" />
</form>
<i class="ri-close-line search__close" id="search-close"></i>
</div>
<div class="login" id="login">
<form id="login__form" class="login__form">
<h2 class="login__title">Log In</h2>
<div class="login__group">
<div>
<label for="email" class="login__label">Email</label>
<input type="email" placeholder="Write Your Email" id="email" class="login__input">
</div>
<div>
<label for="password" class="login__label">Password</label>
<input type="password" placeholder="Enter Your Password" id="password" class="login__input">
</div>
</div>
<div>
<p class="login__signup">
Do not have an account? <a href="signup.html">Sign Up</a>
</p>
<a href="#" class="login__forgot">
You forgot your password
</a>
<button type="submit" class="login__button" >Log In</button>
</div>
</form>
<i class="ri-close-line login__close" id="login-close"></i>
</div>
<main class="main">
<img src="" alt="" class="main__bg" />
</main>
<div class="homepage"> <h1 class="homepage_text">
Dive into the pixelated revolution: our NFT Marketplace</h1>
<div class="xyz">
<img class="NFTimage"
src="C:\Users\soman\Downloads\Untitled design (1).jpg" ></div>
</div>
<script src="main1.js"></script>
<script src="pixelquest.js"></script>
<script type="module">
// Import the functions you need from the SDKs you need
import { initializeApp } from "https://www.gstatic.com/firebasejs/10.7.1/firebase-app.js";
import { getDatabase, update, ref } from "https://www.gstatic.com/firebasejs/10.7.1/firebase-database.js";
import { getAuth, signInWithEmailAndPassword } from "https://www.gstatic.com/firebasejs/10.7.1/firebase-auth.js";
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "AIzaSyD6ZQnZZ6jjEPKeBIA-IPqGuJxQ0rSY1JE",
authDomain: "pixel-quest-auth.firebaseapp.com",
databaseURL: "https://pixel-quest-auth-default-rtdb.firebaseio.com",
projectId: "pixel-quest-auth",
storageBucket: "pixel-quest-auth.appspot.com",
messagingSenderId: "895959964522",
appId: "1:895959964522:web:c02f7eb05714e4b1c06313"
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
const database = getDatabase(app);
const auth = getAuth();
document.getElementById('login__form').addEventListener("submit", (event) => {
event.preventDefault();
// Handle the login logic here
const email = document.getElementById("email").value;
const password = document.getElementById("password").value;
signInWithEmailAndPassword(auth, email, password)
.then((userCredential) => {
// Signed in
const dt = new Date();
const user = userCredential.user;
update(ref(database, 'users/' + user.uid), {
last_login: dt,
});
// Alert user and redirect after successful login
// alert('Logged In');
// Redirect the user to another webpage after successful login
window.location.href = "MYPROJECT.html";
})
.catch((error) => {
const errorCode = error.code;
const errorMessage = error.message;
console.error('Error during login:', errorCode, errorMessage);
// Handle login error
});
});
</script>
</body>
</html>