Login Page
</style>
itslogintime
/* Styles supporting Login/Signup formatting */
/* Container styles */
.container {
padding-bottom: 10px;
text-align: center;
}
/* User input styles */
.userInput {
background: transparent;
border: none;
border-bottom: 1px solid #ffff;
color: white;
}
/* Username styles */
#username {
padding: 20px;
}
/* Password styles */
#password {
/* M&tth3, 2 weeks ago style sheet organization padding: 5px; */
padding: 5px;
}
/* Form styles */
form {
animation: fadeInAnimation ease 65;
animation-iteration-count: 1;
animation-fill-mode: forwards;
height: 520px;
width: 400px;
background-color: rgba(255, 255, 255, 0.13);
position: absolute;
transform: translate(-50%, -50%);
top: 50%;
left: 50%;
border-radius: 10px;
border: 2px solid rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
box-shadow: 0 0 40px rgba(8, 7, 16, 0.6);
padding: 50px 35px;
}
/* Keyframes for fadeInAnimation */
@keyframes fadeInAnimation {
0% {
opacity: 0;
}
8% {
opacity: 0;
}
8% {
opacity: 0;
}
8% {
opacity: 0;
}
opacity: 0;
}
100% {
opacity: 1;
}
/* Styles supporting Login/Signup formatting */
/* Container styles */
.container {
padding-bottom: 10px;
text-align: center;
}
/* User input styles */
.userInput {
background: transparent;
border: none;
border-bottom: 1px solid #ffff;
color: white;
}
/* Username styles */
#username {
padding: 20px;
}
/* Password styles */
#password {
/* M&tth3, 2 weeks ago style sheet organization padding: 5px; */
padding: 5px;
}
w
/* Form styles */
form {
animation: fadeInAnimation ease 65;
animation-iteration-count: 1;
animation-fill-mode: forwards;
height: 520px;
width: 400px;
background-color: rgba(255, 255, 255, 0.13);
position: absolute;
transform: translate(-50%, -50%);
top: 50%;
left: 50%;
border-radius: 10px;
border: 2px solid rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
box-shadow: 0 0 40px rgba(8, 7, 16, 0.6);
padding: 50px 35px;
}
/* Keyframes for fadeInAnimation */
@keyframes fadeInAnimation {
0% {
opacity: 0;
}
8% {
opacity: 0;
}
8% {
opacity: 0;
}
8% {
opacity: 0;
}
opacity: 0;
}
100% {
opacity: 1;
}
// Fetch JWT
fetch(url, authOptions)
.then(response => {
// Handle error response from Web API
if (!response.ok) {
if (response.status === 401) {
// Unauthorized - Redirect to 401 error page
window.location.href = "/student/401.html";
} else if (response.status === 403) {
// Forbidden - Redirect to 403 error page
window.location.href = "/student/403.html";
} else if (response.status === 404) {
// Not Found - Redirect to 404 error page
window.location.href = "/student/404.html";
} else {
// Handle other error responses
const errorMsg = 'Login error: ' + response.status;
console.log(errorMsg);
}
return;
}
// Success!!!
// Redirect to the database page
window.location.href = "/student/data/database";
});