mirror of
https://github.com/idrainformatica/RoadmapMaker.git
synced 2026-04-18 06:53:48 +02:00
274 lines
7.6 KiB
HTML
274 lines
7.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="it">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Admin Login - Roadmap</title>
|
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
min-height: 100vh;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 20px;
|
|
}
|
|
|
|
.login-container {
|
|
background: white;
|
|
border-radius: 20px;
|
|
padding: 40px;
|
|
box-shadow: 0 20px 60px rgba(0,0,0,0.1);
|
|
max-width: 400px;
|
|
width: 100%;
|
|
text-align: center;
|
|
}
|
|
|
|
.login-header {
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.login-header i {
|
|
font-size: 3rem;
|
|
color: #3498db;
|
|
margin-bottom: 15px;
|
|
display: block;
|
|
}
|
|
|
|
.login-header h1 {
|
|
color: #2c3e50;
|
|
font-size: 1.8rem;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.login-header p {
|
|
color: #7f8c8d;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.login-form {
|
|
text-align: left;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 25px;
|
|
}
|
|
|
|
.form-group label {
|
|
display: block;
|
|
margin-bottom: 8px;
|
|
font-weight: 500;
|
|
color: #2c3e50;
|
|
}
|
|
|
|
.password-input-container {
|
|
position: relative;
|
|
}
|
|
|
|
.form-control {
|
|
width: 100%;
|
|
padding: 15px 20px;
|
|
padding-right: 50px;
|
|
border: 2px solid #e9ecef;
|
|
border-radius: 10px;
|
|
font-size: 16px;
|
|
transition: all 0.3s ease;
|
|
background: #f8f9fa;
|
|
}
|
|
|
|
.form-control:focus {
|
|
outline: none;
|
|
border-color: #3498db;
|
|
box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
|
|
background: white;
|
|
}
|
|
|
|
.toggle-password {
|
|
position: absolute;
|
|
right: 15px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
cursor: pointer;
|
|
color: #7f8c8d;
|
|
transition: color 0.3s ease;
|
|
}
|
|
|
|
.toggle-password:hover {
|
|
color: #3498db;
|
|
}
|
|
|
|
.btn-login {
|
|
width: 100%;
|
|
padding: 15px;
|
|
background: linear-gradient(45deg, #3498db, #2980b9);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 10px;
|
|
font-size: 16px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.btn-login:hover {
|
|
background: linear-gradient(45deg, #2980b9, #1f5f8b);
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
|
|
}
|
|
|
|
.btn-login:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.error-message {
|
|
background: #fee;
|
|
border: 1px solid #fcc;
|
|
color: #c33;
|
|
padding: 12px 16px;
|
|
border-radius: 8px;
|
|
margin-bottom: 20px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
animation: shake 0.5s ease-in-out;
|
|
}
|
|
|
|
@keyframes shake {
|
|
0%, 100% { transform: translateX(0); }
|
|
25% { transform: translateX(-5px); }
|
|
75% { transform: translateX(5px); }
|
|
}
|
|
|
|
.back-link {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
color: #7f8c8d;
|
|
text-decoration: none;
|
|
margin-top: 20px;
|
|
font-size: 14px;
|
|
transition: color 0.3s ease;
|
|
}
|
|
|
|
.back-link:hover {
|
|
color: #3498db;
|
|
}
|
|
|
|
.password-hint {
|
|
background: #f8f9fa;
|
|
border-left: 4px solid #3498db;
|
|
padding: 15px;
|
|
margin-top: 20px;
|
|
border-radius: 0 8px 8px 0;
|
|
font-size: 14px;
|
|
color: #2c3e50;
|
|
}
|
|
|
|
.password-hint strong {
|
|
color: #3498db;
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.login-container {
|
|
padding: 30px 20px;
|
|
margin: 10px;
|
|
}
|
|
|
|
.login-header h1 {
|
|
font-size: 1.5rem;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="login-container">
|
|
<div class="login-header">
|
|
<i class="fas fa-shield-alt"></i>
|
|
<h1>Accesso Admin</h1>
|
|
<p>Inserisci la password per continuare</p>
|
|
</div>
|
|
|
|
{% if error %}
|
|
<div class="error-message">
|
|
<i class="fas fa-exclamation-triangle"></i>
|
|
Password non corretta. Riprova.
|
|
</div>
|
|
{% endif %}
|
|
|
|
<form method="POST" class="login-form">
|
|
<div class="form-group">
|
|
<label for="password">
|
|
<i class="fas fa-lock"></i> Password
|
|
</label>
|
|
<div class="password-input-container">
|
|
<input type="password"
|
|
id="password"
|
|
name="password"
|
|
class="form-control"
|
|
placeholder="Inserisci la password admin"
|
|
required
|
|
autocomplete="current-password">
|
|
<i class="fas fa-eye toggle-password" onclick="togglePassword()"></i>
|
|
</div>
|
|
</div>
|
|
|
|
<button type="submit" class="btn-login">
|
|
<i class="fas fa-sign-in-alt"></i>
|
|
Accedi al Pannello
|
|
</button>
|
|
</form>
|
|
|
|
<div class="password-hint">
|
|
<strong>Nota per lo sviluppatore:</strong><br>
|
|
La password predefinita è <code>admin123</code>.
|
|
Cambiala nel file <code>app.py</code> modificando la variabile <code>ADMIN_PASSWORD</code>.
|
|
</div>
|
|
|
|
<a href="/" class="back-link">
|
|
<i class="fas fa-arrow-left"></i>
|
|
Torna alla Roadmap
|
|
</a>
|
|
</div>
|
|
|
|
<script>
|
|
function togglePassword() {
|
|
const passwordField = document.getElementById('password');
|
|
const toggleIcon = document.querySelector('.toggle-password');
|
|
|
|
if (passwordField.type === 'password') {
|
|
passwordField.type = 'text';
|
|
toggleIcon.classList.remove('fa-eye');
|
|
toggleIcon.classList.add('fa-eye-slash');
|
|
} else {
|
|
passwordField.type = 'password';
|
|
toggleIcon.classList.remove('fa-eye-slash');
|
|
toggleIcon.classList.add('fa-eye');
|
|
}
|
|
}
|
|
|
|
// Focus automatico sul campo password
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
document.getElementById('password').focus();
|
|
});
|
|
|
|
// Gestione del form con Enter
|
|
document.getElementById('password').addEventListener('keypress', function(e) {
|
|
if (e.key === 'Enter') {
|
|
document.querySelector('.login-form').submit();
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |