Spaces:
Configuration error
Configuration error
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Login - Crime Prediction System</title> | |
<style> | |
body { | |
font-family: Arial, sans-serif; | |
background: url('{{ url_for('static', filename='videos/crime.avif') }}') no-repeat center center fixed; | |
background-size: cover; | |
color: #fff; | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
height: 100vh; | |
margin: 0; | |
} | |
.video-background { | |
position: fixed; | |
right: 0; | |
bottom: 0; | |
min-width: 100%; | |
min-height: 100%; | |
width: auto; | |
height: auto; | |
z-index: -1; | |
background: url('{{ url_for('static', filename='videos/crime.avif') }}') no-repeat center center fixed; | |
background-size: cover; | |
} | |
.login-container { | |
background: rgba(0, 0, 0, 0.8); | |
padding: 30px; | |
border-radius: 10px; | |
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); | |
text-align: center; | |
width: 300px; | |
position: relative; | |
} | |
.login-container h1 { | |
margin-bottom: 20px; | |
} | |
.logo { | |
margin-bottom: 20px; | |
} | |
.input-group { | |
margin-bottom: 15px; | |
text-align: left; | |
} | |
.input-group label { | |
display: block; | |
margin-bottom: 5px; | |
} | |
.input-group input { | |
width: 100%; | |
padding: 10px; | |
border: none; | |
border-radius: 5px; | |
} | |
button { | |
width: 100%; | |
padding: 10px; | |
background: #d63031; | |
border: none; | |
border-radius: 5px; | |
color: #fff; | |
font-size: 16px; | |
cursor: pointer; | |
} | |
button:hover { | |
background: #e84343; | |
} | |
.error-message { | |
margin-top: 15px; | |
color: #ff6b6b; | |
display: none; | |
} | |
</style> | |
</head> | |
<body> | |
<video autoplay loop muted class="video-background"> | |
<source src="{{ url_for('static', filename='videos/crime_login.mp4') }}" type="video/mp4"> | |
</video> | |
<div class="login-container"> | |
<img src="{{ url_for('static', filename='images/logo.png') }}" alt="Logo" class="logo"> | |
<h1>Crime Prediction System</h1> | |
<form id="loginForm" onsubmit="return validateLogin()"> | |
<div class="input-group"> | |
<label for="username">Username</label> | |
<input type="text" id="username" name="username" required> | |
</div> | |
<div class="input-group"> | |
<label for="password">Password</label> | |
<input type="password" id="password" name="password" required> | |
</div> | |
<button type="submit">Login</button> | |
</form> | |
<p id="errorMessage" class="error-message"></p> | |
</div> | |
<script> | |
function validateLogin() { | |
const username = document.getElementById('username').value; | |
const password = document.getElementById('password').value; | |
const errorMessage = document.getElementById('errorMessage'); | |
if (username === 'admin' && password === 'admin123') { | |
window.location.href = 'https://super-umbrella-pj7j4xpp49v9c6g4g-5000.app.github.dev/index'; | |
return false; | |
} else { | |
errorMessage.textContent = 'Invalid username or password'; | |
errorMessage.style.display = 'block'; | |
return false; | |
} | |
} | |
</script> | |
</body> | |
</html> | |