Кастомизация дизайна админки и страницы регистрации: нейтральный стиль админки Django, компактная форма регистрации

This commit is contained in:
2025-12-02 00:53:17 +03:00
parent 34624aa955
commit 5376869294
7 changed files with 155 additions and 61 deletions

View File

@@ -10,36 +10,96 @@
<style>
body {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
min-height: 100vh;
padding: 20px 0;
padding: 30px 10px;
display: flex;
align-items: center;
}
.container {
max-width: 480px;
}
.card {
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
border: none;
border-radius: 15px;
border-radius: 8px;
overflow: hidden;
}
.card-header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
background: #3b82f6;
color: white;
border-radius: 15px 15px 0 0 !important;
padding: 1.5rem;
padding: 1rem 1.25rem;
border-bottom: none;
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border: none;
.card-header h3 {
font-size: 1.25rem;
font-weight: 600;
margin: 0;
}
.btn-primary:hover {
background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
.card-header p {
font-size: 0.875rem;
opacity: 0.95;
margin: 0.25rem 0 0 0;
}
.card-body {
padding: 1.5rem 1.25rem;
}
.form-label {
font-size: 0.875rem;
font-weight: 500;
color: #374151;
margin-bottom: 0.35rem;
}
.form-control, .input-group-text {
font-size: 0.9rem;
padding: 0.5rem 0.75rem;
border-radius: 6px;
}
.input-group-text {
background: #f3f4f6;
border-left: none;
color: #6b7280;
}
.form-control:focus {
border-color: #667eea;
box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
border-color: #3b82f6;
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.form-text {
font-size: 0.8rem;
color: #6b7280;
margin-top: 0.25rem;
}
.text-danger {
color: #ef4444 !important;
}
.mb-3 {
margin-bottom: 1rem !important;
}
.mb-4 {
margin-bottom: 1.25rem !important;
}
.btn-primary {
background: #3b82f6;
border: none;
font-weight: 500;
padding: 0.625rem 1rem;
border-radius: 6px;
transition: all 0.2s;
}
.btn-primary:hover {
background: #2563eb;
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}
.alert {
border-radius: 10px;
border-radius: 6px;
font-size: 0.9rem;
padding: 0.75rem 1rem;
}
small.text-muted {
font-size: 0.8rem;
color: #6b7280;
line-height: 1.4;
}
</style>
@@ -47,20 +107,16 @@
</head>
<body>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 col-lg-6">
{% if messages %}
{% for message in messages %}
<div class="alert alert-{{ message.tags }} alert-dismissible fade show" role="alert">
{{ message }}
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
</div>
{% endfor %}
{% endif %}
{% if messages %}
{% for message in messages %}
<div class="alert alert-{{ message.tags }} alert-dismissible fade show" role="alert">
{{ message }}
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
</div>
{% endfor %}
{% endif %}
{% block content %}{% endblock %}
</div>
</div>
{% block content %}{% endblock %}
</div>
<!-- Bootstrap 5 JS -->

View File

@@ -1,14 +1,14 @@
{% extends "tenants/base.html" %}
{% block title %}Регистрация нового магазина{% endblock %}
{% block title %}Регистрация нового пользователя{% endblock %}
{% block content %}
<div class="card">
<div class="card-header text-center">
<h3 class="mb-0">Регистрация нового магазина</h3>
<p class="mb-0 mt-2">Заполните форму для создания вашего интернет-магазина</p>
<h3>Регистрация магазина</h3>
<p>Заполните форму для создания заявки</p>
</div>
<div class="card-body p-4">
<div class="card-body">
<form method="post" novalidate>
{% csrf_token %}
@@ -37,7 +37,7 @@
</label>
<div class="input-group">
{{ form.schema_name }}
<span class="input-group-text">.inventory.by</span>
<span class="input-group-text">.flowers</span>
</div>
{% if form.schema_name.errors %}
<div class="text-danger small mt-1">
@@ -96,26 +96,19 @@
<!-- Кнопка отправки -->
<div class="d-grid">
<button type="submit" class="btn btn-primary btn-lg">
<button type="submit" class="btn btn-primary">
Отправить заявку
</button>
</div>
<div class="text-center mt-3">
<div class="text-center mt-2">
<small class="text-muted">
После отправки заявки ваш магазин будет проверен администратором.<br>
Уведомление придет на указанный email в течение 24 часов.
Заявка будет проверена администратором в течение 24 часов
</small>
</div>
</form>
</div>
</div>
<div class="text-center mt-3">
<a href="/admin/" class="text-white text-decoration-none">
<small>Войти в панель администратора</small>
</a>
</div>
{% endblock %}
{% block extra_js %}