Новые изменения в компоенты
This commit is contained in:
parent
acb7b88ff1
commit
9122756a58
11 changed files with 360 additions and 13 deletions
|
|
@ -207,5 +207,5 @@ const iconPaths: Record<string, string> = {
|
|||
};
|
||||
|
||||
setupAnimations();
|
||||
document.addEventListener('astro:after-swap', setupAnimations);
|
||||
document.addEventListener('astro:page-load', setupAnimations);
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -13,13 +13,12 @@ const { categories, activeCategory = 'Все', currentPage = 1 } = Astro.props;
|
|||
<div class="categories-inner animate-on-scroll" data-animation="fade-up">
|
||||
<div class="categories-wrapper">
|
||||
{categories.map((cat) => (
|
||||
<a
|
||||
href={cat === 'Все' ? '/blog' : `/blog/category/${cat.toLowerCase()}`}
|
||||
<button
|
||||
class={`category-btn ${cat === activeCategory ? 'active' : ''}`}
|
||||
data-category={cat}
|
||||
>
|
||||
{cat}
|
||||
</a>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
|
|
@ -100,7 +99,6 @@ const { categories, activeCategory = 'Все', currentPage = 1 } = Astro.props;
|
|||
border-color: #d4af37;
|
||||
color: #1e293b;
|
||||
box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Анимации */
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ const colors = ['bg-gradient-1', 'bg-gradient-2', 'bg-gradient-3', 'bg-gradient-
|
|||
setupSlider();
|
||||
setupAnimations();
|
||||
|
||||
document.addEventListener('astro:after-swap', () => {
|
||||
document.addEventListener('astro:page-load', () => {
|
||||
setupSlider();
|
||||
setupAnimations();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue