-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
31 lines (30 loc) · 1.37 KB
/
Copy pathindex.js
File metadata and controls
31 lines (30 loc) · 1.37 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
// Initialize AOS (Animate On Scroll)
AOS.init({
duration: 1000,
once: true,
offset: 100
});
// Login/Sign Up Toggle
document.getElementById('showLogin').addEventListener('click', function(e) {
e.preventDefault();
document.querySelector('h2').textContent = 'Login';
document.querySelector('form').innerHTML = `
<div class="mb-3" data-aos="fade-right">
<label for="loginEmail" class="form-label">Email address</label>
<input type="email" class="form-control" id="loginEmail" placeholder="Enter your email">
</div>
<div class="mb-3" data-aos="fade-right" data-aos-delay="200">
<label for="loginPassword" class="form-label">Password</label>
<input type="password" class="form-control" id="loginPassword" placeholder="Enter password">
</div>
<button type="submit" class="btn btn-primary w-100" data-aos="zoom-in" data-aos-delay="400">Login</button>
`;
document.querySelector('.text-center').innerHTML = `
<p>Don't have an account? <a href="#" id="showSignUp">Sign up here</a></p>
<p><a href="index.html">Back to Home</a></p>
`;
document.getElementById('showSignUp').addEventListener('click', function(e) {
e.preventDefault();
location.reload(); // reload to show sign-up form again
});
});