-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
200 lines (192 loc) · 6.4 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
200
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login - AquaBrain Net</title>
<link rel="icon" type="image/png" href="https://dominionsolutions.co.za/wp-content/uploads/2024/02/dominionsolutions.png">
<style>
body {
background: linear-gradient(180deg, #012246, #005f73);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
font-family: 'Roboto', sans-serif;
padding: 10px;
box-sizing: border-box;
}
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex-grow: 1;
}
.logo {
margin-bottom: 20px;
}
.logo img {
border-radius: 15px;
}
.login-container {
background-color: #f8fafc;
padding: 40px;
border-radius: 8px;
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
text-align: center;
width: 100%;
max-width: 400px;
box-sizing: border-box;
}
.login-container h1 {
margin-bottom: 30px;
font-size: 28px;
color: #1e293b;
font-family: 'Montserrat', sans-serif;
}
.login-container input {
width: 100%;
padding: 10px;
margin: 10px 0;
border: 1px solid #e2e8f0;
border-radius: 4px;
box-sizing: border-box;
}
.login-container button {
width: 100%;
padding: 10px;
background-color: #3b82f6;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
box-sizing: border-box;
}
.login-container button:hover {
background-color: #2563eb;
}
.forgot-password {
margin-top: 10px;
}
.forgot-password a {
color: #3b82f6;
text-decoration: none;
}
.forgot-password a:hover {
text-decoration: underline;
}
.signup-link {
margin-top: 20px;
font-size: 14px;
}
.signup-link a {
color: #3b82f6;
text-decoration: none;
}
.signup-link a:hover {
text-decoration: underline;
}
.footer {
text-align: center;
}
.footer .logo-container {
margin-bottom: 10px;
}
.footer .logo-container img {
width: 60px;
height: auto;
}
.footer .copyright {
font-size: 12px;
color: #f8fafc;
}
@media (max-width: 600px) {
.login-container {
padding: 20px;
}
.login-container h1 {
font-size: 24px;
}
.login-container input, .login-container button {
font-size: 14px;
}
.footer .logo-container img {
width: 50px;
}
}
</style>
</head>
<body>
<div class="container">
<div class="logo">
<img src="https://i.ibb.co/hX2r0Rw/AquaBrain-Net.png" alt="AquaBrain Net Logo">
</div>
<div class="login-container">
<h1>AquaBrain Net</h1>
<input type="text" placeholder="Username" id="username">
<input type="password" placeholder="Password" id="password">
<button onclick="login()">Login</button>
<div class="forgot-password">
<a href="#">Forgot Password?</a>
</div>
<div class="signup-link">
<p>Don't have an account? <a href="signup.html">Sign up</a></p>
</div>
</div>
</div>
<div class="footer">
<div class="logo-container">
<a href="index.html">
<img src="https://dominionsolutions.co.za/wp-content/uploads/2024/02/dominionsolutions.png" alt="Dominion Solutions Logo">
</a>
</div>
<div class="copyright">
© 2024 AquaBrain Net. All rights reserved.
</div>
</div>
<script>
const testUsers = {
"TheeOracle": "one",
"Thembeka": "Meow",
"Dalton": "Meow"
};
let signedUpUsers = JSON.parse(localStorage.getItem('signedUpUsers')) || {};
function login() {
const username = document.getElementById('username').value;
const password = document.getElementById('password').value;
if (testUsers[username] && testUsers[username] === password) {
redirectToDashboard(username);
return;
}
if (signedUpUsers[username] && signedUpUsers[username] === password) {
redirectToDashboard(username);
return;
}
alert("Invalid username or password. Please try again or sign up.");
}
function redirectToDashboard(username) {
const userDetails = JSON.parse(localStorage.getItem(username));
const params = new URLSearchParams(userDetails).toString();
window.location.href = 'dashboard.html?' + params;
}
function simulateSignUp(username, password, companyName, location, contactName, mobileNumber) {
signedUpUsers[username] = password;
localStorage.setItem('signedUpUsers', JSON.stringify(signedUpUsers));
const userDetails = {
username,
companyName,
location,
contactName,
mobileNumber
};
localStorage.setItem(username, JSON.stringify(userDetails));
}
simulateSignUp("TheeOracle", "one", "Oracle Inc", "Johannesburg", "TheeOracle", "1234567890");
simulateSignUp("Thembeka", "Meow", "Thembeka Farm", "Cape Town", "Thembeka", "0987654321");
</script>
</body>
</html>