diff --git a/AGENTS.md b/AGENTS.md
index db40da8..1a9d257 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -33,22 +33,17 @@
7. **Язык общения**
- Всё общение с пользователем происходит на русском языке
-8. **Проверка изменений**
- - После внесения изменений в код не требуется запускать сервер разработки для проверки
- - Пользователь самостоятельно запускает сервер и проверяет изменения
-
-9. **Проверка типов данных**
+8 **Проверка типов данных**
- Проверять проект на ошибки типизации через команду `bun run tsc --noEmit -p frontend/tsconfig.json`
+ - Не производить сборку проекта без моего разрешения
- В проекте не должно быть типов any
- Все интерфейсы компонентов прописывать в файле globalInterfaces.ts
- При работе с PocketBase использовать актуальные сигнатуры методов из файла `D:\Verstka\production\astro_minivan\frontend\node_modules\pocketbase\dist\pocketbase.es.d.ts`
-10. **Плагин @astrojs/sitemap**
+9 **Плагин @astrojs/sitemap**
- Обязательно к установке в проект пакета @astrojs/sitemap
- Обязательно к созданию в проекте файла .nvmrc
-11. **Замена хоста при развертывании проекта**
- - Обязательно нужно изменить http://localhost:3000/ в шаблонах писем на реальный
## Технические правила (Astro)
diff --git a/frontend/src/components/base/AuthLockBlock.astro b/frontend/src/components/base/AuthLockBlock.astro
index 172358e..d717534 100644
--- a/frontend/src/components/base/AuthLockBlock.astro
+++ b/frontend/src/components/base/AuthLockBlock.astro
@@ -28,7 +28,7 @@ const delay = typeof dataDelay === 'number' ? dataDelay : parseInt(String(dataDe
data-delay={delay}
>
@@ -64,8 +64,8 @@ const delay = typeof dataDelay === 'number' ? dataDelay : parseInt(String(dataDe
}
.lock-icon-container {
- width: 4rem;
- height: 4rem;
+ width: 3rem;
+ height: 3rem;
background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(30, 64, 175, 0.3) 100%);
border-radius: 50%;
display: flex;
@@ -78,8 +78,20 @@ const delay = typeof dataDelay === 'number' ? dataDelay : parseInt(String(dataDe
@media (min-width: 768px) {
.lock-icon-container {
- width: 5rem;
- height: 5rem;
+ width: 4rem;
+ height: 4rem;
+ }
+ }
+
+ .lock-icon-container svg {
+ width: 1.5rem;
+ height: 1.5rem;
+ }
+
+ @media (min-width: 768px) {
+ .lock-icon-container svg {
+ width: 2rem;
+ height: 2rem;
}
}
diff --git a/frontend/src/components/base/CTA.astro b/frontend/src/components/base/CTA.astro
index 4475abd..b076e5b 100644
--- a/frontend/src/components/base/CTA.astro
+++ b/frontend/src/components/base/CTA.astro
@@ -207,5 +207,4 @@ const iconPaths: Record = {
};
setupAnimations();
- document.addEventListener('astro:page-load', setupAnimations);
diff --git a/frontend/src/components/blog/BlogCategories.astro b/frontend/src/components/blog/BlogCategories.astro
index 8bdabfd..99b04d7 100644
--- a/frontend/src/components/blog/BlogCategories.astro
+++ b/frontend/src/components/blog/BlogCategories.astro
@@ -145,7 +145,6 @@ const { categories, activeCategory = 'Все', currentPage = 1 } = Astro.props;
\ No newline at end of file
diff --git a/frontend/src/components/reviews/ReviewFormContainer.tsx b/frontend/src/components/reviews/ReviewFormContainer.tsx
index 4f782b8..b48299b 100644
--- a/frontend/src/components/reviews/ReviewFormContainer.tsx
+++ b/frontend/src/components/reviews/ReviewFormContainer.tsx
@@ -105,8 +105,8 @@ export default function ReviewFormContainer() {
-
-
+
diff --git a/frontend/src/layouts/Layout.astro b/frontend/src/layouts/Layout.astro
index ee545e9..55eac54 100644
--- a/frontend/src/layouts/Layout.astro
+++ b/frontend/src/layouts/Layout.astro
@@ -1,7 +1,6 @@
---
import "@styles/global.css";
import { SITE_TITLE_SUFFIX } from "@constants";
-import { ClientRouter } from 'astro:transitions';
import Header from "@components/layout/header/Header.astro";
import Footer from "@components/layout/footer/Footer.astro";
@@ -35,7 +34,6 @@ const { title, description, canonicalLink, breadcrumbs } = Astro.props;
-
@@ -66,26 +64,6 @@ const { title, description, canonicalLink, breadcrumbs } = Astro.props;
diff --git a/frontend/src/pages/blog/category/[category].astro b/frontend/src/pages/blog/category/[category].astro
index 8c101fb..cb01540 100644
--- a/frontend/src/pages/blog/category/[category].astro
+++ b/frontend/src/pages/blog/category/[category].astro
@@ -167,5 +167,37 @@ const formatDate = (date: string) => {
};
setupAnimations();
- document.addEventListener('astro:page-load', setupAnimations);
+ setupFilter();
+
+ function setupFilter() {
+ const buttons = document.querySelectorAll('.category-btn');
+ const cards = document.querySelectorAll('.blog-card-wrapper');
+
+ buttons.forEach((btn) => {
+ btn.addEventListener('click', (e) => {
+ e.preventDefault();
+ 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');
+ const el = card as HTMLElement;
+ if (category === 'Все' || cardCategory === category) {
+ el.style.display = '';
+ el.style.opacity = '0';
+ el.style.transform = 'translateY(20px)';
+ requestAnimationFrame(() => {
+ el.style.transition = 'opacity 0.4s ease, transform 0.4s ease';
+ el.style.opacity = '1';
+ el.style.transform = 'translateY(0)';
+ });
+ } else {
+ el.style.display = 'none';
+ }
+ });
+ });
+ });
+ }
\ No newline at end of file
diff --git a/frontend/src/pages/blog/category/[category]/page/[page].astro b/frontend/src/pages/blog/category/[category]/page/[page].astro
index cf64a4a..452f2d5 100644
--- a/frontend/src/pages/blog/category/[category]/page/[page].astro
+++ b/frontend/src/pages/blog/category/[category]/page/[page].astro
@@ -168,5 +168,4 @@ const formatDate = (date: string) => {
};
setupAnimations();
- document.addEventListener('astro:page-load', setupAnimations);
\ No newline at end of file
diff --git a/frontend/src/pages/blog/index.astro b/frontend/src/pages/blog/index.astro
index ec1f23a..cd4557d 100644
--- a/frontend/src/pages/blog/index.astro
+++ b/frontend/src/pages/blog/index.astro
@@ -183,8 +183,4 @@ const formatDate = (date: string) => {
setupAnimations();
setupFilter();
- document.addEventListener('astro:page-load', () => {
- setupAnimations();
- setupFilter();
- });
\ No newline at end of file
diff --git a/frontend/src/pages/blog/page/[page].astro b/frontend/src/pages/blog/page/[page].astro
index 36f3e7a..46dfe61 100644
--- a/frontend/src/pages/blog/page/[page].astro
+++ b/frontend/src/pages/blog/page/[page].astro
@@ -148,6 +148,38 @@ const formatDate = (date: string) => {
});
};
+ const setupFilter = () => {
+ const buttons = document.querySelectorAll('.category-btn');
+ const cards = document.querySelectorAll('.blog-card-wrapper');
+
+ buttons.forEach((btn) => {
+ btn.addEventListener('click', (e) => {
+ e.preventDefault();
+ 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');
+ const el = card as HTMLElement;
+ if (category === 'Все' || cardCategory === category) {
+ el.style.display = '';
+ el.style.opacity = '0';
+ el.style.transform = 'translateY(20px)';
+ requestAnimationFrame(() => {
+ el.style.transition = 'opacity 0.4s ease, transform 0.4s ease';
+ el.style.opacity = '1';
+ el.style.transform = 'translateY(0)';
+ });
+ } else {
+ el.style.display = 'none';
+ }
+ });
+ });
+ });
+ };
+
setupAnimations();
- document.addEventListener('astro:page-load', setupAnimations);
+ setupFilter();
\ No newline at end of file
diff --git a/frontend/src/pages/contacts.astro b/frontend/src/pages/contacts.astro
index 6d4c06c..cea9a5a 100644
--- a/frontend/src/pages/contacts.astro
+++ b/frontend/src/pages/contacts.astro
@@ -344,10 +344,4 @@ const isAuthorized = false; // Измените на true, чтобы увиде
// Инициализация
setupAnimations();
setupForm();
-
- // Для поддержки Astro transitions
- document.addEventListener('astro:page-load', () => {
- setupAnimations();
- setupForm();
- });
diff --git a/frontend/src/pages/documents.astro b/frontend/src/pages/documents.astro
index 3d310c1..d9e4367 100644
--- a/frontend/src/pages/documents.astro
+++ b/frontend/src/pages/documents.astro
@@ -181,8 +181,4 @@ const categories = getCategories();
};
setupFilter();
-
- document.addEventListener('astro:page-load', () => {
- setupFilter();
- });
diff --git a/frontend/src/pages/reviews.astro b/frontend/src/pages/reviews.astro
index f35f5e2..304faf7 100644
--- a/frontend/src/pages/reviews.astro
+++ b/frontend/src/pages/reviews.astro
@@ -195,9 +195,4 @@ import ReviewsList from '@components/reviews/ReviewsList.astro';
// Запуск
setupAnimations();
-
- // Для поддержки View Transitions в Astro
- document.addEventListener('astro:page-load', () => {
- setupAnimations();
- });