-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
63 lines (55 loc) · 2.18 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
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="style.css">
<script src="https://kit.fontawesome.com/4c4c5fbf1e.js" crossorigin="anonymous"></script>
<title>Login/Signup</title>
</head>
<body>
<div class="container">
<div class="form-box">
<h1 id="title">Sign Up</h1>
<form action="">
<div class="input-group">
<div class="input-field" id="nameField">
<i class="fa-regular fa-user"></i>
<input type="text" placeholder="Name">
</div>
<div class="input-field">
<i class="fa-solid fa-envelope-circle-check"></i>
<input type="email" placeholder="Email">
</div>
<div class="input-field">
<i class="fa-solid fa-lock"></i>
<input type="password" placeholder="password">
</div>
<div class="btn-field">
<button type="button" id="signinBtn" class="disable">Sign In</button>
<button type="button" id="signupBtn">Sign Up</button>
</div>
<br>
<p> <a href="#">Forgot Password</a></p>
</div>
</form>
</div>
</div>
<script>
let signupBtn=document.getElementById("signupBtn");
let signinBtn=document.getElementById("signinBtn");
let nameField=document.getElementById("nameField");
let title=document.getElementById("title");
signinBtn.onclick=function(){
nameField.style.maxHeight="0";
title.innerHTML="Sign In";
signupBtn.classList.add("disable");
signinBtn.classList.remove("disable");
}
signupBtn.onclick=function(){
nameField.style.maxHeight="60px";
title.innerHTML="Sign UP";
signinBtn.classList.add("disable");
signupBtn.classList.remove("disable");
}
</script>
</body>
</html>