Новые правки в компоенты
This commit is contained in:
parent
d5c9c9a849
commit
acf877f325
16 changed files with 460 additions and 32 deletions
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
interface Props {
|
||||
posts: any[]; // Массив статей из PocketBase
|
||||
posts: any[];
|
||||
}
|
||||
|
||||
const { posts } = Astro.props;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
import PostTags from '@components/blog/PostTags.astro';
|
||||
|
||||
interface Props {
|
||||
post: any; // Объект статьи из PocketBase
|
||||
compact?: boolean; // Опция для компактного вида (опционально)
|
||||
post: any;
|
||||
compact?: boolean;
|
||||
}
|
||||
|
||||
const { post, compact = false } = Astro.props;
|
||||
|
|
|
|||
|
|
@ -41,10 +41,13 @@ try {
|
|||
];
|
||||
}
|
||||
|
||||
// Фильтрация элементов верхнего меню (показываем только первые 5: Главная, Услуги, Маршруты, Цены, Контакты)
|
||||
const topNavItems = navItems.filter(item => item.order <= 5);
|
||||
|
||||
// Фильтрация элемента "Startseite" на главной странице
|
||||
const filteredNavItems = currentPath === '/'
|
||||
? navItems.filter(item => item.label !== 'Startseite')
|
||||
: navItems;
|
||||
? topNavItems.filter(item => item.label !== 'Startseite')
|
||||
: topNavItems;
|
||||
|
||||
const userName = session?.user?.name || session?.user?.email?.split('@')[0] || 'Gast';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue