Ноые правки
This commit is contained in:
parent
d34ba48a91
commit
f06f86ac53
3 changed files with 120 additions and 12 deletions
|
|
@ -9,6 +9,10 @@ interface PageHeroProps {
|
|||
description: string;
|
||||
btnText?: string;
|
||||
btnHref?: string;
|
||||
btnSecondary?: string;
|
||||
btnSecondaryHref?: string;
|
||||
btnSecondaryClass?: string;
|
||||
modalTarget?: string;
|
||||
bgImage?: string;
|
||||
minHeight?: string;
|
||||
layout?: 'default' | 'with-image';
|
||||
|
|
@ -18,7 +22,7 @@ interface PageHeroProps {
|
|||
number: string;
|
||||
text: string;
|
||||
};
|
||||
icon?: string; // Название иконки из /src/icons/
|
||||
icon?: string;
|
||||
}
|
||||
|
||||
const {
|
||||
|
|
@ -28,8 +32,12 @@ const {
|
|||
description,
|
||||
btnText,
|
||||
btnHref = "#contact",
|
||||
btnSecondary,
|
||||
btnSecondaryHref = "/services",
|
||||
btnSecondaryClass = "",
|
||||
modalTarget,
|
||||
bgImage = "",
|
||||
minHeight = "80vh",
|
||||
minHeight = "100vh",
|
||||
layout = "default",
|
||||
sideImage = "",
|
||||
sideImageAlt = "",
|
||||
|
|
@ -41,6 +49,7 @@ const showImage = layout === 'with-image' && sideImage;
|
|||
---
|
||||
|
||||
<section class="hero-section" style:min-height={minHeight}>
|
||||
{bgImage && <img src={bgImage} alt="" class="hero-bg-image" decoding="async" />}
|
||||
<div class="hero-overlay"></div>
|
||||
|
||||
<div class="site-container hero-grid">
|
||||
|
|
@ -66,9 +75,20 @@ const showImage = layout === 'with-image' && sideImage;
|
|||
|
||||
{btnText && (
|
||||
<div class="hero-actions animate-load" data-delay="900">
|
||||
<Button variant="gold" size="lg" href={btnHref}>
|
||||
{btnText}
|
||||
</Button>
|
||||
{modalTarget ? (
|
||||
<Button variant="gold" size="lg" data-modal-target={modalTarget}>
|
||||
{btnText}
|
||||
</Button>
|
||||
) : (
|
||||
<Button variant="gold" size="lg" href={btnHref}>
|
||||
{btnText}
|
||||
</Button>
|
||||
)}
|
||||
{btnSecondary && (
|
||||
<Button variant="outline" size="lg" href={btnSecondaryHref} class={btnSecondaryClass}>
|
||||
{btnSecondary}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
|
@ -113,7 +133,7 @@ const showImage = layout === 'with-image' && sideImage;
|
|||
.hero-section {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
min-height: 80vh;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-image: var(--bgImage);
|
||||
|
|
@ -126,6 +146,14 @@ const showImage = layout === 'with-image' && sideImage;
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
.hero-bg-image {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.hero-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
|
@ -371,17 +399,17 @@ const showImage = layout === 'with-image' && sideImage;
|
|||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
/* --- МОБИЛЬНАЯ АДАПТАЦИЯ --- */
|
||||
/* --- АДАПТАЦИЯ --- */
|
||||
@media (max-width: 992px) {
|
||||
.hero-section {
|
||||
padding-top: 70px;
|
||||
min-height: 60vh;
|
||||
min-height: auto;
|
||||
}
|
||||
|
||||
.hero-grid {
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
padding-top: 0;
|
||||
padding: 1.5rem 1.5rem 2rem;
|
||||
}
|
||||
|
||||
.hero-content {
|
||||
|
|
@ -444,6 +472,67 @@ const showImage = layout === 'with-image' && sideImage;
|
|||
}
|
||||
}
|
||||
|
||||
/* Кастомные стили для кнопки "Мои услуги" */
|
||||
:global(.btn-services) {
|
||||
background: transparent !important;
|
||||
border: 2px solid #ffffff !important;
|
||||
color: #ffffff !important;
|
||||
padding: 0.875rem 1.5rem !important;
|
||||
font-size: 1.125rem !important;
|
||||
line-height: 1.75rem !important;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
z-index: 1;
|
||||
height: auto !important;
|
||||
min-height: 3.25rem !important;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
:global(.btn-services)::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
|
||||
transition: left 0.5s ease;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
:global(.btn-services)::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 0;
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.2));
|
||||
transition: width 0.4s ease;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
:global(.btn-services:hover) {
|
||||
background: rgba(255, 255, 255, 0.1) !important;
|
||||
border-color: #eac26e !important;
|
||||
color: #eac26e !important;
|
||||
transform: translateY(-3px);
|
||||
box-shadow: 0 8px 25px rgba(234, 194, 110, 0.3);
|
||||
}
|
||||
|
||||
:global(.btn-services:hover)::before {
|
||||
left: 100%;
|
||||
}
|
||||
|
||||
:global(.btn-services:hover)::after {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:global(.btn-services:active) {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 15px rgba(234, 194, 110, 0.2);
|
||||
}
|
||||
|
||||
/* Уважаем prefers-reduced-motion */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.animate-load,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ const lawyerImageUrl = "/images/home/avtourist-surgut.avif";
|
|||
---
|
||||
|
||||
<section class="hero-section">
|
||||
<img src={bgImageUrl} alt="" class="hero-bg-image" fetchpriority="high" decoding="async" />
|
||||
<img src={bgImageUrl} alt="" class="hero-bg-image" decoding="async" />
|
||||
<div class="hero-overlay"></div>
|
||||
|
||||
<div class="site-container hero-grid">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
import Layout from '@layouts/Layout.astro';
|
||||
import Hero from '@components/home/Hero.astro';
|
||||
import PageHero from '@components/base/PageHero.astro';
|
||||
import Services from "@components/home/Services.astro";
|
||||
import Steps from "@components/home/Steps.astro";
|
||||
import WhyUs from "@components/home/WhyUs.astro";
|
||||
|
|
@ -14,7 +14,26 @@ import { SITE_URL } from '@constants';
|
|||
description="Профессиональная юридическая помощь автовладельцам в Сургуте. Споры со страховыми, возврат прав, ДТП, споры с автосалонами."
|
||||
canonicalLink={SITE_URL}
|
||||
>
|
||||
<Hero />
|
||||
<PageHero
|
||||
badgeText="ЗАЩИТА ВОДИТЕЛЕЙ В СУРГУТЕ"
|
||||
titleWhite="Защитите свои права"
|
||||
titleGold="и водительское удостоверение"
|
||||
description="Профессиональная юридическая помощь при ДТП, спорах с ГИБДД и страховыми компаниями. Работаем на результат в судах ХМАО-Югры."
|
||||
btnText="Бесплатная консультация"
|
||||
modalTarget="consultation-modal"
|
||||
btnSecondary="Мои услуги"
|
||||
btnSecondaryHref="/services"
|
||||
btnSecondaryClass="btn-services"
|
||||
layout="with-image"
|
||||
sideImage="/images/home/avtourist-surgut.avif"
|
||||
sideImageAlt="Юрист"
|
||||
bgImage="/images/home/bg_hero.avif"
|
||||
minHeight="100vh"
|
||||
experienceBadge={{
|
||||
number: "20+",
|
||||
text: "ЛЕТ ОПЫТА В СУДАХ"
|
||||
}}
|
||||
/>
|
||||
<Services />
|
||||
<Steps />
|
||||
<WhyUs />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue