-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathloggingin.html
155 lines (137 loc) · 4.69 KB
/
loggingin.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Team Login</title>
<style>
/* General Dark Mode Styles */
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #121212;
color: #ffffff;
margin: 0;
overflow: hidden;
flex-direction: column;
}
/* Login Container */
.login-container {
background: linear-gradient(to right, #1e1e1e, #2a2a2a);
padding: 25px;
border-radius: 12px;
box-shadow: 1px 1px 20px white;
text-align: center;
width: 90%;
max-width: 350px;
border: 2px solid #444;
}
/* Header */
h2 {
font-family: "Verdana", sans-serif;
font-size: 1.8em;
color: #fff;
margin-bottom: 15px;
}
/* Labels */
label {
display: block;
text-align: left;
font-weight: bold;
margin-top: 10px;
color: #ddd;
}
/* Inputs */
input {
width: 100%;
padding: 12px;
margin: 5px 0;
border: 2px solid #66a3ff;
border-radius: 6px;
box-sizing: border-box;
font-size: 1em;
background-color: #333;
color: white;
}
/* Login Button */
button[type="submit"] {
width: 60%;
padding: 12px;
background: linear-gradient(to right, #28a745, #218838);
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
margin-top: 15px;
font-weight: bold;
font-size: 1.1em;
box-shadow: 0px 0px 10px green;
transition: transform 0.2s, box-shadow 0.2s;
}
button[type="submit"]:hover {
transform: scale(1.05);
box-shadow: 0px 0px 15px green;
}
/* Error Message */
.error-message {
color: red;
font-size: 0.9em;
margin-top: 10px;
font-weight: bold;
}
/* Logo */
.logo {
width: 150px;
height: auto;
margin-bottom: 10px;
border-radius: 10px;
}
/* Input Focus Effect */
input:focus {
border-color: blue;
box-shadow: 0px 0px 15px blue;
outline: none;
}
</style>
</head>
<body>
<div class="login-container">
<img src="cdo-logo.png" alt="CDO Logo" class="logo">
<h2>Team Login</h2>
<form id="loginForm">
<label for="teamName">Team Name:</label>
<input type="text" id="teamName" name="teamName" required>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
<button type="submit">Login</button>
<p id="error-message" class="error-message"></p>
</form>
</div>
<script>
document.addEventListener("DOMContentLoaded", function() {
const loginForm = document.getElementById("loginForm");
const errorMessage = document.getElementById("error-message");
loginForm.addEventListener("submit", function(event) {
event.preventDefault();
const teamName = document.getElementById("teamName").value;
const password = document.getElementById("password").value;
// Dummy credentials with associated redirects
const validTeams = {
"admin": { password: "badmin", redirectUrl: "admin-panel.html"},
"Team1": { password: "M3dic1neM@n", redirectUrl: "shop-team1.html" },
"Team2": { password: "Pa7ientR0om", redirectUrl: "shop-team2.html" },
"Team3": { password: "UAmed1c4lRock5", redirectUrl: "shop-team3.html" }
};
if (validTeams[teamName] && validTeams[teamName].password === password) {
window.location.href = validTeams[teamName].redirectUrl;
} else {
errorMessage.textContent = "Invalid team name or password.";
}
});
});
</script>
</body>
</html>