diff --git a/public/images/figma/hero-bg1.webp b/public/images/figma/hero-bg1.webp index 5cd2ce3..fa91b86 100644 Binary files a/public/images/figma/hero-bg1.webp and b/public/images/figma/hero-bg1.webp differ diff --git a/public/images/figma/hero-bg2.webp b/public/images/figma/hero-bg2.webp index 932d741..d8f8c69 100644 Binary files a/public/images/figma/hero-bg2.webp and b/public/images/figma/hero-bg2.webp differ diff --git a/public/images/figma/loc-dinopark.webp b/public/images/figma/loc-dinopark.webp index 1c7796c..4532532 100644 Binary files a/public/images/figma/loc-dinopark.webp and b/public/images/figma/loc-dinopark.webp differ diff --git a/public/images/figma/loc-divo-lis.webp b/public/images/figma/loc-divo-lis.webp index 408efc0..3fdd455 100644 Binary files a/public/images/figma/loc-divo-lis.webp and b/public/images/figma/loc-divo-lis.webp differ diff --git a/public/images/figma/loc-maze.webp b/public/images/figma/loc-maze.webp index a18b00a..86d51ad 100644 Binary files a/public/images/figma/loc-maze.webp and b/public/images/figma/loc-maze.webp differ diff --git a/public/images/figma/loc-playground.webp b/public/images/figma/loc-playground.webp index 9159f8f..e0165fe 100644 Binary files a/public/images/figma/loc-playground.webp and b/public/images/figma/loc-playground.webp differ diff --git a/public/images/figma/loc-tir.webp b/public/images/figma/loc-tir.webp index b062bc2..285ace1 100644 Binary files a/public/images/figma/loc-tir.webp and b/public/images/figma/loc-tir.webp differ diff --git a/public/images/figma/why-parents-video.webp b/public/images/figma/why-parents-video.webp new file mode 100644 index 0000000..c8908f8 Binary files /dev/null and b/public/images/figma/why-parents-video.webp differ diff --git a/src/app/(frontend)/page.tsx b/src/app/(frontend)/page.tsx index 1fed9d2..a4818a6 100644 --- a/src/app/(frontend)/page.tsx +++ b/src/app/(frontend)/page.tsx @@ -13,9 +13,8 @@ import type { HomePageHero } from '@/types/globals' export const revalidate = 60 const STATIC_HERO: NonNullable = { - title: 'Шуміленд — світ, де казка оживає', - subtitle: - 'Сімейний тематичний парк, де гра допомагає пізнавати світ, а кожна прогулянка перетворюється на незабутню пригоду.', + title: 'Започаткуйте традицію:', + subtitle: 'щороку фотографуйтесь біля улюбленого динозавра', ctaLabel: 'Купити квиток', ctaHref: '/kvytky', } diff --git a/src/components/sections/Hero.tsx b/src/components/sections/Hero.tsx index 4b1fc7c..9742d87 100644 --- a/src/components/sections/Hero.tsx +++ b/src/components/sections/Hero.tsx @@ -3,8 +3,6 @@ import type { HomePageHero, Media } from '@/types/globals' import { BtnPrimary } from '@/components/ui/BtnPrimary' const IMG_BG2 = '/images/figma/hero-bg2.webp' -const IMG_BG1 = '/images/figma/hero-bg1.webp' -const IMG_FAMILY = '/images/figma/hero-bg-family.webp' interface HeroProps { hero?: HomePageHero | null @@ -24,7 +22,6 @@ export function Hero({ hero }: HeroProps) { const { title, subtitle, ctaLabel, ctaHref, backgroundImage, backgroundVideo } = hero const showCta = Boolean(ctaLabel && ctaHref && isSafeHref(ctaHref)) const bgMedia = isMedia(backgroundImage) ? backgroundImage : null - const useDefaultLayers = !bgMedia && !backgroundVideo return (
@@ -46,14 +43,12 @@ export function Hero({ hero }: HeroProps) { className="pointer-events-none absolute inset-0 h-full w-full object-cover" /> ) : ( - <> - - + )} {/* ── Gradient: mobile ── */} @@ -75,16 +70,16 @@ export function Hero({ hero }: HeroProps) { }} /> - {/* ── Text content (above T-Rex z-[20]) ── */} + {/* ── Text content ── */}
-
+
{title && (

{subtitle} @@ -115,24 +109,6 @@ export function Hero({ hero }: HeroProps) {

- - {/* ── T-Rex overlay — above text, desktop only ── */} - {useDefaultLayers && ( - <> - - - - )}
) } diff --git a/src/components/sections/WhyParents.tsx b/src/components/sections/WhyParents.tsx index eff8f66..ae466da 100644 --- a/src/components/sections/WhyParents.tsx +++ b/src/components/sections/WhyParents.tsx @@ -4,20 +4,7 @@ import { useState, useRef, useEffect } from 'react' import type { HomePageWhyParentsItem, Media } from '@/types/globals' -function getMediaUrl(img: Media | string | null | undefined): string | null { - if (!img) return null - if (typeof img === 'string') return img - return img.url ?? null -} - -const STATIC_GALLERY = [ - '/images/figma/why-parents-1.webp', - '/images/figma/why-parents-2.webp', - '/images/figma/why-parents-3.webp', - '/images/figma/why-parents-4.webp', - '/images/figma/gallery-1.webp', - '/images/figma/gallery-3.webp', -] +const VIDEO_THUMBNAIL = '/images/figma/why-parents-video.webp' const STATIC_ITEMS: HomePageWhyParentsItem[] = [ { @@ -58,11 +45,8 @@ interface WhyParentsProps { title?: string } -export function WhyParents({ items, sideGallery, title }: WhyParentsProps) { +export function WhyParents({ items, sideGallery: _sideGallery, title }: WhyParentsProps) { const [openIndex, setOpenIndex] = useState(0) - const galleryRef = useRef(null) - const galleryPausedRef = useRef(false) - const galleryRafRef = useRef(null) const autoTimer = useRef | null>(null) const activeItems = items && items.length > 0 ? items : STATIC_ITEMS @@ -84,36 +68,6 @@ export function WhyParents({ items, sideGallery, title }: WhyParentsProps) { }, 4000) } - const galleryUrls: string[] = - sideGallery && sideGallery.length > 0 - ? sideGallery.map((g) => getMediaUrl(g.image) ?? '/images/figma/gallery-1.webp') - : STATIC_GALLERY - - const doubled = [...galleryUrls, ...galleryUrls] - - useEffect(() => { - const el = galleryRef.current - if (!el) return - if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return - let last = performance.now() - const tick = (now: number) => { - const dt = now - last - last = now - if (!galleryPausedRef.current) { - const half = el.scrollWidth / 2 - if (half > 0) { - el.scrollLeft += dt * 0.04 - if (el.scrollLeft >= half) el.scrollLeft -= half - } - } - galleryRafRef.current = requestAnimationFrame(tick) - } - galleryRafRef.current = requestAnimationFrame(tick) - return () => { - if (galleryRafRef.current) cancelAnimationFrame(galleryRafRef.current) - } - }, []) - return (
@@ -180,44 +134,56 @@ export function WhyParents({ items, sideGallery, title }: WhyParentsProps) {
- {/* Horizontal auto-scroll gallery — desktop */} -
-
+ {/* Desktop: 3 video thumbnail cards — Figma Gallery_holder */} +
+ {( + [ + { h: 546, mt: 0 }, + { h: 488, mt: 29 }, + { h: 488, mt: 29 }, + ] as { h: number; mt: number }[] + ).map(({ h, mt }, i) => (
{ - galleryPausedRef.current = true - }} - onMouseLeave={() => { - galleryPausedRef.current = false - }} + key={i} + className="relative flex-none overflow-hidden rounded-[20px] bg-[#d6f2c0]" + style={{ width: 505, height: h, marginTop: mt }} > - {doubled.map((src, i) => ( -
- +
+
+ + className="ml-1" + > + +
- ))} +
-
+ ))}
- {/* Mobile: horizontal scroll */} + {/* Mobile: horizontal scroll with video thumbnails */}
- {galleryUrls.map((src, i) => ( + {[ + '/images/figma/why-parents-1.webp', + '/images/figma/why-parents-2.webp', + '/images/figma/why-parents-3.webp', + '/images/figma/why-parents-4.webp', + ].map((src, i) => (