203 lines
4.3 KiB
HTML
203 lines
4.3 KiB
HTML
{% extends 'template.html' %}
|
|
|
|
{% block css %}
|
|
{% endblock css %}
|
|
|
|
{% block navbar %}
|
|
{% include 'comps/navbar.html' %}
|
|
{% endblock navbar %}
|
|
|
|
{% block body %}
|
|
|
|
<style>
|
|
:root {
|
|
--primary-color: #4361ee;
|
|
--primary-dark: #3a56d4;
|
|
--text-color: #2b2d42;
|
|
--light-gray: #f8f9fa;
|
|
--white: #ffffff;
|
|
--shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.login-form {
|
|
max-width: 400px;
|
|
margin: 2rem auto;
|
|
padding: 2.5rem;
|
|
background: var(--white);
|
|
border-radius: 12px;
|
|
box-shadow: var(--shadow);
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
}
|
|
|
|
.form-title {
|
|
color: var(--text-color);
|
|
text-align: center;
|
|
margin-bottom: 0.5rem;
|
|
font-size: 1.8rem;
|
|
}
|
|
|
|
.form-subtitle {
|
|
color: #6c757d;
|
|
text-align: center;
|
|
margin-bottom: 2rem;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.form-label {
|
|
display: block;
|
|
margin-bottom: 0.5rem;
|
|
color: var(--text-color);
|
|
font-weight: 500;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.input-container {
|
|
position: relative;
|
|
}
|
|
|
|
.input-icon {
|
|
position: absolute;
|
|
left: 12px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
width: 20px;
|
|
height: 20px;
|
|
color: #6c757d;
|
|
}
|
|
|
|
.form-input {
|
|
width: 100%;
|
|
padding: 12px 12px 12px 40px;
|
|
border: 1px solid #ced4da;
|
|
border-radius: 8px;
|
|
font-size: 1rem;
|
|
transition: all 0.3s ease;
|
|
background-color: var(--light-gray);
|
|
}
|
|
|
|
.form-input:focus {
|
|
outline: none;
|
|
border-color: var(--primary-color);
|
|
box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
|
|
}
|
|
|
|
.submit-btn {
|
|
width: 100%;
|
|
padding: 12px;
|
|
background-color: var(--primary-color);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 8px;
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.submit-btn:hover {
|
|
background-color: var(--primary-dark);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.btn-icon {
|
|
width: 18px;
|
|
height: 18px;
|
|
}
|
|
|
|
.form-footer {
|
|
margin-top: 1.5rem;
|
|
text-align: center;
|
|
font-size: 0.9rem;
|
|
color: #6c757d;
|
|
}
|
|
|
|
.forgot-password {
|
|
display: block;
|
|
margin-bottom: 1rem;
|
|
color: var(--primary-color);
|
|
text-decoration: none;
|
|
transition: color 0.2s;
|
|
}
|
|
|
|
.forgot-password:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.signup-link {
|
|
color: var(--primary-color);
|
|
text-decoration: none;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.signup-link:hover {
|
|
text-decoration: underline;
|
|
}
|
|
</style>
|
|
|
|
|
|
<!-- En tu template (frontend) -->
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
{% for category, message in messages %}
|
|
<div class="alert alert-{{ category }}">{{ message }}</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
|
|
<form method="POST" action="{{ url_for('login') }}" class="login-form">
|
|
{{ form.hidden_tag() }}
|
|
{{ form.csrf_token }}
|
|
|
|
<h2 class="form-title">Bienvenido de vuelta</h2>
|
|
<p class="form-subtitle">Ingresa tus credenciales para continuar</p>
|
|
|
|
<div class="form-group">
|
|
{{ form.email.label(class="form-label") }}
|
|
<div class="input-container">
|
|
<svg class="input-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path>
|
|
<polyline points="22,6 12,13 2,6"></polyline>
|
|
</svg>
|
|
{{ form.email(class="form-input", placeholder="ejemplo@correo.com", type="email") }}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ form.password.label(class="form-label") }}
|
|
<div class="input-container">
|
|
<svg class="input-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect>
|
|
<path d="M7 11V7a5 5 0 0 1 10 0v4"></path>
|
|
</svg>
|
|
{{ form.password(class="form-input", placeholder="••••••••") }}
|
|
</div>
|
|
</div>
|
|
|
|
<button type="submit" class="submit-btn">
|
|
Iniciar Sesión
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="btn-icon">
|
|
<path d="M5 12h14M12 5l7 7-7 7"></path>
|
|
</svg>
|
|
</button>
|
|
|
|
<div class="form-footer">
|
|
<a href="{{ url_for('recover_pswd') }}" class="forgot-password">¿Olvidaste tu contraseña?</a>
|
|
</div>
|
|
</form>
|
|
|
|
{% endblock body %}
|
|
|
|
{% block js %}
|
|
|
|
|
|
|
|
{% endblock js %} |