From 648549688cf88b6db4a7ccc8eceb6ee82ec17618 Mon Sep 17 00:00:00 2001 From: Web-serfer Date: Mon, 11 May 2026 20:06:58 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=BE=D0=B2=D1=8B=D0=B5=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=BA=D0=BE=D0=BC=D0=BF=D0=BE=D0=B5?= =?UTF-8?q?=D0=BD=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AboutUs.astro | 8 +- src/components/ContactForm.astro | 2 +- src/components/Features.astro | 25 +++--- src/components/Hero.astro | 6 +- src/components/Navbar.astro | 129 ++++++++++++++----------------- src/components/Services.astro | 2 +- src/layouts/Layout.astro | 2 +- 7 files changed, 83 insertions(+), 91 deletions(-) diff --git a/src/components/AboutUs.astro b/src/components/AboutUs.astro index d956dc6..af42b42 100644 --- a/src/components/AboutUs.astro +++ b/src/components/AboutUs.astro @@ -1,18 +1,18 @@ --- --- -
+
-
+
Мастерская
@@ -22,7 +22,7 @@
-
+

Мастерство, проверенное временем

Наш сервисный центр специализируется на автомобилях Toyota и Lexus уже более 15 лет. Мы знаем каждую особенность этих марок, что позволяет нам проводить диагностику и ремонт с заводской точностью. diff --git a/src/components/ContactForm.astro b/src/components/ContactForm.astro index 2ff66b2..d0be651 100644 --- a/src/components/ContactForm.astro +++ b/src/components/ContactForm.astro @@ -1,7 +1,7 @@ --- --- -

+

Ждем вас в нашем сервисе

diff --git a/src/components/Features.astro b/src/components/Features.astro index 2371d8f..dee8861 100644 --- a/src/components/Features.astro +++ b/src/components/Features.astro @@ -3,29 +3,34 @@ const features = [ { title: "Опытные мастера", description: "Все наши специалисты прошли сертификацию и имеют огромный опыт работы именно с марками Toyota и Lexus.", - icon: `` + icon: `` }, { title: "Быстрый ремонт", description: "У нас в наличии большинство расходных материалов и запчастей, что позволяет выполнять работы в кратчайшие сроки.", - icon: `` + icon: `` }, { title: "Гарантия качества", description: "Предоставляем официальную гарантию на все выполненные работы и установленные запасные части.", - icon: `` + icon: `` } ]; --- -
-
-
+
+
+
+

Почему выбирают нас

+

Мы заботимся о вашем автомобиле как о своем собственном

+
+ +
{features.map((f, i) => ( -
-
-

{f.title}

-

{f.description}

+
+
+

{f.title}

+

{f.description}

))}
diff --git a/src/components/Hero.astro b/src/components/Hero.astro index 09d441e..7c98fd5 100644 --- a/src/components/Hero.astro +++ b/src/components/Hero.astro @@ -12,7 +12,7 @@
-
+
Специализированный центр в Сургуте @@ -24,11 +24,11 @@

Опытные специалисты, современное оборудование и только качественные запчасти. Ваш автомобиль в надежных руках профессионалов.

