Files
xvatayka/core/apps/accounts/templates/auth/login.html
NORBOYEVSAMARIDDIN 493cb58222 first commit
2026-02-07 11:18:38 +05:00

147 lines
3.4 KiB
HTML

<!-- templates/auth/login.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Login</title>
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<style>
:root {
--primary: #4f46e5;
--bg: #f4f6fb;
--text: #111827;
--muted: #6b7280;
--danger: #dc2626;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
min-height: 100vh;
background: var(--bg);
font-family: system-ui, -apple-system, sans-serif;
display: flex;
align-items: center;
justify-content: center;
padding: env(safe-area-inset-top) 14px env(safe-area-inset-bottom);
}
.card {
width: 100%;
max-width: 420px;
background: #fff;
border-radius: 16px;
padding: 24px 20px 28px;
box-shadow: 0 12px 40px rgba(0,0,0,.08);
}
h1 {
margin: 0 0 24px;
font-size: 24px;
text-align: center;
color: var(--text);
}
.form-group {
margin-bottom: 18px;
}
label {
display: block;
font-size: 13px;
margin-bottom: 6px;
color: var(--muted);
}
.form-control {
width: 100%;
padding: 14px 14px;
font-size: 16px; /* prevents iOS zoom */
border-radius: 12px;
border: 1px solid #d1d5db;
outline: none;
transition: border .15s, box-shadow .15s;
}
.form-control:focus {
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(79,70,229,.15);
}
.btn {
width: 100%;
padding: 15px;
border-radius: 14px;
border: none;
background: var(--primary);
color: #fff;
font-size: 16px;
font-weight: 600;
cursor: pointer;
margin-top: 8px;
}
.btn:active {
transform: scale(.99);
}
.error {
background: #fee2e2;
color: var(--danger);
padding: 12px 14px;
border-radius: 12px;
font-size: 14px;
margin-bottom: 16px;
}
@media (min-width: 768px) {
body {
padding: 0;
}
.card {
padding: 32px;
}
h1 {
font-size: 26px;
}
}
</style>
</head>
<body>
<div class="card">
<h1>Sign in</h1>
{% if messages %}
{% for message in messages %}
<div class="error">{{ message }}</div>
{% endfor %}
{% endif %}
{% if form.non_field_errors %}
<div class="error">
{{ form.non_field_errors.0 }}
</div>
{% endif %}
<form method="post" novalidate>
{% csrf_token %}
<div class="form-group">
{{ form.phone.label_tag }}
{{ form.phone }}
</div>
<div class="form-group">
{{ form.password.label_tag }}
{{ form.password }}
</div>
<button type="submit" class="btn">Login</button>
</form>
</div>
</body>
</html>