diff --git a/frontend/src/components/base/Breadcrumbs.astro b/frontend/src/components/base/Breadcrumbs.astro
new file mode 100644
index 0000000..8987691
--- /dev/null
+++ b/frontend/src/components/base/Breadcrumbs.astro
@@ -0,0 +1,97 @@
+---
+export interface BreadcrumbItem {
+ label: string;
+ href?: string;
+}
+
+export interface Props {
+ items: BreadcrumbItem[];
+}
+
+const { items } = Astro.props;
+---
+
+
+
+
diff --git a/frontend/src/components/blog/BlogCategories.astro b/frontend/src/components/blog/BlogCategories.astro
index 9e181fc..e8119fa 100644
--- a/frontend/src/components/blog/BlogCategories.astro
+++ b/frontend/src/components/blog/BlogCategories.astro
@@ -2,9 +2,10 @@
export interface Props {
categories: string[];
activeCategory?: string;
+ currentPage?: number;
}
-const { categories, activeCategory = 'Все' } = Astro.props;
+const { categories, activeCategory = 'Все', currentPage = 1 } = Astro.props;
---
@@ -12,12 +13,13 @@ const { categories, activeCategory = 'Все' } = Astro.props;
{categories.map((cat) => (
-
+
))}
@@ -82,12 +84,15 @@ const { categories, activeCategory = 'Все' } = Astro.props;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
white-space: nowrap;
+ text-decoration: none;
+ display: inline-block;
}
.category-btn:hover {
border-color: #d4af37;
color: #d4af37;
transform: translateY(-2px);
+ text-decoration: none;
}
.category-btn.active {
@@ -95,6 +100,7 @@ const { categories, activeCategory = 'Все' } = Astro.props;
border-color: #d4af37;
color: #1e293b;
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);
function initFilter() {
- const buttons = 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 links = document.querySelectorAll('.category-btn');
// Открытие поиска
const searchBtn = document.getElementById('search-icon-btn');
diff --git a/frontend/src/layouts/Layout.astro b/frontend/src/layouts/Layout.astro
index 72edd3e..027281e 100644
--- a/frontend/src/layouts/Layout.astro
+++ b/frontend/src/layouts/Layout.astro
@@ -4,15 +4,17 @@ import { SITE_TITLE_SUFFIX } from "@constants";
import Header from "@components/layout/header/Header.astro";
import Footer from "@components/layout/footer/Footer.astro";
+import Breadcrumbs from "@components/base/Breadcrumbs.astro";
import ConsultationModal from "@components/base/ConsultationModal.astro";
export interface Props {
title: string;
description: string;
canonicalLink?: string;
+ breadcrumbs?: Array<{ label: string; href?: string }>;
}
-const { title, description, canonicalLink } = Astro.props;
+const { title, description, canonicalLink, breadcrumbs } = Astro.props;
---
@@ -31,6 +33,11 @@ const { title, description, canonicalLink } = Astro.props;
+ {breadcrumbs && breadcrumbs.length > 0 && (
+
+
+
+ )}
@@ -42,6 +49,12 @@ const { title, description, canonicalLink } = Astro.props;
.main-content {
padding-top: 0;
}
+
+ .breadcrumbs-wrapper {
+ padding-top: 4.75rem;
+ background: #f8fafc;
+ border-bottom: 1px solid rgba(30, 48, 80, 0.05);
+ }