Новые изменения в файлах

This commit is contained in:
Web-serfer 2026-04-14 23:50:27 +05:00
parent 9100de28a4
commit 28f41cf346
4 changed files with 15 additions and 14 deletions

View file

@ -182,17 +182,18 @@ const categories = ['Все', ...new Set(posts.map((post: any) => post.data.cate
// Фильтруем карточки
cards.forEach((card) => {
const cardCategory = card.getAttribute('data-category');
const el = card as HTMLElement;
if (category === 'Все' || cardCategory === category) {
card.style.display = '';
card.style.opacity = '0';
card.style.transform = 'translateY(20px)';
el.style.display = '';
el.style.opacity = '0';
el.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)';
el.style.transition = 'opacity 0.4s ease, transform 0.4s ease';
el.style.opacity = '1';
el.style.transform = 'translateY(0)';
});
} else {
card.style.display = 'none';
el.style.display = 'none';
}
});
});