From 2f67e0bfe96fff55c3ee4fd1d485dee2de66f06b Mon Sep 17 00:00:00 2001 From: kudinDmitriyUp Date: Sun, 21 Jun 2026 19:35:44 +0000 Subject: [PATCH] Bob AI: Restored HeroBillboardFloatingCards and added floating gradi --- src/index.css | 4 +- src/pages/HomePage/sections/Hero.tsx | 209 +++++++++++++++++++++++++-- 2 files changed, 198 insertions(+), 15 deletions(-) diff --git a/src/index.css b/src/index.css index 5f7de13..1c15f62 100644 --- a/src/index.css +++ b/src/index.css @@ -6,9 +6,9 @@ :root { /* @colorThemes/darkTheme/highFashion */ - --background: #0a0a0a; + --background: #000000; --card: #141414; - --foreground: #f5f5f0; + --foreground: #ffffff; --primary-cta: #ffffff; --primary-cta-text: #000000; --secondary-cta: #1a1a1a; diff --git a/src/pages/HomePage/sections/Hero.tsx b/src/pages/HomePage/sections/Hero.tsx index e688376..e7cc8d1 100644 --- a/src/pages/HomePage/sections/Hero.tsx +++ b/src/pages/HomePage/sections/Hero.tsx @@ -1,20 +1,203 @@ -// Created by add_section_from_catalog (HeroBillboardFloatingCards). +/* eslint-disable */ +// @ts-nocheck — generated by catalog-eject; runtime-correct but TS strict-mode false-positives on inlined catalog body +import { useRef } from "react"; +import { useScroll, useTransform, motion } from "motion/react"; +import { Check } from "lucide-react"; +import { cls } from "@/lib/utils"; +import HeroBackgroundSlot from "@/components/ui/HeroBackgroundSlot"; +import Button from "@/components/ui/Button"; +import TextAnimation from "@/components/ui/TextAnimation"; +import AvatarGroup from "@/components/ui/AvatarGroup"; +import ImageOrVideo from "@/components/ui/ImageOrVideo"; +import ScrollReveal from "@/components/ui/ScrollReveal"; +import FloatingGradientBackground from "@/components/ui/FloatingGradientBackground"; -import React from 'react'; -import HeroBillboardFloatingCards from '@/components/sections/hero/HeroBillboardFloatingCards'; +const avatarsSrc = [ + "http://img.b2bpic.net/free-photo/gorgeous-indian-woman-wear-formal-posing-cafe_627829-4625.jpg", + "http://img.b2bpic.net/free-photo/businesswoman-drinking-coffee-while-short-break_329181-17590.jpg", + "http://img.b2bpic.net/free-photo/young-pretty-blogger-holding-shoe-heel-sneakers-thoughtfully-looking-aside-while-recording-new-fashion-video-vlog-camera_574295-5294.jpg" +]; +const primaryButton = { + href: "#", + text: "Explore Collections" +}; +const secondaryButton = { + text: "View Lookbook", + href: "#" +}; +const floatingCardsSrc = [ + "http://img.b2bpic.net/free-photo/glowing-red-warning-triangle-with-exclamation-mark-dark-wet-surface_84443-91213.jpg", + "http://img.b2bpic.net/free-photo/letter-o-made-green-grass-with-flowers-isolated-white_169016-57035.jpg", + "http://img.b2bpic.net/free-photo/letter-t-made-green-grass-with-flowers-isolated-white_169016-58706.jpg", + "http://img.b2bpic.net/free-photo/woman-holding-letter-w_1187-1117.jpg" +]; -export default function HeroSection(): React.JSX.Element { +type FloatingCardPosition = "top-left" | "top-right" | "middle-left" | "middle-right"; + +type HeroBillboardFloatingCardsProps = { + avatarsSrc: string[]; + avatarsLabel: string; + title: string; + description: string; + primaryButton: { text: string; href: string }; + secondaryButton: { text: string; href: string }; + note?: string; + floatingCardsSrc: [string, string, string, string]; + logosSrc?: string[]; +} & ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never }); + +const POSITIONS: FloatingCardPosition[] = ["top-left", "top-right", "middle-left", "middle-right"]; + +const FLOATING_CARD_CONFIG: Record = { + "top-left": { + position: "top-8 left-0", + rotation: "-rotate-8", + size: "size-20 xl:size-22 2xl:size-24", + animation: { duration: 4, delay: 0, yOffset: -8, entryDelay: 0.3 }, + }, + "top-right": { + position: "top-4 right-4", + rotation: "rotate-10", + size: "size-18 xl:size-20 2xl:size-22", + animation: { duration: 5, delay: 1, yOffset: -10, entryDelay: 0.5 }, + }, + "middle-left": { + position: "top-1/2 left-2", + rotation: "rotate-6", + size: "size-18 xl:size-20 2xl:size-22", + animation: { duration: 4.5, delay: 0.5, yOffset: -9, entryDelay: 0.7 }, + }, + "middle-right": { + position: "top-1/2 right-0", + rotation: "-rotate-6", + size: "size-20 xl:size-22 2xl:size-24", + animation: { duration: 3.8, delay: 1.5, yOffset: -8, entryDelay: 0.9 }, + }, +}; + +const HeroBillboardFloatingCards = () => { + const containerRef = useRef(null); + const { scrollYProgress } = useScroll({ target: containerRef }); + + const rotate = useTransform(scrollYProgress, [0, 1], [20, 0]); + const scale = useTransform(scrollYProgress, [0, 1], [1.05, 1]); + + return ( +
+ +
+ +
+
+ +
+
+
+ {POSITIONS.map((position, index) => { + const config = FLOATING_CARD_CONFIG[position]; + const src = floatingCardsSrc[index]; + if (!src) return null; + return ( + + ); + })} + +
+
+ +
+ + + + + +
+
+ + {"Personalized for every silhouette" && ( + + +
+ +
+ {"Personalized for every silhouette"} +
+
+ )} +
+
+ +
+ +
+ + + + + + {undefined && undefined.length > 0 && ( + +
+ {[...undefined, ...undefined, ...undefined, ...undefined, ...undefined, ...undefined, ...undefined, ...undefined].map((logo, index) => ( +
+ +
+ ))} +
+
+ )} +
+
+ ); +}; + +export default function HeroSection() { return (
- +
); }