Созданы хлебные крошки
This commit is contained in:
parent
7d4289bd9e
commit
70e75dc11b
16 changed files with 350 additions and 44 deletions
97
frontend/src/components/base/Breadcrumbs.astro
Normal file
97
frontend/src/components/base/Breadcrumbs.astro
Normal file
|
|
@ -0,0 +1,97 @@
|
||||||
|
---
|
||||||
|
export interface BreadcrumbItem {
|
||||||
|
label: string;
|
||||||
|
href?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Props {
|
||||||
|
items: BreadcrumbItem[];
|
||||||
|
}
|
||||||
|
|
||||||
|
const { items } = Astro.props;
|
||||||
|
---
|
||||||
|
|
||||||
|
<nav class="breadcrumbs" aria-label="Навигация по странице">
|
||||||
|
<div class="site-container">
|
||||||
|
<ol class="breadcrumbs-list">
|
||||||
|
{items.map((item, index) => (
|
||||||
|
<li class="breadcrumb-item">
|
||||||
|
{item.href && index < items.length - 1 ? (
|
||||||
|
<a href={item.href} class="breadcrumb-link">{item.label}</a>
|
||||||
|
) : (
|
||||||
|
<span class="breadcrumb-current">{item.label}</span>
|
||||||
|
)}
|
||||||
|
{index < items.length - 1 && (
|
||||||
|
<svg class="breadcrumb-separator" 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>
|
||||||
|
)}
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.breadcrumbs {
|
||||||
|
padding: 0.75rem 0 0.75rem;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.breadcrumbs-list {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.breadcrumb-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.breadcrumb-link {
|
||||||
|
color: #64748b;
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 0.875rem;
|
||||||
|
font-weight: 500;
|
||||||
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
|
padding: 0.25rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.breadcrumb-link:hover {
|
||||||
|
color: #d4af37;
|
||||||
|
}
|
||||||
|
|
||||||
|
.breadcrumb-current {
|
||||||
|
color: #1e293b;
|
||||||
|
font-size: 0.875rem;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.breadcrumb-separator {
|
||||||
|
width: 1rem;
|
||||||
|
height: 1rem;
|
||||||
|
color: #94a3b8;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 640px) {
|
||||||
|
.breadcrumbs {
|
||||||
|
padding: 0.75rem 0 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.breadcrumb-link,
|
||||||
|
.breadcrumb-current {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.breadcrumb-separator {
|
||||||
|
width: 0.875rem;
|
||||||
|
height: 0.875rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -2,9 +2,10 @@
|
||||||
export interface Props {
|
export interface Props {
|
||||||
categories: string[];
|
categories: string[];
|
||||||
activeCategory?: string;
|
activeCategory?: string;
|
||||||
|
currentPage?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { categories, activeCategory = 'Все' } = Astro.props;
|
const { categories, activeCategory = 'Все', currentPage = 1 } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="blog-categories">
|
<div class="blog-categories">
|
||||||
|
|
@ -12,12 +13,13 @@ const { categories, activeCategory = 'Все' } = Astro.props;
|
||||||
<div class="categories-inner animate-on-scroll" data-animation="fade-up">
|
<div class="categories-inner animate-on-scroll" data-animation="fade-up">
|
||||||
<div class="categories-wrapper">
|
<div class="categories-wrapper">
|
||||||
{categories.map((cat) => (
|
{categories.map((cat) => (
|
||||||
<button
|
<a
|
||||||
|
href={cat === 'Все' ? '/blog' : `/blog/category/${cat.toLowerCase()}`}
|
||||||
class={`category-btn ${cat === activeCategory ? 'active' : ''}`}
|
class={`category-btn ${cat === activeCategory ? 'active' : ''}`}
|
||||||
data-category={cat}
|
data-category={cat}
|
||||||
>
|
>
|
||||||
{cat}
|
{cat}
|
||||||
</button>
|
</a>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -82,12 +84,15 @@ const { categories, activeCategory = 'Все' } = Astro.props;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
text-decoration: none;
|
||||||
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.category-btn:hover {
|
.category-btn:hover {
|
||||||
border-color: #d4af37;
|
border-color: #d4af37;
|
||||||
color: #d4af37;
|
color: #d4af37;
|
||||||
transform: translateY(-2px);
|
transform: translateY(-2px);
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.category-btn.active {
|
.category-btn.active {
|
||||||
|
|
@ -95,6 +100,7 @@ const { categories, activeCategory = 'Все' } = Astro.props;
|
||||||
border-color: #d4af37;
|
border-color: #d4af37;
|
||||||
color: #1e293b;
|
color: #1e293b;
|
||||||
box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
|
box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Анимации */
|
/* Анимации */
|
||||||
|
|
@ -144,42 +150,7 @@ const { categories, activeCategory = 'Все' } = Astro.props;
|
||||||
document.addEventListener('astro:page-load', initFilter);
|
document.addEventListener('astro:page-load', initFilter);
|
||||||
|
|
||||||
function initFilter() {
|
function initFilter() {
|
||||||
const buttons = document.querySelectorAll('.category-btn');
|
const links = document.querySelectorAll('.category-btn');
|
||||||
const cards = document.querySelectorAll('.blog-card-wrapper');
|
|
||||||
|
|
||||||
buttons.forEach(btn => {
|
|
||||||
btn.addEventListener('click', () => {
|
|
||||||
const category = btn.getAttribute('data-category');
|
|
||||||
|
|
||||||
// Обновляем активную кнопку
|
|
||||||
buttons.forEach(b => b.classList.remove('active'));
|
|
||||||
btn.classList.add('active');
|
|
||||||
|
|
||||||
// Фильтрация карточек
|
|
||||||
cards.forEach(card => {
|
|
||||||
const cardCategory = card.getAttribute('data-category');
|
|
||||||
|
|
||||||
if (category === 'Все' || cardCategory === category) {
|
|
||||||
card.style.display = '';
|
|
||||||
card.style.opacity = '0';
|
|
||||||
card.style.transform = 'translateY(20px)';
|
|
||||||
|
|
||||||
requestAnimationFrame(() => {
|
|
||||||
card.style.transition = 'opacity 0.4s ease, transform 0.4s ease';
|
|
||||||
card.style.opacity = '1';
|
|
||||||
card.style.transform = 'translateY(0)';
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
card.style.opacity = '0';
|
|
||||||
card.style.transform = 'translateY(20px)';
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
card.style.display = 'none';
|
|
||||||
}, 300);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// Открытие поиска
|
// Открытие поиска
|
||||||
const searchBtn = document.getElementById('search-icon-btn');
|
const searchBtn = document.getElementById('search-icon-btn');
|
||||||
|
|
|
||||||
|
|
@ -4,15 +4,17 @@ import { SITE_TITLE_SUFFIX } from "@constants";
|
||||||
|
|
||||||
import Header from "@components/layout/header/Header.astro";
|
import Header from "@components/layout/header/Header.astro";
|
||||||
import Footer from "@components/layout/footer/Footer.astro";
|
import Footer from "@components/layout/footer/Footer.astro";
|
||||||
|
import Breadcrumbs from "@components/base/Breadcrumbs.astro";
|
||||||
import ConsultationModal from "@components/base/ConsultationModal.astro";
|
import ConsultationModal from "@components/base/ConsultationModal.astro";
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
title: string;
|
title: string;
|
||||||
description: string;
|
description: string;
|
||||||
canonicalLink?: string;
|
canonicalLink?: string;
|
||||||
|
breadcrumbs?: Array<{ label: string; href?: string }>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { title, description, canonicalLink } = Astro.props;
|
const { title, description, canonicalLink, breadcrumbs } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
|
|
@ -31,6 +33,11 @@ const { title, description, canonicalLink } = Astro.props;
|
||||||
<body>
|
<body>
|
||||||
<Header />
|
<Header />
|
||||||
<main class="main-content">
|
<main class="main-content">
|
||||||
|
{breadcrumbs && breadcrumbs.length > 0 && (
|
||||||
|
<div class="breadcrumbs-wrapper">
|
||||||
|
<Breadcrumbs items={breadcrumbs} />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<slot />
|
<slot />
|
||||||
</main>
|
</main>
|
||||||
<Footer />
|
<Footer />
|
||||||
|
|
@ -42,6 +49,12 @@ const { title, description, canonicalLink } = Astro.props;
|
||||||
.main-content {
|
.main-content {
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.breadcrumbs-wrapper {
|
||||||
|
padding-top: 4.75rem;
|
||||||
|
background: #f8fafc;
|
||||||
|
border-bottom: 1px solid rgba(30, 48, 80, 0.05);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,10 @@ import { SITE_URL } from '@constants';
|
||||||
title="Регистрация"
|
title="Регистрация"
|
||||||
description="Создайте аккаунт для доступа к личному кабинету"
|
description="Создайте аккаунт для доступа к личному кабинету"
|
||||||
canonicalLink={`${SITE_URL}/auth/sig-up`}
|
canonicalLink={`${SITE_URL}/auth/sig-up`}
|
||||||
|
breadcrumbs={[
|
||||||
|
{ label: 'Главная', href: '/' },
|
||||||
|
{ label: 'Регистрация' }
|
||||||
|
]}
|
||||||
>
|
>
|
||||||
<div class="auth-page">
|
<div class="auth-page">
|
||||||
<div class="auth-container">
|
<div class="auth-container">
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,10 @@ import { SITE_URL } from '@constants';
|
||||||
title="Вход в аккаунт"
|
title="Вход в аккаунт"
|
||||||
description="Войдите в свой аккаунт для доступа к личному кабинету"
|
description="Войдите в свой аккаунт для доступа к личному кабинету"
|
||||||
canonicalLink={`${SITE_URL}/auth/sign-in`}
|
canonicalLink={`${SITE_URL}/auth/sign-in`}
|
||||||
|
breadcrumbs={[
|
||||||
|
{ label: 'Главная', href: '/' },
|
||||||
|
{ label: 'Вход' }
|
||||||
|
]}
|
||||||
>
|
>
|
||||||
<div class="auth-page">
|
<div class="auth-page">
|
||||||
<div class="auth-container">
|
<div class="auth-container">
|
||||||
|
|
|
||||||
|
|
@ -7,22 +7,34 @@ import BlogCard from '@components/blog/BlogCard.astro';
|
||||||
import BlogPagination from '@components/blog/BlogPagination.astro';
|
import BlogPagination from '@components/blog/BlogPagination.astro';
|
||||||
import SearchModal from '@components/base/SearchModal.astro';
|
import SearchModal from '@components/base/SearchModal.astro';
|
||||||
import { blogPosts, categories } from '@data/blogData';
|
import { blogPosts, categories } from '@data/blogData';
|
||||||
|
|
||||||
|
const POSTS_PER_PAGE = 6;
|
||||||
|
const currentPage = 1;
|
||||||
|
const totalPages = Math.ceil(blogPosts.length / POSTS_PER_PAGE);
|
||||||
|
|
||||||
|
const startIndex = 0;
|
||||||
|
const endIndex = POSTS_PER_PAGE;
|
||||||
|
const paginatedPosts = blogPosts.slice(startIndex, endIndex);
|
||||||
---
|
---
|
||||||
|
|
||||||
<Layout
|
<Layout
|
||||||
title="Блог — автоюрист в Сургуте"
|
title="Блог — автоюрист в Сургуте"
|
||||||
description="Полезные статьи и советы по автоспорам, ДТП, ОСАГО, лишению прав и защите прав водителей."
|
description="Полезные статьи и советы по автоспорам, ДТП, ОСАГО, лишению прав и защите прав водителей."
|
||||||
canonicalLink={`${SITE_URL}/blog`}
|
canonicalLink={`${SITE_URL}/blog`}
|
||||||
|
breadcrumbs={[
|
||||||
|
{ label: "Главная", href: "/" },
|
||||||
|
{ label: "Блог" }
|
||||||
|
]}
|
||||||
>
|
>
|
||||||
<BlogHero />
|
<BlogHero />
|
||||||
|
|
||||||
<BlogCategories categories={categories} />
|
<BlogCategories categories={categories} activeCategory="Все" currentPage={currentPage} />
|
||||||
|
|
||||||
<!-- Сетка статей -->
|
<!-- Сетка статей -->
|
||||||
<section class="blog-grid-section">
|
<section class="blog-grid-section">
|
||||||
<div class="site-container">
|
<div class="site-container">
|
||||||
<div class="blog-grid" id="blog-grid">
|
<div class="blog-grid" id="blog-grid">
|
||||||
{blogPosts.map((post) => (
|
{paginatedPosts.map((post) => (
|
||||||
<article class="blog-card-wrapper" data-category={post.category}>
|
<article class="blog-card-wrapper" data-category={post.category}>
|
||||||
<BlogCard
|
<BlogCard
|
||||||
title={post.title}
|
title={post.title}
|
||||||
|
|
@ -39,7 +51,7 @@ import { blogPosts, categories } from '@data/blogData';
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Пагинация -->
|
<!-- Пагинация -->
|
||||||
<BlogPagination currentPage={1} totalPages={3} />
|
<BlogPagination currentPage={currentPage} totalPages={totalPages} />
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
|
||||||
170
frontend/src/pages/blog/page/[page].astro
Normal file
170
frontend/src/pages/blog/page/[page].astro
Normal file
|
|
@ -0,0 +1,170 @@
|
||||||
|
---
|
||||||
|
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 SearchModal from '@components/base/SearchModal.astro';
|
||||||
|
import { blogPosts, categories } from '@data/blogData';
|
||||||
|
|
||||||
|
const POSTS_PER_PAGE = 6;
|
||||||
|
const currentPage = Number(Astro.params.page) || 1;
|
||||||
|
const totalPages = Math.ceil(blogPosts.length / POSTS_PER_PAGE);
|
||||||
|
|
||||||
|
const startIndex = (currentPage - 1) * POSTS_PER_PAGE;
|
||||||
|
const endIndex = startIndex + POSTS_PER_PAGE;
|
||||||
|
const paginatedPosts = blogPosts.slice(startIndex, endIndex);
|
||||||
|
---
|
||||||
|
|
||||||
|
<Layout
|
||||||
|
title="Блог — страница ${currentPage} — автоюрист в Сургуте"
|
||||||
|
description="Полезные статьи и советы по автоспорам, ДТП, ОСАГО, лишении прав и защите прав водителей. Страница ${currentPage}."
|
||||||
|
canonicalLink={`${SITE_URL}/blog/page/${currentPage}`}
|
||||||
|
breadcrumbs={[
|
||||||
|
{ label: 'Главная', href: '/' },
|
||||||
|
{ label: 'Блог', href: '/blog' },
|
||||||
|
{ label: `Страница ${currentPage}` }
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<BlogHero />
|
||||||
|
|
||||||
|
<BlogCategories categories={categories} activeCategory="Все" currentPage={currentPage} />
|
||||||
|
|
||||||
|
<!-- Сетка статей -->
|
||||||
|
<section class="blog-grid-section">
|
||||||
|
<div class="site-container">
|
||||||
|
<div class="blog-grid" id="blog-grid">
|
||||||
|
{paginatedPosts.map((post) => (
|
||||||
|
<article class="blog-card-wrapper" data-category={post.category}>
|
||||||
|
<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}
|
||||||
|
/>
|
||||||
|
</article>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Пагинация -->
|
||||||
|
<BlogPagination currentPage={currentPage} totalPages={totalPages} />
|
||||||
|
</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>
|
||||||
|
|
||||||
|
<SearchModal />
|
||||||
|
</Layout>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.blog-grid-section {
|
||||||
|
padding: 3rem 0 0;
|
||||||
|
background: #f8fafc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
gap: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-card-wrapper {
|
||||||
|
transition: opacity 0.3s ease, transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ===== 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>
|
||||||
|
|
@ -9,6 +9,12 @@ import { blogPosts } from '@data/blogData';
|
||||||
const url = new URL(Astro.request.url);
|
const url = new URL(Astro.request.url);
|
||||||
const searchQuery = url.searchParams.get('q') || '';
|
const searchQuery = url.searchParams.get('q') || '';
|
||||||
|
|
||||||
|
const breadcrumbsItems = [
|
||||||
|
{ label: 'Главная', href: '/' },
|
||||||
|
{ label: 'Блог', href: '/blog' },
|
||||||
|
{ label: searchQuery ? `Поиск: "${searchQuery}"` : 'Поиск' }
|
||||||
|
];
|
||||||
|
|
||||||
// Функция поиска по статьям
|
// Функция поиска по статьям
|
||||||
function searchArticles(query: string) {
|
function searchArticles(query: string) {
|
||||||
if (!query.trim()) return [];
|
if (!query.trim()) return [];
|
||||||
|
|
@ -31,6 +37,7 @@ const searchResults = searchArticles(searchQuery);
|
||||||
title={`${searchQuery ? 'Результаты поиска: ' + searchQuery : 'Поиск статей'} — автоюрист в Сургуте`}
|
title={`${searchQuery ? 'Результаты поиска: ' + searchQuery : 'Поиск статей'} — автоюрист в Сургуте`}
|
||||||
description={`Результаты поиска статей по запросу "${searchQuery}"`}
|
description={`Результаты поиска статей по запросу "${searchQuery}"`}
|
||||||
canonicalLink={`${SITE_URL}/blog/search?q=${encodeURIComponent(searchQuery)}`}
|
canonicalLink={`${SITE_URL}/blog/search?q=${encodeURIComponent(searchQuery)}`}
|
||||||
|
breadcrumbs={breadcrumbsItems}
|
||||||
>
|
>
|
||||||
<!-- Hero-секция поиска -->
|
<!-- Hero-секция поиска -->
|
||||||
<section class="search-hero">
|
<section class="search-hero">
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,10 @@ import { SITE_URL } from '@constants';
|
||||||
title="Кейсы — выигранные дела автоюриста в Сургуте"
|
title="Кейсы — выигранные дела автоюриста в Сургуте"
|
||||||
description="Примеры выигранных дел по спорам со страховыми, возврату прав и другим автоспорам."
|
description="Примеры выигранных дел по спорам со страховыми, возврату прав и другим автоспорам."
|
||||||
canonicalLink={`${SITE_URL}/cases`}
|
canonicalLink={`${SITE_URL}/cases`}
|
||||||
|
breadcrumbs={[
|
||||||
|
{ label: 'Главная', href: '/' },
|
||||||
|
{ label: 'Кейсы' }
|
||||||
|
]}
|
||||||
>
|
>
|
||||||
<h1>Кейсы</h1>
|
<h1>Кейсы</h1>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,10 @@ const isAuthorized = false; // Измените на true, чтобы увиде
|
||||||
title="Контакты — автоюрист в Сургуте"
|
title="Контакты — автоюрист в Сургуте"
|
||||||
description="Свяжитесь с нами для консультации по вопросам автоспоров и юридической помощи автовладельцам."
|
description="Свяжитесь с нами для консультации по вопросам автоспоров и юридической помощи автовладельцам."
|
||||||
canonicalLink={`${SITE_URL}/contacts`}
|
canonicalLink={`${SITE_URL}/contacts`}
|
||||||
|
breadcrumbs={[
|
||||||
|
{ label: 'Главная', href: '/' },
|
||||||
|
{ label: 'Контакты' }
|
||||||
|
]}
|
||||||
>
|
>
|
||||||
<!-- Hero-секция -->
|
<!-- Hero-секция -->
|
||||||
<section class="contacts-hero">
|
<section class="contacts-hero">
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,10 @@ import { SITE_URL } from '@constants';
|
||||||
title="Частые вопросы (FAQ)"
|
title="Частые вопросы (FAQ)"
|
||||||
description="Ответы на частые вопросы по возврату водительских прав, спорам со страховыми, ДТП и другим юридическим услугам для автовладельцев в Сургуте."
|
description="Ответы на частые вопросы по возврату водительских прав, спорам со страховыми, ДТП и другим юридическим услугам для автовладельцев в Сургуте."
|
||||||
canonicalLink={`${SITE_URL}/faq`}
|
canonicalLink={`${SITE_URL}/faq`}
|
||||||
|
breadcrumbs={[
|
||||||
|
{ label: 'Главная', href: '/' },
|
||||||
|
{ label: 'Частые вопросы' }
|
||||||
|
]}
|
||||||
>
|
>
|
||||||
<h1>FAQ</h1>
|
<h1>FAQ</h1>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
@ -7,6 +7,10 @@ import { SITE_URL } from '@constants';
|
||||||
title="Политика конфиденциальности"
|
title="Политика конфиденциальности"
|
||||||
description="Политика конфиденциальности сайта Автоюрист086 — как мы собираем, используем и защищаем персональные данные пользователей."
|
description="Политика конфиденциальности сайта Автоюрист086 — как мы собираем, используем и защищаем персональные данные пользователей."
|
||||||
canonicalLink={`${SITE_URL}/privacy`}
|
canonicalLink={`${SITE_URL}/privacy`}
|
||||||
|
breadcrumbs={[
|
||||||
|
{ label: 'Главная', href: '/' },
|
||||||
|
{ label: 'Политика конфиденциальности' }
|
||||||
|
]}
|
||||||
>
|
>
|
||||||
<div class="legal-page">
|
<div class="legal-page">
|
||||||
<!-- Hero -->
|
<!-- Hero -->
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,10 @@ import { reviewsData, votingSummary } from '@data/reviewsData';
|
||||||
title="Отзывы клиентов — автоюрист в Сургуте"
|
title="Отзывы клиентов — автоюрист в Сургуте"
|
||||||
description="Отзывы реальных клиентов о нашей юридической помощи по автоспорам в Сургуте. Реальные истории и голосования."
|
description="Отзывы реальных клиентов о нашей юридической помощи по автоспорам в Сургуте. Реальные истории и голосования."
|
||||||
canonicalLink={`${SITE_URL}/reviews`}
|
canonicalLink={`${SITE_URL}/reviews`}
|
||||||
|
breadcrumbs={[
|
||||||
|
{ label: 'Главная', href: '/' },
|
||||||
|
{ label: 'Отзывы' }
|
||||||
|
]}
|
||||||
>
|
>
|
||||||
<section class="reviews-page">
|
<section class="reviews-page">
|
||||||
<!-- Hero-секция -->
|
<!-- Hero-секция -->
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,10 @@ import ServiceCategories from "@components/services/ServiceCategories.astro";
|
||||||
title="Услуги автоюриста в Сургуте — юридическая помощь автовладельцам"
|
title="Услуги автоюриста в Сургуте — юридическая помощь автовладельцам"
|
||||||
description="Полный спектр юридических услуг для автовладельцев: споры со страховыми, возврат прав, ДТП, автоспоры."
|
description="Полный спектр юридических услуг для автовладельцев: споры со страховыми, возврат прав, ДТП, автоспоры."
|
||||||
canonicalLink={`${SITE_URL}/services`}
|
canonicalLink={`${SITE_URL}/services`}
|
||||||
|
breadcrumbs={[
|
||||||
|
{ label: 'Главная', href: '/' },
|
||||||
|
{ label: 'Услуги' }
|
||||||
|
]}
|
||||||
>
|
>
|
||||||
<ServicesHeroServices />
|
<ServicesHeroServices />
|
||||||
<ServiceCategories />
|
<ServiceCategories />
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,10 @@ import { SITE_URL } from '@constants';
|
||||||
title="Условия использования"
|
title="Условия использования"
|
||||||
description="Условия использования сайта Автоюрист086 — правила, ограничения и ответственность при использовании материалов сайта."
|
description="Условия использования сайта Автоюрист086 — правила, ограничения и ответственность при использовании материалов сайта."
|
||||||
canonicalLink={`${SITE_URL}/terms`}
|
canonicalLink={`${SITE_URL}/terms`}
|
||||||
|
breadcrumbs={[
|
||||||
|
{ label: 'Главная', href: '/' },
|
||||||
|
{ label: 'Условия использования' }
|
||||||
|
]}
|
||||||
>
|
>
|
||||||
<div class="legal-page">
|
<div class="legal-page">
|
||||||
<!-- Hero -->
|
<!-- Hero -->
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "bun run --hot scripts/dev.js",
|
"dev": "bun run scripts/dev.js",
|
||||||
"dev:backend": "cd backend && ./pocketbase.exe serve",
|
"dev:backend": "cd backend && ./pocketbase.exe serve",
|
||||||
"dev:frontend": "cd frontend && bun dev",
|
"dev:frontend": "cd frontend && bun dev",
|
||||||
"build:frontend": "cd frontend && bun run build",
|
"build:frontend": "cd frontend && bun run build",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue