Quivara's picture
Fresh upload with LFS
bdb271a
raw
history blame
3.64 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ALISTO | Command Login</title>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&family=Roboto:wght@400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
<style>
/* Specific overrides for Login Page centering */
body.login-page {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
background: #121212 url('images/bg2-logan.jpg') center/cover no-repeat;
}
.login-card {
position: relative; z-index: 2;
background: rgba(30, 30, 30, 0.9);
padding: 40px;
border-radius: 15px;
border: 1px solid #ed4801;
width: 100%; max-width: 400px;
text-align: center;
box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}
.overlay {
position: absolute; top: 0; left: 0; width: 100%; height: 100%;
background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(5px); z-index: 1;
}
input {
width: 100%; padding: 15px; margin-bottom: 15px;
background: rgba(255,255,255,0.1); border: 1px solid #444;
border-radius: 8px; color: white; font-size: 1rem; outline: none;
}
button {
width: 100%; padding: 15px;
background: linear-gradient(135deg, #ed4801, #ff7e42);
color: white; border: none; border-radius: 8px;
font-size: 1.1rem; font-weight: bold; cursor: pointer;
}
</style>
</head>
<body class="login-page">
<div class="overlay"></div>
<div class="login-card">
<h1 style="color: #ed4801; font-family: 'Montserrat'; margin: 0;">ALISTO</h1>
<p style="color: #ccc; letter-spacing: 2px; font-size: 0.8em; text-transform: uppercase; margin-bottom: 30px;">Command Center</p>
<p id="error-msg" style="color: #ff4444; font-size: 0.9em; min-height: 20px;"></p>
<form id="loginForm">
<input type="text" id="username" placeholder="Officer ID" required>
<input type="password" id="password" placeholder="Password" required>
<button type="submit">Login</button>
</form>
</div>
<script>
document.getElementById('loginForm').addEventListener('submit', async (e) => {
e.preventDefault();
const u = document.getElementById('username').value;
const p = document.getElementById('password').value;
const btn = document.querySelector('button');
const err = document.getElementById('error-msg');
btn.innerText = "Authenticating...";
try {
const res = await fetch('/api/login', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({username: u, password: p})
});
if (res.ok) {
window.location.href = "/";
} else {
const data = await res.json();
err.innerText = data.message || "Access Denied";
btn.innerText = "ACCESS SYSTEM";
}
} catch (e) {
err.innerText = "Connection Failed";
btn.innerText = "ACCESS SYSTEM";
}
});
</script>
</body>
</html>