Новые правки компоентов

This commit is contained in:
Web-serfer 2026-05-11 20:06:58 +05:00
parent 8bda45585b
commit 648549688c
7 changed files with 83 additions and 91 deletions

View file

@ -1,18 +1,18 @@
---
---
<section id="О нас" class="py-24 bg-[#1a1a1a] text-white overflow-hidden relative">
<section id="about" class="py-24 bg-[#1a1a1a] text-white overflow-hidden relative">
<div class="absolute top-0 right-0 w-1/3 h-full opacity-10 pointer-events-none">
<div class="absolute inset-0 bg-[radial-gradient(circle_at_center,#E51937_0%,transparent_70%)]" />
</div>
<div class="max-w-7xl mx-auto px-6 grid md:grid-cols-2 gap-16 items-center">
<div class="relative">
<div class="relative order-2 md:order-1">
<div class="relative rounded-[2.5rem] overflow-hidden">
<img
src="/images/services_room.avif"
alt="Мастерская"
class="w-full h-[500px] object-cover"
class="w-full h-[300px] md:h-[500px] object-cover"
/>
<div class="absolute inset-0 bg-gradient-to-t from-[#1a1a1a] via-transparent to-transparent" />
</div>
@ -22,7 +22,7 @@
</div>
</div>
<div>
<div class="text-center md:text-left order-1 md:order-2">
<h2 class="text-4xl md:text-5xl font-bold mb-8 italic">Мастерство, проверенное временем</h2>
<p class="text-gray-300 mb-6 font-light leading-relaxed">
Наш сервисный центр специализируется на автомобилях Toyota и Lexus уже более 15 лет. Мы знаем каждую особенность этих марок, что позволяет нам проводить диагностику и ремонт с заводской точностью.

View file

@ -1,7 +1,7 @@
---
---
<section id="Контакты" class="py-24 bg-white relative overflow-hidden">
<section id="contacts" class="py-24 bg-white relative overflow-hidden">
<div class="max-w-7xl mx-auto px-6 grid md:grid-cols-2 gap-16 items-center">
<div class="text-center md:text-left">
<h2 class="text-4xl md:text-5xl font-bold mb-8">Ждем вас в нашем сервисе</h2>

View file

@ -3,29 +3,34 @@ const features = [
{
title: "Опытные мастера",
description: "Все наши специалисты прошли сертификацию и имеют огромный опыт работы именно с марками Toyota и Lexus.",
icon: `<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></svg>`
icon: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></svg>`
},
{
title: "Быстрый ремонт",
description: "У нас в наличии большинство расходных материалов и запчастей, что позволяет выполнять работы в кратчайшие сроки.",
icon: `<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>`
icon: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>`
},
{
title: "Гарантия качества",
description: "Предоставляем официальную гарантию на все выполненные работы и установленные запасные части.",
icon: `<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10"/><path d="m9 12 2 2 4-4"/></svg>`
icon: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10"/><path d="m9 12 2 2 4-4"/></svg>`
}
];
---
<section id="Преимущества" class="py-24 bg-white">
<div class="max-w-7xl mx-auto px-6">
<div class="grid md:grid-cols-3 gap-12">
<section id="features" class="py-24 bg-white">
<div class="max-w-7xl mx-auto px-6 text-center">
<div class="mb-16">
<h2 class="text-4xl md:text-5xl font-bold mb-4">Почему выбирают нас</h2>
<p class="text-gray-500 max-w-xl mx-auto">Мы заботимся о вашем автомобиле как о своем собственном</p>
</div>
<div class="grid sm:grid-cols-2 lg:grid-cols-3 gap-6">
{features.map((f, i) => (
<div class="flex flex-col items-center text-center p-8 rounded-3xl hover:bg-gray-50 transition-colors">
<div class="w-16 h-16 bg-red-50 rounded-2xl flex items-center justify-center mb-6 text-[#E51937]" set:html={f.icon} />
<h3 class="text-xl font-bold mb-4">{f.title}</h3>
<p class="text-gray-600 leading-relaxed font-light">{f.description}</p>
<div class="bg-white p-8 rounded-3xl border border-gray-100 flex flex-col items-center text-center group transition-all hover:shadow-xl hover:-translate-y-1">
<div class="w-12 h-12 bg-[#1a1a1a] text-white rounded-xl flex items-center justify-center mb-6 group-hover:bg-[#E51937] transition-colors" set:html={f.icon} />
<h4 class="text-xl font-bold mb-2">{f.title}</h4>
<p class="text-gray-500 text-sm flex-grow">{f.description}</p>
</div>
))}
</div>

