forked from gdg-network/green-dog-group-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
75 lines (72 loc) · 2.22 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
}
.container {
max-width: 300px;
margin: 0 auto;
padding: 20px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
input[type="password"] {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 3px;
}
button {
width: 100%;
padding: 10px;
background-color: #0000ff;
color: #fff;
border: none;
border-radius: 3px;
cursor: pointer;
}
/* Additional styles */
h1 {
font-size: 24px;
margin-bottom: 20px;
color: #333;
}
</style>
<title>Login Page</title>
</head>
<body>
<div class="container">
<h1>Login</h1>
<input type="password" id="password" placeholder="Enter Password">
<button onclick="checkPassword()">Login</button>
</div>
<script>
let loginAttempts = 0;
const maxAttempts = 5;
function checkPassword() {
const enteredPassword = document.getElementById("password").value;
const expectedPassword = "green dog group";
if (enteredPassword === expectedPassword) {
window.location.href = "/static/rizz.html";
} else {
loginAttempts++;
const remainingAttempts = maxAttempts - loginAttempts;
if (remainingAttempts === 0) {
document.getElementById("password").disabled = true;
alert("No more attempts. Access denied.");
} else {
const attemptText = remainingAttempts === 1 ? "1 attempt" : `${remainingAttempts} attempts`;
alert(`Access denied. ${attemptText} remaining.`);
}
}
}
</script>
</body>
</html>