-
+
- + Посмотреть услуги
diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index 3b567cd..e551290 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -1,8 +1,14 @@ --- -const navItems = ['Услуги', 'О нас', 'Преимущества', 'Контакты']; +const navItems = [ + { name: 'Услуги', href: '#services' }, + { name: 'О нас', href: '#about' }, + { name: 'Преимущества', href: '#features' }, + { name: 'Контакты', href: '#contacts' } +]; --- -
-
-
-
- TL -
-
- TOYOTA LEXUS - Сервис Сургут -
+ @@ -76,19 +74,20 @@ const navItems = ['Услуги', 'О нас', 'Преимущества', 'Ко const navbar = document.getElementById('navbar')!; const logoText = document.getElementById('logo-text')!; const logoSub = document.getElementById('logo-sub')!; - const mobileLogoText = document.getElementById('mobile-logo-text')!; - const mobileLogoSub = document.getElementById('mobile-logo-sub')!; const desktopNav = document.getElementById('desktop-nav')!; const navLinks = desktopNav.querySelectorAll('.nav-link'); - const menuBtn = document.getElementById('menu-btn')!; - const mobileMenu = document.getElementById('mobile-menu')!; - const closeMenu = document.getElementById('close-menu')!; - const mobileNavLinks = mobileMenu.querySelectorAll('.mobile-nav-link'); + const mobileNavItems = document.querySelectorAll('.mobile-nav-item'); + const scrollProgress = document.getElementById('scroll-progress')!; let isScrolled = false; window.addEventListener('scroll', () => { - const scrolled = window.scrollY > 20; + const scrollTop = window.scrollY; + const docHeight = document.documentElement.scrollHeight - window.innerHeight; + const scrollPercent = docHeight > 0 ? (scrollTop / docHeight) * 100 : 0; + scrollProgress.style.width = scrollPercent + '%'; + + const scrolled = scrollTop > 20; if (scrolled !== isScrolled) { isScrolled = scrolled; if (isScrolled) { @@ -98,16 +97,10 @@ const navItems = ['Услуги', 'О нас', 'Преимущества', 'Ко logoText.classList.add('text-[#1a1a1a]'); logoSub.classList.remove('text-gray-300'); logoSub.classList.add('text-gray-500'); - mobileLogoText.classList.remove('text-white'); - mobileLogoText.classList.add('text-[#1a1a1a]'); - mobileLogoSub.classList.remove('text-gray-300'); - mobileLogoSub.classList.add('text-gray-500'); navLinks.forEach(link => { link.classList.remove('text-white'); link.classList.add('text-[#1a1a1a]'); }); - menuBtn.classList.remove('text-white'); - menuBtn.classList.add('text-[#1a1a1a]'); } else { navbar.classList.add('bg-transparent', 'py-5'); navbar.classList.remove('bg-white/90', 'backdrop-blur-md', 'shadow-sm', 'py-3'); @@ -115,30 +108,24 @@ const navItems = ['Услуги', 'О нас', 'Преимущества', 'Ко logoText.classList.remove('text-[#1a1a1a]'); logoSub.classList.add('text-gray-300'); logoSub.classList.remove('text-gray-500'); - mobileLogoText.classList.add('text-white'); - mobileLogoText.classList.remove('text-[#1a1a1a]'); - mobileLogoSub.classList.add('text-gray-300'); - mobileLogoSub.classList.remove('text-gray-500'); navLinks.forEach(link => { link.classList.add('text-white'); link.classList.remove('text-[#1a1a1a]'); }); - menuBtn.classList.add('text-white'); - menuBtn.classList.remove('text-[#1a1a1a]'); } } }); - menuBtn.addEventListener('click', () => { - mobileMenu.classList.remove('translate-x-full'); - document.body.style.overflow = 'hidden'; + mobileNavItems.forEach(item => { + item.addEventListener('click', (e) => { + e.preventDefault(); + const targetId = (item as HTMLAnchorElement).getAttribute('href'); + if (targetId) { + const targetElement = document.querySelector(targetId); + if (targetElement) { + targetElement.scrollIntoView({ behavior: 'smooth', block: 'start' }); + } + } + }); }); - - closeMenu.addEventListener('click', closeMobileMenu); - mobileNavLinks.forEach(link => link.addEventListener('click', closeMobileMenu)); - - function closeMobileMenu() { - mobileMenu.classList.add('translate-x-full'); - document.body.style.overflow = ''; - } \ No newline at end of file diff --git a/src/components/Services.astro b/src/components/Services.astro index a3a7e00..2c710ec 100644 --- a/src/components/Services.astro +++ b/src/components/Services.astro @@ -33,7 +33,7 @@ const services = [ ]; --- -
+

Наши Услуги

diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 0f988e4..9261f4b 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -13,7 +13,7 @@ - + \ No newline at end of file