МеÐлкие улучшения

This commit is contained in:
Web-serfer 2026-04-07 23:07:46 +05:00
parent 70e75dc11b
commit 0678c81284
2 changed files with 31 additions and 39 deletions

View file

@ -1,305 +0,0 @@
---
import Layout from '@layouts/Layout.astro';
import { SITE_URL } from '@constants';
---
<Layout
title="Регистрация"
description="Создайте аккаунт для доступа к личному кабинету"
canonicalLink={`${SITE_URL}/auth/sig-up`}
breadcrumbs={[
{ label: 'Главная', href: '/' },
{ label: 'Регистрация' }
]}
>
<div class="auth-page">
<div class="auth-container">
<div class="auth-card">
<div class="auth-header">
<h1>Регистрация</h1>
<p>Создайте аккаунт для доступа ко всем функциям</p>
</div>
<form class="auth-form" id="sign-up-form">
<div class="form-group">
<label for="name">ФИО</label>
<input
type="text"
id="name"
name="name"
placeholder="Иванов Иван Иванович"
required
autocomplete="name"
/>
</div>
<div class="form-group">
<label for="email">Email</label>
<input
type="email"
id="email"
name="email"
placeholder="example@mail.ru"
required
autocomplete="email"
/>
</div>
<div class="form-group">
<label for="phone">Телефон</label>
<input
type="tel"
id="phone"
name="phone"
placeholder="+7 (999) 000-00-00"
required
autocomplete="tel"
/>
</div>
<div class="form-group">
<label for="password">Пароль</label>
<input
type="password"
id="password"
name="password"
placeholder="••••••••"
required
autocomplete="new-password"
minlength="6"
/>
</div>
<div class="form-group">
<label for="confirmPassword">Подтвердите пароль</label>
<input
type="password"
id="confirmPassword"
name="confirmPassword"
placeholder="••••••••"
required
autocomplete="new-password"
minlength="6"
/>
</div>
<div class="form-options">
<label class="checkbox-label">
<input type="checkbox" name="agreement" required />
<span>Согласен с <a href="#">условиями обработки данных</a></span>
</label>
</div>
<button type="submit" class="btn-submit">
Зарегистрироваться
</button>
</form>
<div class="auth-footer">
<p>Уже есть аккаунт? <a href="/auth/sign-in">Войти</a></p>
</div>
</div>
</div>
</div>
</Layout>
<style>
/* Основная страница */
.auth-page {
min-height: calc(100vh - 160px);
background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
display: flex;
align-items: center;
justify-content: center;
padding: 8rem 2rem 2rem;
}
.auth-container {
width: 100%;
max-width: 440px;
}
/* Карточка авторизации */
.auth-card {
background: #ffffff;
border-radius: 16px;
padding: 2rem 1.75rem;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}
/* Заголовок */
.auth-header {
text-align: center;
margin-bottom: 1.5rem;
}
.auth-header h1 {
color: #1e3050;
font-size: 1.5rem;
font-weight: 800;
margin: 0 0 0.5rem 0;
letter-spacing: -0.02em;
}
.auth-header p {
color: #64748b;
font-size: 0.9rem;
margin: 0;
}
/* Форма */
.auth-form {
display: flex;
flex-direction: column;
gap: 1rem;
}
.form-group {
display: flex;
flex-direction: column;
gap: 0.4rem;
}
.form-group label {
color: #1e3050;
font-size: 0.85rem;
font-weight: 600;
}
.form-group input {
padding: 0.7rem 0.9rem;
border: 1px solid #e2e8f0;
border-radius: 8px;
font-size: 0.95rem;
transition: all 0.2s ease;
background: #f8fafc;
}
.form-group input:focus {
outline: none;
border-color: #d4af37;
box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
background: #ffffff;
}
.form-group input::placeholder {
color: #94a3b8;
}
/* Опции формы */
.form-options {
font-size: 0.875rem;
}
.checkbox-label {
display: flex;
align-items: flex-start;
gap: 0.5rem;
color: #64748b;
cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
width: 16px;
height: 16px;
accent-color: #d4af37;
cursor: pointer;
margin-top: 2px;
}
.checkbox-label a {
color: #d4af37;
text-decoration: none;
font-weight: 500;
}
.checkbox-label a:hover {
color: #b8941f;
}
/* Кнопка отправки */
.btn-submit {
background: linear-gradient(135deg, #eac26e 0%, #ce9f40 100%);
color: #ffffff;
border: none;
border-radius: 8px;
padding: 1rem;
font-size: 1rem;
font-weight: 700;
cursor: pointer;
transition: all 0.3s ease;
margin-top: 0.5rem;
}
.btn-submit:hover {
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(206, 159, 64, 0.4);
}
.btn-submit:active {
transform: translateY(0);
}
/* Подвал формы */
.auth-footer {
text-align: center;
margin-top: 1.25rem;
padding-top: 1.25rem;
border-top: 1px solid #e2e8f0;
}
.auth-footer p {
color: #64748b;
font-size: 0.9rem;
margin: 0;
}
.auth-footer a {
color: #d4af37;
text-decoration: none;
font-weight: 600;
transition: color 0.2s ease;
}
.auth-footer a:hover {
color: #b8941f;
}
/* Адаптивность */
@media (max-width: 480px) {
.auth-card {
padding: 2rem 1.5rem;
}
.auth-header h1 {
font-size: 1.5rem;
}
}
</style>
<script>
// Обработка отправки формы
document.getElementById('sign-up-form')?.addEventListener('submit', async (e) => {
e.preventDefault();
const form = e.target as HTMLFormElement;
const formData = new FormData(form);
const name = formData.get('name') as string;
const email = formData.get('email') as string;
const phone = formData.get('phone') as string;
const password = formData.get('password') as string;
const confirmPassword = formData.get('confirmPassword') as string;
// Проверка совпадения паролей
if (password !== confirmPassword) {
alert('Пароли не совпадают');
return;
}
// Здесь будет логика отправки на сервер
console.log('Регистрация:', { name, email, phone, password });
// Пример: await fetch('/api/auth/signup', { method: 'POST', body: JSON.stringify({ name, email, phone, password }) });
});
</script>