feat(phase-1): Complete foundation setup
- Add User model and authentication system with JWT cookies - Implement login/logout routes and protected dashboard - Add Alembic database migration configuration - Add create_admin.py script for initial user setup - Make ContentGenerator and ImageGenerator lazy-initialized - Add comprehensive API keys setup documentation - Fix startup errors when services unavailable Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
111
dashboard/templates/login.html
Normal file
111
dashboard/templates/login.html
Normal file
@@ -0,0 +1,111 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Login - Social Media Automation</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
|
||||
<style>
|
||||
body {
|
||||
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
|
||||
min-height: 100vh;
|
||||
}
|
||||
.card {
|
||||
background-color: #16213e;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.accent { color: #d4a574; }
|
||||
.btn-primary {
|
||||
background-color: #d4a574;
|
||||
color: #1a1a2e;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.btn-primary:hover {
|
||||
background-color: #c49564;
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
.input-field {
|
||||
background-color: #1a1a2e;
|
||||
border: 1px solid #2d3748;
|
||||
color: #fff;
|
||||
transition: border-color 0.3s;
|
||||
}
|
||||
.input-field:focus {
|
||||
border-color: #d4a574;
|
||||
outline: none;
|
||||
}
|
||||
.input-field::placeholder {
|
||||
color: #6b7280;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="flex items-center justify-center p-4">
|
||||
<div class="card p-8 w-full max-w-md">
|
||||
<!-- Logo -->
|
||||
<div class="text-center mb-8">
|
||||
<div class="inline-flex items-center justify-center w-16 h-16 rounded-xl bg-gradient-to-br from-yellow-600 to-yellow-800 mb-4">
|
||||
<span class="text-2xl font-bold text-white">AS</span>
|
||||
</div>
|
||||
<h1 class="text-2xl font-bold text-white">Social Media Automation</h1>
|
||||
<p class="text-gray-400 mt-1">Consultoría AS</p>
|
||||
</div>
|
||||
|
||||
<!-- Error message -->
|
||||
{% if error %}
|
||||
<div class="bg-red-900/50 border border-red-700 text-red-300 px-4 py-3 rounded-lg mb-6">
|
||||
{{ error }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Login Form -->
|
||||
<form method="POST" action="/login">
|
||||
<div class="mb-4">
|
||||
<label for="username" class="block text-gray-400 text-sm mb-2">
|
||||
Usuario o Email
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
id="username"
|
||||
name="username"
|
||||
required
|
||||
class="input-field w-full px-4 py-3 rounded-lg"
|
||||
placeholder="tu.usuario"
|
||||
autocomplete="username"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="mb-6">
|
||||
<label for="password" class="block text-gray-400 text-sm mb-2">
|
||||
Contraseña
|
||||
</label>
|
||||
<input
|
||||
type="password"
|
||||
id="password"
|
||||
name="password"
|
||||
required
|
||||
class="input-field w-full px-4 py-3 rounded-lg"
|
||||
placeholder="••••••••"
|
||||
autocomplete="current-password"
|
||||
>
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
class="btn-primary w-full py-3 rounded-lg font-semibold text-lg"
|
||||
>
|
||||
Iniciar Sesión
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<!-- Footer -->
|
||||
<div class="mt-8 text-center text-gray-500 text-sm">
|
||||
<p>Sistema de automatización de redes sociales</p>
|
||||
<p class="mt-1">
|
||||
<a href="https://consultoria-as.com" target="_blank" class="accent hover:underline">
|
||||
consultoria-as.com
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user