diff --git a/frontend/src/components/base/SearchModal.astro b/frontend/src/components/base/SearchModal.astro index 4bc6972..966274a 100644 --- a/frontend/src/components/base/SearchModal.astro +++ b/frontend/src/components/base/SearchModal.astro @@ -1,5 +1,18 @@ --- -const title = 'Поиск статей'; +import { blogPosts } from '@data/blogData'; + +const title = 'Поиск по статьям'; + +const searchData = blogPosts.map(post => ({ + title: post.title, + description: post.description, + slug: post.slug, + category: post.category, + categoryColor: post.categoryColor, + date: post.date +})); + +const postsJson = JSON.stringify(searchData); ---
- - + \ No newline at end of file diff --git a/frontend/src/components/blog/BlogCategories.astro b/frontend/src/components/blog/BlogCategories.astro index 339d435..9e181fc 100644 --- a/frontend/src/components/blog/BlogCategories.astro +++ b/frontend/src/components/blog/BlogCategories.astro @@ -7,16 +7,27 @@ export interface Props { const { categories, activeCategory = 'Все' } = Astro.props; --- -