-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
106 lines (56 loc) · 2.11 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login | Facebook Clone</title>
<link rel="stylesheet" href="login.css">
<link rel="shortcut icon" href="images/Facebook_f_logo_(2021).svg" type="image/x-icon">
</head>
<body>
<div class="container">
<div class="login-txt">
<h1>facebook</h1>
<b> <p>
Connect with friends and the world around you on Facebook.
</p></b>
</div>
<div class="login">
<input type="email" class="email" placeholder="Email or phone number">
<input type="password" class="password" placeholder="Password">
<a href="home.html" id="btn-login" class="login-btn" >Login</a>
<a href="#" class="forgot">Forgot Password?</a>
<a href="#" id="btn-login" class="new">Get email and password</a>
</div>
</div>
<script>
const newBtn = document.querySelector('.new');
const email = document.querySelector(".email");
const password = document.querySelector(".password");
const loginBtn = document.querySelector(".login-btn");
function updateThem() {
if (email.value === 'hello@gmail.com' && password.value === '123123fa') {
loginBtn.style.cursor = 'pointer';
loginBtn.style.backgroundColor = "#2374E1";
loginBtn.disabled = false;
loginBtn.addEventListener("click",()=>{
window.location.href = "home.html";
})
}else {
loginBtn.style.cursor = 'no-drop';
loginBtn.style.backgroundColor = 'rgba(0,0,0,0.2)';
loginBtn.disabled = true;
loginBtn.addEventListener("click",(e)=>{
e.preventDefault();
})
}
}
window.onload = updateThem;
email.addEventListener('input', updateThem);
password.addEventListener('input', updateThem);
newBtn.addEventListener("click",()=>{
alert("Email: hello@gmail.com\npassword:123123fa")
})
</script>
</body>
</html>