View file

@ -12,7 +12,7 @@
</div>
<div class="relative z-10 max-w-7xl mx-auto px-6 w-full">
<div class="max-w-2xl animate-fade-in-up text-center">
<div class="max-w-2xl animate-fade-in-up text-center md:text-left">
<div class="inline-flex items-center gap-2 px-3 py-1 bg-white/10 backdrop-blur-md rounded-full text-[#E51937] text-xs font-bold uppercase tracking-widest mb-6">
<span class="w-2 h-2 rounded-full bg-[#E51937] animate-pulse-dot" />
Специализированный центр в Сургуте
@ -24,11 +24,11 @@
<p class="text-lg md:text-xl text-gray-300 mb-10 font-light">
Опытные специалисты, современное оборудование и только качественные запчасти. Ваш автомобиль в надежных руках профессионалов.
</p>
<div class="flex flex-col sm:flex-row gap-4 items-center">
<div class="flex flex-col sm:flex-row gap-4 items-center md:items-start">
<button class="w-full sm:w-auto bg-[#E51937] text-white px-8 py-4 rounded-xl font-bold text-lg hover:bg-red-700 transition-all transform hover:scale-105 shadow-xl shadow-red-600/20">
Записаться на сервис
</button>
<a href="#Услуги" class="w-full sm:w-auto bg-white/10 backdrop-blur-md text-white border border-white/20 px-8 py-4 rounded-xl font-bold text-lg hover:bg-white/20 transition-all text-center">
<a href="#services" class="w-full sm:w-auto bg-white/10 backdrop-blur-md text-white border border-white/20 px-8 py-4 rounded-xl font-bold text-lg hover:bg-white/20 transition-all text-center">
Посмотреть услуги
</a>
</div>

View file

