Ноые правки
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;
|
description: string;
|
||||||
btnText?: string;
|
btnText?: string;
|
||||||
btnHref?: string;
|
btnHref?: string;
|
||||||
|
btnSecondary?: string;
|
||||||
|
btnSecondaryHref?: string;
|
||||||
|
btnSecondaryClass?: string;
|
||||||
|
modalTarget?: string;
|
||||||
bgImage?: string;
|
bgImage?: string;
|
||||||
minHeight?: string;
|
minHeight?: string;
|
||||||
layout?: 'default' | 'with-image';
|
layout?: 'default' | 'with-image';
|
||||||
|
|
@ -18,7 +22,7 @@ interface PageHeroProps {
|
||||||
number: string;
|
number: string;
|
||||||
text: string;
|
text: string;
|
||||||
};
|
};
|
||||||
icon?: string; // Название иконки из /src/icons/
|
icon?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
|
@ -28,8 +32,12 @@ const {
|
||||||
description,
|
description,
|
||||||
btnText,
|
btnText,
|
||||||
btnHref = "#contact",
|
btnHref = "#contact",
|
||||||
|
btnSecondary,
|
||||||
|
btnSecondaryHref = "/services",
|
||||||
|
btnSecondaryClass = "",
|
||||||
|
modalTarget,
|
||||||
bgImage = "",
|
bgImage = "",
|
||||||
minHeight = "80vh",
|
minHeight = "100vh",
|
||||||
layout = "default",
|
layout = "default",
|
||||||
sideImage = "",
|
sideImage = "",
|
||||||
sideImageAlt = "",
|
sideImageAlt = "",
|
||||||
|
|
@ -41,6 +49,7 @@ const showImage = layout === 'with-image' && sideImage;
|
||||||
---
|
---
|
||||||
|
|
||||||
<section class="hero-section" style:min-height={minHeight}>
|
<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="hero-overlay"></div>
|
||||||
|
|
||||||
<div class="site-container hero-grid">
|
<div class="site-container hero-grid">
|
||||||
|
|
@ -66,9 +75,20 @@ const showImage = layout === 'with-image' && sideImage;
|
||||||
|
|
||||||
{btnText && (
|
{btnText && (
|
||||||
<div class="hero-actions animate-load" data-delay="900">
|
<div class="hero-actions animate-load" data-delay="900">
|
||||||
|
{modalTarget ? (
|
||||||
|
<Button variant="gold" size="lg" data-modal-target={modalTarget}>
|
||||||
|
{btnText}
|
||||||
|
</Button>
|
||||||
|
) : (
|
||||||
<Button variant="gold" size="lg" href={btnHref}>
|
<Button variant="gold" size="lg" href={btnHref}>
|
||||||
{btnText}
|
{btnText}
|
||||||
</Button>
|
</Button>
|
||||||
|
)}
|
||||||
|
{btnSecondary && (
|
||||||
|
<Button variant="outline" size="lg" href={btnSecondaryHref} class={btnSecondaryClass}>
|
||||||
|
{btnSecondary}
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -113,7 +133,7 @@ const showImage = layout === 'with-image' && sideImage;
|
||||||
.hero-section {
|
.hero-section {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 80vh;
|
min-height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-image: var(--bgImage);
|
background-image: var(--bgImage);
|
||||||
|
|
@ -126,6 +146,14 @@ const showImage = layout === 'with-image' && sideImage;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hero-bg-image {
|
||||||
|
position: absolute;
|
||||||
|
width: 1px;
|
||||||
|
height: 1px;
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
.hero-overlay {
|
.hero-overlay {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
@ -371,17 +399,17 @@ const showImage = layout === 'with-image' && sideImage;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --- МОБИЛЬНАЯ АДАПТАЦИЯ --- */
|
/* --- АДАПТАЦИЯ --- */
|
||||||
@media (max-width: 992px) {
|
@media (max-width: 992px) {
|
||||||
.hero-section {
|
.hero-section {
|
||||||
padding-top: 70px;
|
padding-top: 70px;
|
||||||
min-height: 60vh;
|
min-height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hero-grid {
|
.hero-grid {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding-top: 0;
|
padding: 1.5rem 1.5rem 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hero-content {
|
.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 */
|
/* Уважаем prefers-reduced-motion */
|
||||||
@media (prefers-reduced-motion: reduce) {
|
@media (prefers-reduced-motion: reduce) {
|
||||||
.animate-load,
|
.animate-load,
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ const lawyerImageUrl = "/images/home/avtourist-surgut.avif";
|
||||||
---
|
---
|
||||||
|
|
||||||
<section class="hero-section">
|
<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="hero-overlay"></div>
|
||||||
|
|
||||||
<div class="site-container hero-grid">
|
<div class="site-container hero-grid">
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
import Layout from '@layouts/Layout.astro';
|
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 Services from "@components/home/Services.astro";
|
||||||
import Steps from "@components/home/Steps.astro";
|
import Steps from "@components/home/Steps.astro";
|
||||||
import WhyUs from "@components/home/WhyUs.astro";
|
import WhyUs from "@components/home/WhyUs.astro";
|
||||||
|
|
@ -14,7 +14,26 @@ import { SITE_URL } from '@constants';
|
||||||
description="Профессиональная юридическая помощь автовладельцам в Сургуте. Споры со страховыми, возврат прав, ДТП, споры с автосалонами."
|
description="Профессиональная юридическая помощь автовладельцам в Сургуте. Споры со страховыми, возврат прав, ДТП, споры с автосалонами."
|
||||||
canonicalLink={SITE_URL}
|
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 />
|
<Services />
|
||||||
<Steps />
|
<Steps />
|
||||||
<WhyUs />
|
<WhyUs />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue