Создание страницы блога

This commit is contained in:
Web-serfer 2026-04-06 21:28:31 +05:00
parent f84c24e91f
commit ed93c5646a
10 changed files with 1058 additions and 34 deletions

View file

@ -0,0 +1,225 @@
---
export interface Props {
title: string;
description: string;
category: string;
categoryColor?: string;
date: string;
readTime: string;
imageUrl?: string;
slug?: string;
}
const {
title,
description,
category,
categoryColor = 'bg-gold',
date,
readTime,
imageUrl = '/images/blog/default.avif',
slug = '#'
} = Astro.props;
// Форматируем дату
const formatDate = (dateStr: string) => {
const d = new Date(dateStr);
return d.toLocaleDateString('ru-RU', {
day: 'numeric',
month: 'long',
year: 'numeric'
});
};
---
<article class="blog-card animate-on-scroll" data-animation="fade-up">
<a href={slug} class="card-link">
<!-- Изображение -->
<div class="card-image">
<img src={imageUrl} alt={title} loading="lazy" />
<span class={`category-badge ${categoryColor}`}>{category}</span>
</div>
<!-- Контент -->
<div class="card-content">
<h3 class="card-title">{title}</h3>
<p class="card-description">{description}</p>
<div class="card-meta">
<span class="meta-item">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="meta-icon">
<rect width="18" height="18" x="3" y="4" rx="2" ry="2"></rect>
<line x1="16" x2="16" y1="2" y2="6"></line>
<line x1="8" x2="8" y1="2" y2="6"></line>
<line x1="3" x2="21" y1="10" y2="10"></line>
</svg>
{formatDate(date)}
</span>
<span class="meta-item">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="meta-icon">
<circle cx="12" cy="12" r="10"></circle>
<polyline points="12 6 12 12 16 14"></polyline>
</svg>
{readTime}
</span>
</div>
</div>
</a>
</article>
<style>
.blog-card {
background: #ffffff;
border-radius: 1rem;
overflow: hidden;
border: 2px solid transparent;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
height: 100%;
display: flex;
flex-direction: column;
}
.blog-card:hover {
border-color: #d4af37;
box-shadow: 0 12px 30px rgba(212, 175, 55, 0.12);
transform: translateY(-6px);
}
.card-link {
text-decoration: none;
color: inherit;
display: flex;
flex-direction: column;
height: 100%;
}
/* Изображение */
.card-image {
position: relative;
height: 200px;
overflow: hidden;
}
.card-image img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.blog-card:hover .card-image img {
transform: scale(1.05);
}
.category-badge {
position: absolute;
top: 1rem;
left: 1rem;
padding: 0.35rem 0.75rem;
border-radius: 0.5rem;
font-size: 0.75rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.category-badge.bg-gold {
background: linear-gradient(135deg, #d4af37 0%, #eac26e 100%);
color: #1e293b;
}
.category-badge.bg-blue {
background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
color: #ffffff;
}
.category-badge.bg-red {
background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
color: #ffffff;
}
.category-badge.bg-green {
background: linear-gradient(135deg, #22c55e 0%, #4ade80 100%);
color: #ffffff;
}
/* Контент */
.card-content {
padding: 1.5rem;
display: flex;
flex-direction: column;
gap: 0.75rem;
flex: 1;
}
.card-title {
color: #1e293b;
font-size: 1.15rem;
font-weight: 700;
margin: 0;
line-height: 1.4;
letter-spacing: -0.01em;
transition: color 0.2s ease;
}
.blog-card:hover .card-title {
color: #d4af37;
}
.card-description {
color: #64748b;
font-size: 0.9rem;
line-height: 1.6;
margin: 0;
flex: 1;
}
.card-meta {
display: flex;
align-items: center;
gap: 1.25rem;
padding-top: 1rem;
border-top: 1px solid #f1f5f9;
margin-top: auto;
}
.meta-item {
display: flex;
align-items: center;
gap: 0.4rem;
color: #94a3b8;
font-size: 0.8rem;
font-weight: 500;
}
.meta-icon {
width: 0.9rem;
height: 0.9rem;
}
/* Анимации */
.animate-on-scroll {
opacity: 0;
will-change: opacity, transform;
}
[data-animation="fade-up"] {
transform: translateY(30px);
transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.animate-on-scroll.is-visible {
opacity: 1;
transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
.animate-on-scroll {
opacity: 1;
transform: none;
transition: none;
}
}
</style>

View file

@ -0,0 +1,127 @@
---
export interface Props {
categories: string[];
activeCategory?: string;
}
const { categories, activeCategory = 'Все' } = Astro.props;
---
<div class="blog-categories animate-on-scroll" data-animation="fade-up">
<div class="categories-wrapper">
{categories.map((cat) => (
<button
class={`category-btn ${cat === activeCategory ? 'active' : ''}`}
data-category={cat}
>
{cat}
</button>
))}
</div>
</div>
<style>
.blog-categories {
padding: 2rem 0 0;
background: #f8fafc;
}
.categories-wrapper {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
justify-content: center;
max-width: 900px;
margin: 0 auto;
}
.category-btn {
padding: 0.6rem 1.25rem;
border: 2px solid #e2e8f0;
border-radius: 2rem;
background: #ffffff;
color: #64748b;
font-size: 0.875rem;
font-weight: 600;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
white-space: nowrap;
}
.category-btn:hover {
border-color: #d4af37;
color: #d4af37;
transform: translateY(-2px);
}
.category-btn.active {
background: linear-gradient(135deg, #d4af37 0%, #eac26e 100%);
border-color: #d4af37;
color: #1e293b;
box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}
/* Анимации */
.animate-on-scroll {
opacity: 0;
will-change: opacity, transform;
}
[data-animation="fade-up"] {
transform: translateY(30px);
transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.animate-on-scroll.is-visible {
opacity: 1;
transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
.animate-on-scroll {
opacity: 1;
transform: none;
transition: none;
}
}
@media (max-width: 640px) {
.categories-wrapper {
gap: 0.5rem;
}
.category-btn {
padding: 0.5rem 1rem;
font-size: 0.8rem;
}
}
</style>
<script>
// Клиентская логика фильтрации (пока заглушка)
document.addEventListener('DOMContentLoaded', () => {
const buttons = document.querySelectorAll('.category-btn');
buttons.forEach(btn => {
btn.addEventListener('click', () => {
buttons.forEach(b => b.classList.remove('active'));
btn.classList.add('active');
// TODO: Добавить логику фильтрации при интеграции с коллекцией
console.log('Выбрана категория:', btn.getAttribute('data-category'));
});
});
});
document.addEventListener('astro:page-load', () => {
const buttons = document.querySelectorAll('.category-btn');
buttons.forEach(btn => {
btn.addEventListener('click', () => {
buttons.forEach(b => b.classList.remove('active'));
btn.classList.add('active');
});
});
});
</script>

View file

@ -0,0 +1,178 @@
---
const badgeText = "БЛОГ И СТАТЬИ";
const titleWhite = "Полезные статьи";
const titleGold = "для автовладельцев";
const description = "Разбираем сложные юридические вопросы простым языком. Советы юриста по автоспорам, ДТП, ОСАГО и защите прав водителей.";
---
<section class="blog-hero">
<div class="hero-overlay"></div>
<div class="site-container hero-content">
<div class="badge animate-on-scroll" data-animation="fade-up">
<span class="status-dot"></span>
{badgeText}
</div>
<h1 class="hero-title">
<span class="text-white animate-on-scroll" data-animation="fade-up" data-delay="100">{titleWhite}</span>
<br />
<span class="text-gold animate-on-scroll" data-animation="fade-up" data-delay="200">{titleGold}</span>
</h1>
<p class="hero-description animate-on-scroll" data-animation="fade-up" data-delay="300">{description}</p>
</div>
</section>
<style>
.blog-hero {
position: relative;
width: 100%;
padding: 8rem 0 5rem;
background: linear-gradient(135deg, #0a2540 0%, #1e3a5f 100%);
overflow: hidden;
}
.blog-hero::before {
content: '';
position: absolute;
top: -30%;
right: -5%;
width: 500px;
height: 500px;
background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
border-radius: 50%;
}
.hero-overlay {
position: absolute;
top: 0; left: 0; width: 100%; height: 100%;
background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
z-index: 0;
}
.hero-content {
position: relative;
z-index: 1;
text-align: center;
max-width: 750px;
margin: 0 auto;
}
.badge {
display: inline-flex;
align-items: center;
gap: 0.6rem;
background-color: rgba(234, 194, 110, 0.15);
border: 1px solid rgba(234, 194, 110, 0.3);
color: #eac26e;
padding: 0.5rem 1rem;
border-radius: 6px;
font-size: 0.8rem;
font-weight: 700;
letter-spacing: 1.5px;
margin-bottom: 2rem;
}
.status-dot {
width: 10px;
height: 10px;
background: #22c55e;
border-radius: 50%;
animation: pulse 2s ease-in-out infinite;
box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
flex-shrink: 0;
}
@keyframes pulse {
0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.hero-title {
font-size: clamp(2.5rem, 5vw, 4rem);
line-height: 1.15;
margin: 0 0 1.5rem 0;
font-weight: 800;
letter-spacing: -0.02em;
}
.hero-title .text-white,
.hero-title .text-gold {
display: inline-block;
}
.text-white { color: #ffffff; }
.text-gold { color: #eac26e; }
.hero-description {
color: rgba(255, 255, 255, 0.8);
font-size: 1.15rem;
line-height: 1.6;
margin: 0;
max-width: 600px;
margin-left: auto;
margin-right: auto;
}
/* Анимации */
.animate-on-scroll {
opacity: 0;
will-change: opacity, transform;
}
[data-animation="fade-up"] {
transform: translateY(30px);
transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.animate-on-scroll.is-visible {
opacity: 1;
transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
.animate-on-scroll {
opacity: 1;
transform: none;
transition: none;
}
}
@media (max-width: 768px) {
.blog-hero {
padding: 7rem 0 3.5rem;
}
.hero-title {
font-size: 2.2rem;
}
.hero-description {
font-size: 1rem;
}
}
</style>
<script>
const setupAnimations = () => {
const observerOptions = { threshold: 0.1 };
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
const el = entry.target as HTMLElement;
const delay = parseInt(el.dataset.delay || '0');
setTimeout(() => el.classList.add('is-visible'), delay);
observer.unobserve(el);
}
});
}, observerOptions);
document.querySelectorAll('.animate-on-scroll').forEach((el) => observer.observe(el));
};
setupAnimations();
document.addEventListener('astro:after-swap', setupAnimations);
</script>

View file

@ -0,0 +1,187 @@
---
export interface Props {
currentPage: number;
totalPages: number;
}
const { currentPage, totalPages } = Astro.props;
const getPages = () => {
const pages: (number | string)[] = [];
for (let i = 1; i <= totalPages; i++) {
if (i === 1 || i === totalPages || (i >= currentPage - 1 && i <= currentPage + 1)) {
pages.push(i);
} else if (pages[pages.length - 1] !== '...') {
pages.push('...');
}
}
return pages;
};
---
<nav class="blog-pagination animate-on-scroll" data-animation="fade-up">
<div class="pagination-wrapper">
<!-- Кнопка Назад -->
<a
href={currentPage > 1 ? `/blog/page/${currentPage - 1}` : '#'}
class={`pagination-btn prev ${currentPage === 1 ? 'disabled' : ''}`}
aria-disabled={currentPage === 1}
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="m15 18-6-6 6-6"/>
</svg>
</a>
<!-- Номера страниц -->
<div class="pagination-pages">
{getPages().map((page) => (
page === '...' ? (
<span class="pagination-ellipsis">…</span>
) : (
<a
href={page === 1 ? '/blog' : `/blog/page/${page}`}
class={`pagination-page ${page === currentPage ? 'active' : ''}`}
aria-current={page === currentPage ? 'page' : undefined}
>
{page}
</a>
)
))}
</div>
<!-- Кнопка Вперед -->
<a
href={currentPage < totalPages ? `/blog/page/${currentPage + 1}` : '#'}
class={`pagination-btn next ${currentPage === totalPages ? 'disabled' : ''}`}
aria-disabled={currentPage === totalPages}
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="m9 18 6-6-6-6"/>
</svg>
</a>
</div>
</nav>
<style>
.blog-pagination {
padding: 3rem 0 4rem;
display: flex;
justify-content: center;
}
.pagination-wrapper {
display: flex;
align-items: center;
gap: 0.5rem;
}
.pagination-btn {
display: flex;
align-items: center;
justify-content: center;
width: 2.75rem;
height: 2.75rem;
border-radius: 0.75rem;
border: 2px solid #e2e8f0;
background: #ffffff;
color: #64748b;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
text-decoration: none;
}
.pagination-btn:not(.disabled):hover {
border-color: #d4af37;
color: #d4af37;
transform: translateY(-2px);
}
.pagination-btn.disabled {
opacity: 0.4;
cursor: not-allowed;
pointer-events: none;
}
.pagination-btn svg {
width: 1.25rem;
height: 1.25rem;
}
.pagination-pages {
display: flex;
align-items: center;
gap: 0.375rem;
}
.pagination-page {
display: flex;
align-items: center;
justify-content: center;
min-width: 2.75rem;
height: 2.75rem;
border-radius: 0.75rem;
border: 2px solid transparent;
background: #ffffff;
color: #64748b;
font-size: 0.9rem;
font-weight: 600;
text-decoration: none;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.pagination-page:hover {
border-color: #d4af37;
color: #d4af37;
}
.pagination-page.active {
background: linear-gradient(135deg, #d4af37 0%, #eac26e 100%);
border-color: #d4af37;
color: #1e293b;
box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}
.pagination-ellipsis {
color: #94a3b8;
padding: 0 0.25rem;
font-size: 1.25rem;
user-select: none;
}
/* Анимации */
.animate-on-scroll {
opacity: 0;
will-change: opacity, transform;
}
[data-animation="fade-up"] {
transform: translateY(30px);
transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.animate-on-scroll.is-visible {
opacity: 1;
transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
.animate-on-scroll {
opacity: 1;
transform: none;
transition: none;
}
}
@media (max-width: 640px) {
.pagination-pages {
gap: 0.25rem;
}
.pagination-page,
.pagination-btn {
width: 2.25rem;
height: 2.25rem;
min-width: 2.25rem;
}
}
</style>

View file

@ -0,0 +1,105 @@
export interface BlogPost {
title: string;
description: string;
category: string;
categoryColor: string;
date: string;
readTime: string;
imageUrl: string;
slug: string;
}
export const blogPosts: BlogPost[] = [
{
title: "Что делать при ДТП: пошаговая инструкция 2024",
description: "Подробный разбор действий после дорожно-транспортного происшествия. Как оформить ДТП, какие документы собрать и куда обращаться за компенсацией.",
category: "ДТП",
categoryColor: "bg-red",
date: "2024-03-20",
readTime: "8 мин",
imageUrl: "/images/blog/dtp-instruction.avif",
slug: "/blog/dtp-instruction-2024"
},
{
title: "Как оспорить лишение водительских прав",
description: "Разбираем основные основания для лишения прав и способы защиты в суде. Сроки обжалования, необходимые документы и типичные ошибки водителей.",
category: "Лишение прав",
categoryColor: "bg-blue",
date: "2024-03-15",
readTime: "12 мин",
imageUrl: "/images/blog/license-appeal.avif",
slug: "/blog/license-appeal"
},
{
title: "ОСАГО: как получить полную выплату от страховой",
description: "Почему страховые компании занижают выплаты и как добиться справедливой компенсации. Независимая экспертиза и судебная практика.",
category: "ОСАГО",
categoryColor: "bg-gold",
date: "2024-03-10",
readTime: "10 мин",
imageUrl: "/images/blog/osago-payout.avif",
slug: "/blog/osago-full-payout"
},
{
title: "Спор с ГИБДД: как обжаловать штраф с камеры",
description: "Камеры фотофиксации часто ошибаются. Рассказываем, как правильно обжаловать штраф, полученные с автоматических комплексов.",
category: "Штрафы",
categoryColor: "bg-green",
date: "2024-03-05",
readTime: "7 мин",
imageUrl: "/images/blog/camera-fine.avif",
slug: "/blog/camera-fine-appeal"
},
{
title: "Возврат прав после лишения: новая процедура",
description: "Изменения в законодательстве 2024 года. Новый порядок возврата водительского удостоверения после окончания срока лишения.",
category: "Лишение прав",
categoryColor: "bg-blue",
date: "2024-02-28",
readTime: "9 мин",
imageUrl: "/images/blog/license-return.avif",
slug: "/blog/license-return-2024"
},
{
title: "Спор с автосалоном: как вернуть неисправный автомобиль",
description: "Права потребителя при покупке автомобиля с дефектами. Закон «О защите прав потребителей» и судебная практика в Сургуте.",
category: "Автосалоны",
categoryColor: "bg-gold",
date: "2024-02-20",
readTime: "11 мин",
imageUrl: "/images/blog/car-dealer-dispute.avif",
slug: "/blog/car-dealer-dispute"
},
{
title: "Независимая экспертиза после ДТП: зачем и когда нужна",
description: "Когда страховая занижает ущерб — поможет независимая оценка. Как выбрать эксперта, сколько стоит и как использовать в суде.",
category: "ДТП",
categoryColor: "bg-red",
date: "2024-02-15",
readTime: "6 мин",
imageUrl: "/images/blog/independent-expertise.avif",
slug: "/blog/independent-expertise"
},
{
title: "Что делать, если виновник ДТП не имеет ОСАГО",
description: "Как получить компенсацию, если у виновника аварии нет полиса ОСАГО. Судебный иск, взыскание ущерба и практические советы юриста.",
category: "ОСАГО",
categoryColor: "bg-gold",
date: "2024-02-08",
readTime: "8 мин",
imageUrl: "/images/blog/no-osago.avif",
slug: "/blog/no-osago-at-fault"
},
{
title: "Обжалование протокола ГИБДД: типичные ошибки инспекторов",
description: "Какие нарушения допускают сотрудники ГИБДД при составлении протокола и как использовать это в свою пользу при обжаловании.",
category: "Штрафы",
categoryColor: "bg-green",
date: "2024-02-01",
readTime: "10 мин",
imageUrl: "/images/blog/protocol-errors.avif",
slug: "/blog/protocol-errors"
}
];
export const categories = ['Все', 'ДТП', 'ОСАГО', 'Лишение прав', 'Штрафы', 'Автосалоны'];

View file

@ -107,7 +107,7 @@ import { SITE_URL } from '@constants';
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
padding: 8rem 2rem 2rem;
}
.auth-container {

View file

@ -70,7 +70,7 @@ import { SITE_URL } from '@constants';
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
padding: 8rem 2rem 2rem;
}
.auth-container {

View file

@ -0,0 +1,147 @@
---
import Layout from '@layouts/Layout.astro';
import { SITE_URL } from '@constants';
import BlogHero from '@components/blog/BlogHero.astro';
import BlogCategories from '@components/blog/BlogCategories.astro';
import BlogCard from '@components/blog/BlogCard.astro';
import BlogPagination from '@components/blog/BlogPagination.astro';
import { blogPosts, categories } from '@data/blogData';
---
<Layout
title="Блог — автоюрист в Сургуте"
description="Полезные статьи и советы по автоспорам, ДТП, ОСАГО, лишению прав и защите прав водителей."
canonicalLink={`${SITE_URL}/blog`}
>
<BlogHero />
<BlogCategories categories={categories} />
<!-- Сетка статей -->
<section class="blog-grid-section">
<div class="site-container">
<div class="blog-grid">
{blogPosts.map((post) => (
<BlogCard
title={post.title}
description={post.description}
category={post.category}
categoryColor={post.categoryColor}
date={post.date}
readTime={post.readTime}
imageUrl={post.imageUrl}
slug={post.slug}
/>
))}
</div>
<!-- Пагинация -->
<BlogPagination currentPage={1} totalPages={3} />
</div>
</section>
<!-- CTA-блок -->
<section class="blog-cta">
<div class="site-container">
<div class="cta-content">
<h2 class="cta-title">Нужна консультация юриста?</h2>
<p class="cta-text">
Не нашли ответ на свой вопрос? Запишитесь на бесплатную консультацию — мы поможем разобраться в вашей ситуации
</p>
<button class="cta-button" id="consultation-btn" data-modal-target="consultation-modal">
Записаться на консультацию
</button>
</div>
</div>
</section>
</Layout>
<style>
.blog-grid-section {
padding: 3rem 0 0;
background: #f8fafc;
}
.blog-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 2rem;
}
/* ===== CTA ===== */
.blog-cta {
padding: 5rem 0;
background: linear-gradient(135deg, #0a2540 0%, #1e3a5f 100%);
position: relative;
overflow: hidden;
}
.blog-cta::before {
content: '';
position: absolute;
bottom: -30%;
left: -10%;
width: 500px;
height: 500px;
background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
border-radius: 50%;
}
.cta-content {
position: relative;
z-index: 1;
text-align: center;
max-width: 600px;
margin: 0 auto;
}
.cta-title {
font-size: clamp(1.75rem, 4vw, 2.5rem);
font-weight: 800;
color: #ffffff;
margin: 0 0 1rem;
letter-spacing: -0.02em;
}
.cta-text {
color: rgba(255, 255, 255, 0.75);
font-size: 1.1rem;
line-height: 1.6;
margin: 0 0 2rem;
}
.cta-button {
background: linear-gradient(135deg, #d4af37 0%, #eac26e 100%);
color: #1e293b;
border: none;
padding: 1rem 2.5rem;
border-radius: 0.75rem;
font-size: 1.1rem;
font-weight: 700;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}
.cta-button:hover {
transform: translateY(-3px);
box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}
/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
.blog-grid {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 768px) {
.blog-grid {
grid-template-columns: 1fr;
gap: 1.5rem;
}
.blog-cta {
padding: 3rem 0;
}
}
</style>

View file

@ -165,7 +165,7 @@ const isAuthorized = false; // Измените на true, чтобы увиде
</div>
<h3 class="lock-title">Форма доступна только клиентам</h3>
<p class="lock-text">Чтобы отправить сообщение напрямую юристу, пожалуйста, авторизуйтесь в личном кабинете.</p>
<a href="/login" class="auth-button">Войти в кабинет</a>
<a href="/auth/sign-in" class="auth-button">Войти в кабинет</a>
</div>
)}
</div>

View file

@ -12,17 +12,25 @@ import { reviewsData, votingSummary } from '@data/reviewsData';
canonicalLink={`${SITE_URL}/reviews`}
>
<section class="reviews-page">
<div class="site-container">
<!-- Заголовок страницы -->
<div class="page-header">
<span class="subtitle animate-on-scroll" data-animation="fade-up">Отзывы клиентов</span>
<h1 class="title animate-on-scroll" data-animation="fade-up" data-delay="100">
Реальные истории водителей из Сургута
</h1>
<p class="description animate-on-scroll" data-animation="fade-up" data-delay="200">
Узнайте, как мы помогли нашим клиентам решить их проблемы с автоспорами
</p>
<!-- Hero-секция -->
<section class="reviews-hero">
<div class="site-container">
<div class="hero-content">
<div class="badge animate-on-scroll" data-animation="fade-up">
<span class="status-dot"></span>
ОТЗЫВЫ КЛИЕНТОВ
</div>
<h1 class="title animate-on-scroll" data-animation="fade-up" data-delay="100">
Реальные истории <span class="text-gold">водителей</span> из Сургута
</h1>
<p class="description animate-on-scroll" data-animation="fade-up" data-delay="200">
Узнайте, как мы помогли нашим клиентам решить их проблемы с автоспорами
</p>
</div>
</div>
</section>
<div class="site-container">
<!-- Блок статистики голосования -->
<VotingSummary
@ -65,45 +73,88 @@ import { reviewsData, votingSummary } from '@data/reviewsData';
<style>
.reviews-page {
padding: 8rem 0 4rem 0;
padding: 0;
background: #f8fafc;
}
.page-header {
text-align: center;
margin-bottom: 3rem;
/* ===== HERO ===== */
.reviews-hero {
background: linear-gradient(135deg, #0a2540 0%, #1e3a5f 100%);
padding: 8rem 0 4rem;
position: relative;
overflow: hidden;
}
.subtitle {
display: inline-block;
color: #d4af37;
font-size: 0.75rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 3px;
margin-bottom: 1rem;
.reviews-hero::before {
content: '';
position: absolute;
top: -50%;
right: -10%;
width: 600px;
height: 600px;
background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
border-radius: 50%;
}
.hero-content {
position: relative;
z-index: 1;
text-align: center;
max-width: 700px;
margin: 0 auto;
}
.badge {
display: inline-flex;
align-items: center;
gap: 0.6rem;
background-color: rgba(234, 194, 110, 0.15);
border: 1px solid rgba(234, 194, 110, 0.3);
color: #eac26e;
padding: 0.5rem 1rem;
background: rgba(212, 175, 55, 0.1);
border-radius: 6px;
font-size: 0.8rem;
font-weight: 700;
letter-spacing: 1.5px;
margin-bottom: 2rem;
}
.status-dot {
width: 10px;
height: 10px;
background: #22c55e;
border-radius: 50%;
animation: pulse 2s ease-in-out infinite;
box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
flex-shrink: 0;
}
@keyframes pulse {
0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.title {
color: #1e293b;
font-size: clamp(2rem, 4vw, 3rem);
font-size: clamp(2.5rem, 5vw, 4rem);
font-weight: 800;
margin: 0 0 1rem 0;
line-height: 1.2;
color: #ffffff;
margin: 0 0 1.5rem;
line-height: 1.15;
letter-spacing: -0.02em;
}
.text-gold { color: #eac26e; }
.description {
color: #64748b;
font-size: 1.125rem;
max-width: 600px;
margin: 0 auto;
color: rgba(255, 255, 255, 0.8);
font-size: 1.15rem;
line-height: 1.6;
margin: 0;
}
/* ===== GRID ===== */
.reviews-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
@ -180,6 +231,10 @@ import { reviewsData, votingSummary } from '@data/reviewsData';
}
@media (max-width: 768px) {
.reviews-hero {
padding: 7rem 0 3rem;
}
.reviews-grid {
grid-template-columns: 1fr;
gap: 1.5rem;