@ -1,8 +1,14 @@
---
const navItems = ['Услуги', 'О нас', 'Преимущества', 'Контакты'];
const navItems = [
{ name: 'Услуги', href: '#services' },
{ name: 'О нас', href: '#about' },
{ name: 'Преимущества', href: '#features' },
{ name: 'Контакты', href: '#contacts' }
];
---
<nav id="navbar" class="fixed top-0 w-full z-50 transition-all duration-300 bg-transparent py-5">
<div id="scroll-progress" class="absolute bottom-0 left-0 h-0.5 bg-[#E51937] transition-all duration-300" style="width: 0%"></div>
<div class="max-w-7xl mx-auto px-6 flex justify-between items-center">
<div class="flex items-center gap-2">
<div class="w-10 h-10 bg-[#E51937] rounded-lg flex items-center justify-center text-white font-bold text-xl">
@ -16,8 +22,8 @@ const navItems = ['Услуги', 'О нас', 'Преимущества', 'Ко
<div id="desktop-nav" class="hidden md:flex items-center gap-8">
{navItems.map((item) => (
<a href={`#${item}`} class="nav-link text-sm font-medium hover:text-[#E51937] transition-colors text-white">
{item}
<a href={item.href} class="nav-link text-sm font-medium hover:text-[#E51937] transition-colors text-white">
{item.name}
</a>
))}
<a href="tel:+73462000000" class="flex items-center gap-2 bg-[#E51937] text-white px-5 py-2.5 rounded-full text-sm font-semibold hover:bg-red-700 transition-colors">
@ -27,48 +33,40 @@ const navItems = ['Услуги', 'О нас', 'Преимущества', 'Ко
+7 (3462) 00-00-00
</a>
</div>
<button id="menu-btn" class="md:hidden text-white transition-all duration-200 hover:scale-110 active:scale-90 p-2 rounded-lg hover:shadow-[0_0_15px_rgba(229,25,55,0.5)] active:shadow-[0_0_25px_rgba(229,25,55,0.8)]">
<svg id="menu-icon" xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="4" x2="20" y1="12" y2="12"/>
<line x1="4" x2="20" y1="6" y2="6"/>
<line x1="4" x2="20" y1="18" y2="18"/>
</svg>
</button>
</div>
</nav>
<div id="mobile-menu" class="fixed inset-0 bg-[#1a1a1a] z-[100] p-8 flex flex-col translate-x-full transition-transform duration-300">
<div class="flex justify-between items-center mb-12">
<div class="flex items-center gap-2">
<div class="w-10 h-10 bg-[#E51937] rounded-lg flex items-center justify-center text-white font-bold text-xl">
TL
</div>
<div class="flex flex-col leading-none">
<span id="mobile-logo-text" class="font-bold text-lg tracking-tight text-white">TOYOTA LEXUS</span>
<span id="mobile-logo-sub" class="text-xs uppercase tracking-[0.2em] font-medium text-gray-300">Сервис Сургут</span>
</div>
<div id="mobile-bottom-bar" class="fixed bottom-4 left-4 right-4 md:hidden z-40">
<div class="bg-white/90 backdrop-blur-md rounded-2xl shadow-lg border border-white/20 px-2 py-3">
<div class="flex justify-between items-center gap-1">
{navItems.map((item) => (
<a href={item.href} class="mobile-nav-item flex flex-col items-center gap-1.5 p-2 rounded-xl hover:bg-[#E51937]/10 active:bg-[#E51937]/20 transition-all duration-200 group flex-1 hover:scale-105 active:scale-95">
<div class="w-10 h-10 rounded-full bg-[#1a1a1a] group-hover:bg-[#E51937] flex items-center justify-center transition-all duration-200">
{item.name === 'Услуги' && (
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-white group-hover:text-white transition-colors">
<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/>
</svg>
)}
{item.name === 'О нас' && (
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-white group-hover:text-white transition-colors">
<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>
</svg>
)}
{item.name === 'Преимущества' && (
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-white group-hover:text-white transition-colors">
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10"/><path d="m9 12 2 2 4-4"/>
</svg>
)}
{item.name === 'Контакты' && (
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-white group-hover:text-white transition-colors">
<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/>
</svg>
)}
</div>
<span class="text-[10px] font-medium text-gray-600 group-hover:text-[#E51937] transition-colors duration-200 text-center leading-tight">{item.name}</span>
</a>
))}
</div>
<button id="close-menu" class="text-white transition-all duration-200 hover:scale-110 active:scale-90 p-2 rounded-lg hover:shadow-[0_0_15px_rgba(229,25,55,0.5)] active:shadow-[0_0_25px_rgba(229,25,55,0.8)]">
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M18 6 6 18"/><path d="m6 6 12 12"/>
</svg>
</button>
</div>
<div class="flex flex-col gap-6">
{navItems.map((item) => (
<a href={`#${item}`} class="mobile-nav-link text-white text-3xl font-light hover:text-[#E51937] transition-colors">
{item}
</a>
))}
</div>
<div class="mt-auto">
<a href="tel:+73462000000" class="flex items-center justify-center gap-2 bg-[#E51937] text-white py-4 rounded-xl text-lg font-semibold">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/>
</svg>
+7 (3462) 00-00-00
</a>
</div>
</div>
@ -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 = '';
}
</script>

View file

@ -33,7 +33,7 @@ const services = [
];
---
<section id="Услуги" class="py-24 bg-gray-50">
<section id="services" class="py-24 bg-gray-50">
<div class="max-w-7xl mx-auto px-6 text-center">
<div class="mb-16">
<h2 class="text-4xl md:text-5xl font-bold mb-4">Наши Услуги</h2>

View file

@ -13,7 +13,7 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet">
</head>
<body class="font-sans antialiased">
<body class="font-sans antialiased pb-24 md:pb-0">
<slot />
</body>
</html>