From ed01ec28ed7660f18ca09b28299a9ab4cde70669 Mon Sep 17 00:00:00 2001 From: Web-serfer Date: Sat, 11 Apr 2026 20:05:17 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B0=20?= =?UTF-8?q?=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D0=B0=20-=20=D0=94?= =?UTF-8?q?=D0=BE=D0=BA=D1=83=D0=BC=D0=B5=D0=BD=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/base/Pagination.astro | 5 +- .../src/components/documents/DocCard.astro | 217 +++++++++ .../components/documents/DocCategories.astro | 126 +++++ .../documents/SearchDocumentsModal.astro | 409 ++++++++++++++++ frontend/src/components/faq/FaqItem.astro | 447 ++++++++++++++++++ .../src/components/layout/footer/Footer.astro | 10 +- frontend/src/data/documents.ts | 196 ++++++++ frontend/src/pages/documents.astro | 310 ++++++++++++ frontend/src/pages/faq.astro | 135 +++++- 9 files changed, 1839 insertions(+), 16 deletions(-) create mode 100644 frontend/src/components/documents/DocCard.astro create mode 100644 frontend/src/components/documents/DocCategories.astro create mode 100644 frontend/src/components/documents/SearchDocumentsModal.astro create mode 100644 frontend/src/components/faq/FaqItem.astro create mode 100644 frontend/src/data/documents.ts create mode 100644 frontend/src/pages/documents.astro diff --git a/frontend/src/components/base/Pagination.astro b/frontend/src/components/base/Pagination.astro index e6d8111..ff592bb 100644 --- a/frontend/src/components/base/Pagination.astro +++ b/frontend/src/components/base/Pagination.astro @@ -14,7 +14,10 @@ const { } = Astro.props as PaginationProps; const getPageUrl = (page: number) => { - if (page === 1) return baseUrl; + if (baseUrl === '/documents' || baseUrl === '/faq') { + if (page === 1) return baseUrl; + return `${baseUrl}?page=${page}`; + } return `${baseUrl}/page/${page}`; }; diff --git a/frontend/src/components/documents/DocCard.astro b/frontend/src/components/documents/DocCard.astro new file mode 100644 index 0000000..6ac201e --- /dev/null +++ b/frontend/src/components/documents/DocCard.astro @@ -0,0 +1,217 @@ +--- +interface Props { + id: string; + title: string; + description: string; + fileSize: string; + fileType: 'pdf' | 'docx' | 'xlsx' | 'zip'; + downloadUrl: string; + category: string; +} + +const { + id, + title, + description, + fileSize, + fileType, + downloadUrl, + category +} = Astro.props as Props; + +const fileTypeIcons: Record = { + pdf: ` + + + `, + docx: ` + + + `, + xlsx: ` + + + `, + zip: ` + + + ` +}; +--- + + + + diff --git a/frontend/src/components/documents/DocCategories.astro b/frontend/src/components/documents/DocCategories.astro new file mode 100644 index 0000000..4fa0f31 --- /dev/null +++ b/frontend/src/components/documents/DocCategories.astro @@ -0,0 +1,126 @@ +--- +interface Props { + categories: string[]; + activeCategory: string; + showSearch?: boolean; +} + +const { categories, activeCategory, showSearch = true } = Astro.props as Props; +--- + + + + + + diff --git a/frontend/src/components/documents/SearchDocumentsModal.astro b/frontend/src/components/documents/SearchDocumentsModal.astro new file mode 100644 index 0000000..f0e4e5a --- /dev/null +++ b/frontend/src/components/documents/SearchDocumentsModal.astro @@ -0,0 +1,409 @@ +--- +import { documents } from '@data/documents'; + +const searchData = documents.map(doc => ({ + title: doc.title, + description: doc.description, + downloadUrl: doc.downloadUrl, + category: doc.category, + fileType: doc.fileType, + fileSize: doc.fileSize, + tags: doc.tags?.join(', ') || '' +})); + +const title = 'Поиск документов'; +const postsJson = JSON.stringify(searchData); +--- + + + + + + diff --git a/frontend/src/components/faq/FaqItem.astro b/frontend/src/components/faq/FaqItem.astro new file mode 100644 index 0000000..d26a206 --- /dev/null +++ b/frontend/src/components/faq/FaqItem.astro @@ -0,0 +1,447 @@ +--- +interface FaqItem { + question: string; + answer: string; +} + +const { + sectionSubtitle = "ОТВЕТЫ НА ВОПРОСЫ", + sectionTitle = "Часто задаваемые вопросы", + faqItems = [ + { + question: "Сколько стоит первичная консультация?", + answer: "Первичная консультация проводится бесплатно. Мы оценим вашу ситуацию, расскажем о перспективах дела и предложим оптимальную стратегию защиты. Это ни к чему вас не обязывает." + }, + { + question: "Какие документы нужны для начала работы?", + answer: "Для анализа ситуации потребуются: протокол об административном правонарушении, постановление по делу, материалы ДТП (если есть), страховой полис ОСАГО/КАСКО, а также любые другие документы, относящиеся к вашему делу." + }, + { + question: "Каковы шансы на успех моего дела?", + answer: "После изучения документов мы честно расскажем о реальных перспективах. По статистике, около 98% дел завершаются успешно. Если видим, что шансов нет — так и скажем, чтобы вы не тратили время и деньги." + }, + { + question: "Сколько времени занимает рассмотрение дела?", + answer: "Сроки зависят от сложности: простые консультации и составление жалоб — 1-3 дня, представление интересов в суде — от 2 недель до 2 месяцев. Точные сроки назовем после анализа вашей ситуации." + }, + { + question: "Работаете ли вы с делами, где уже вынесено решение?", + answer: "Да, мы помогаем обжаловать постановления и решения судов. Срок на обжалование обычно составляет 10 дней с момента вынесения постановления, но есть возможности восстановления срока и в более поздний период." + }, + { + question: "Можно ли решить вопрос без суда?", + answer: "Во многих случаях — да. Мы ведём переговоры со страховыми компаниями, ГИБДД, автосалонами и другими участниками. Досудебное урегулирование часто быстрее и выгоднее для клиента." + } + ] as FaqItem[] +} = Astro.props; +--- + +
+
+ +
+
+
+ {sectionSubtitle} +
+
+

{sectionTitle}

+

+ Собрали ответы на самые частые вопросы наших клиентов. Не нашли ответ? Позвоните — проконсультируем бесплатно +

+
+ + +
+ {faqItems.map((item: FaqItem, index: number) => ( +
+ +
+
+

{item.answer}

+
+
+
+ ))} +
+
+
+ + + + diff --git a/frontend/src/components/layout/footer/Footer.astro b/frontend/src/components/layout/footer/Footer.astro index f84c4fd..937be30 100644 --- a/frontend/src/components/layout/footer/Footer.astro +++ b/frontend/src/components/layout/footer/Footer.astro @@ -12,11 +12,9 @@ const legalLinks = [ { label: 'Условия использования', href: '/terms' }, ]; -const infoLinks = [ +const otherLinks = [ { label: 'Часто задаваемые вопросы', href: '/faq' }, - { label: 'Политика конфиденциальности', href: '/privacy' }, - { label: 'Условия использования', href: '/terms' }, - { label: 'Возврат средств', href: '#' }, + { label: 'Правовые документы', href: '/documents' }, ]; const currentYear = new Date().getFullYear().toString(); @@ -51,9 +49,9 @@ const currentYear = new Date().getFullYear().toString();