-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
136 lines (121 loc) · 2.69 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>EDGE-FOG-CLOUD ITMS LOGIN</title>
<style>
body {
background-color: #f5f5f5;
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
header {
background-color: #4CAF50;
color: white;
display: flex;
align-items: center;
justify-content: center;
height: 60px;
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 1;
}
footer {
background-color: #333;
color: white;
display: flex;
align-items: center;
justify-content: center;
height: 40px;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
z-index: 1;
}
form {
text-align: center;
background-color: #fff;
border-radius: 10px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-top: 100px;
padding: 20px;
max-width: 400px;
width: 90%;
}
input {
background-color: #f5f5f5;
border-radius: 5px;
border: none;
font-size: 16px;
margin: 10px 0;
padding: 10px;
width: 100%;
}
button {
background-color: #4CAF50;
border: none;
border-radius: 5px;
color: white;
cursor: pointer;
font-size: 16px;
margin: 20px 0;
padding: 10px;
width: 100%;
}
.error {
color: red;
margin-top: 10px;
}
@media (min-width: 768px) {
form {
margin-top: 150px;
}
}
</style>
</head>
<body>
<header>
<h1> EDGE-FOG-CLOUD ITMS Cloud Server Login</h1>
</header>
<div align="center">
<form align="center" method="POST">
<label for="username">Username:</label>
<input type="text" id="username" name="username" placeholder="Enter your username">
<label for="password">Password:</label>
<input type="password" id="password" name="password" placeholder="Enter your password">
<button type="submit">Login</button>
<p class="error" id="error"></p>
</form>
</div>
<footer>
<p>© 2023 EDGE-FOG-CLOUD ITMS</p>
</footer>
<script>
// Default username and password
const defaultUsername = "admin";
const defaultPassword = "admin";
// Get form and error message elements
const form = document.querySelector("form");
const error = document.querySelector("#error");
form.addEventListener("submit", (event) => {
event.preventDefault();
const username = form.elements.username.value;
const password = form.elements.password.value;
if (username === defaultUsername && password === defaultPassword) {
window.location.href = "management.html";
} else {
error.textContent = "Invalid username or password.";
}
});
</script>
</body>
</html>