husseinelsaadi's picture
fixed-login
d8acd61
{% extends "base.html" %}
{% block title %}Codingo - Login{% endblock %}
{% block content %}
<section class="content-section">
<div class="container">
<div class="card" style="max-width: 500px; margin: 2rem auto;">
<div class="card-header">
<h2 style="text-align: center; margin: 0; color: white;">Login to Codingo</h2>
</div>
<div class="card-body">
<form method="POST" class="auth-form">
{{ form.hidden_tag() }}
<div class="form-group">
{{ form.email.label(class="form-label") }}
{{ form.email(class="form-control", placeholder="Enter your email") }}
{% if form.email.errors %}
<div class="alert alert-danger">
{% for error in form.email.errors %}
<span>{{ error }}</span>
{% endfor %}
</div>
{% endif %}
</div>
<div class="form-group">
{{ form.password.label(class="form-label") }}
{{ form.password(class="form-control", placeholder="Enter your password") }}
{% if form.password.errors %}
<div class="alert alert-danger">
{% for error in form.password.errors %}
<span>{{ error }}</span>
{% endfor %}
</div>
{% endif %}
</div>
<div class="form-group" style="margin-top: 2rem;">
{{ form.submit(class="btn btn-primary", style="width: 100%;") }}
</div>
</form>
<div style="text-align: center; margin-top: 1.5rem;">
<p>Don't have an account? <a href="{{ url_for('auth.signup') }}" style="color: var(--primary); font-weight: 500;">Sign up here</a>.</p>
</div>
</div>
</div>
</div>
</section>
<style>
.auth-form .form-label {
display: block;
margin-bottom: 0.5rem;
font-weight: 500;
color: var(--dark);
}
.auth-form .form-control {
width: 100%;
padding: 0.75rem;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 1rem;
transition: all 0.3s ease;
}
.auth-form .form-control:focus {
border-color: var(--primary);
outline: none;
box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}
.auth-form .btn-primary {
background: linear-gradient(135deg, var(--primary), var(--secondary));
color: white;
padding: 0.75rem;
border: none;
border-radius: 5px;
font-size: 1rem;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
z-index: 1;
}
.auth-form .btn-primary::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 0%;
height: 100%;
background-color: rgba(255, 255, 255, 0.1);
transition: all 0.3s ease;
z-index: -1;
}
.auth-form .btn-primary:hover::before {
width: 100%;
}
.auth-form .btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.alert-danger {
color: var(--danger);
background-color: rgba(231, 76, 60, 0.1);
border: 1px solid var(--danger);
border-radius: 5px;
padding: 0.5rem;
margin-top: 0.5rem;
font-size: 0.9rem;
}
</style>
{% endblock %}