Merge version_4_1783201561428 into main #3
@@ -12,7 +12,8 @@ import AboutSection from './HomePage/sections/About';
|
||||
import ContactSection from './HomePage/sections/Contact';
|
||||
|
||||
|
||||
import GallerySection from './HomePage/sections/Gallery';export default function HomePage(): React.JSX.Element {
|
||||
import GallerySection from './HomePage/sections/Gallery';
|
||||
import KartScrollerSection from './HomePage/sections/KartScroller';export default function HomePage(): React.JSX.Element {
|
||||
return (
|
||||
<StyleProvider siteBackground="none" heroBackground="none" buttonVariant="stagger">
|
||||
<SiteBackgroundSlot />
|
||||
@@ -28,6 +29,7 @@ import GallerySection from './HomePage/sections/Gallery';export default function
|
||||
|
||||
|
||||
<GallerySection />
|
||||
<KartScrollerSection />
|
||||
</StyleProvider>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,17 +1,94 @@
|
||||
// AUTO-GENERATED by per-section-migrate. Edit freely — Bob will treat this
|
||||
// file as the canonical source for the "about" section.
|
||||
/* 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 Button from "@/components/ui/Button";
|
||||
import TextAnimation from "@/components/ui/TextAnimation";
|
||||
import ImageOrVideo from "@/components/ui/ImageOrVideo";
|
||||
|
||||
import React from 'react';
|
||||
import AboutTextFill from "@/components/sections/about/AboutTextFill";
|
||||
type AboutTextFillProps = {
|
||||
tag?: string;
|
||||
title: string;
|
||||
description?: string;
|
||||
primaryButton?: { text: string; href: string };
|
||||
secondaryButton?: { text: string; href: string };
|
||||
textAnimation: "slide-up" | "fade-blur" | "fade";
|
||||
} & ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never });
|
||||
|
||||
const AboutInline = () => {
|
||||
const sectionRef = useRef<HTMLDivElement>(null);
|
||||
const words = "Úspechy sa nerodia cez noc. Sú výsledkom tvrdej práce.".split(" ");
|
||||
|
||||
const { scrollYProgress } = useScroll({
|
||||
target: sectionRef,
|
||||
offset: ["start 0.8", "start 0.2"],
|
||||
});
|
||||
|
||||
const Word = ({ word, index }: { word: string; index: number }) => {
|
||||
const start = index / words.length;
|
||||
const end = (index + 1) / words.length;
|
||||
const opacity = useTransform(scrollYProgress, [start, end], [0.15, 1]);
|
||||
return (
|
||||
<motion.span className="inline-block" style={{ opacity }}>
|
||||
{word}
|
||||
</motion.span>
|
||||
);
|
||||
};
|
||||
|
||||
export default function AboutSection(): React.JSX.Element {
|
||||
return (
|
||||
<div id="about" data-section="about">
|
||||
<AboutTextFill
|
||||
textAnimation="fade"
|
||||
title="Úspechy sa nerodia cez noc. Sú výsledkom tvrdej práce."
|
||||
imageSrc="https://picsum.photos/seed/1510900608/1200/800"
|
||||
/>
|
||||
<section
|
||||
ref={sectionRef}
|
||||
aria-label="About section"
|
||||
className="relative py-32 md:py-48 overflow-hidden"
|
||||
>
|
||||
<div className="absolute inset-0 z-0">
|
||||
<ImageOrVideo imageSrc={"https://storage.googleapis.com/webild/users/user_3G3RRYMNJY63CoZ96oJOAlJc2Et/uploaded-1783201278652-k4urrscu.jpg"} className="w-full h-full object-cover opacity-40" />
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-background via-background/60 to-background"></div>
|
||||
</div>
|
||||
<div className="relative z-10 flex flex-col gap-8 md:gap-10 mx-auto w-content-width">
|
||||
<div className="flex flex-col items-center gap-2">
|
||||
{undefined && (
|
||||
<div className="px-3 py-1 mb-1 text-sm card rounded w-fit">
|
||||
<p>{undefined}</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<h2 className="md:max-w-8/10 text-7xl 2xl:text-8xl leading-[1.15] font-semibold text-center text-balance">
|
||||
{words.map((word, i) => (
|
||||
<span key={i}>
|
||||
{i > 0 && " "}
|
||||
<Word word={word} index={i} />
|
||||
</span>
|
||||
))}
|
||||
</h2>
|
||||
|
||||
{undefined && (
|
||||
<TextAnimation
|
||||
variant={"fade"}
|
||||
gradientText={false}
|
||||
tag="p"
|
||||
className="md:max-w-7/10 text-lg md:text-xl leading-snug text-center text-balance"
|
||||
/>
|
||||
)}
|
||||
|
||||
{(undefined || undefined) && (
|
||||
<div className="flex flex-wrap justify-center gap-3 mt-2 md:mt-3">
|
||||
{undefined && <Button text={undefined.text} href={undefined.href} variant="primary"/>}
|
||||
{undefined && <Button text={undefined.text} href={undefined.href} variant="secondary" animationDelay={0.1} />}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Removed inline image to use as background instead */}
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
export default function AboutSection() {
|
||||
return (
|
||||
<div data-webild-section="about" data-section="about" id="about">
|
||||
<AboutInline />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ export default function ContactSection(): React.JSX.Element {
|
||||
<div id="contact" data-section="contact">
|
||||
<ContactParallaxCard
|
||||
title="Kontaktujte ma"
|
||||
imageSrc="https://picsum.photos/seed/556000234/1200/800"
|
||||
imageSrc="https://storage.googleapis.com/webild/users/user_3G3RRYMNJY63CoZ96oJOAlJc2Et/uploaded-1783201278653-doj07as6.jpg"
|
||||
inputs={[{"type":"text","name":"name","placeholder":"Vaše meno"},{"name":"email","placeholder":"Váš email","type":"email"}]}
|
||||
textarea={{"placeholder":"Vaša správa...","name":"message","rows":4}}
|
||||
buttonText="Odoslať správu"
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
// AUTO-GENERATED by per-section-migrate. Edit freely — Bob will treat this
|
||||
// file as the canonical source for the "hero" section.
|
||||
// Created by add_section_from_catalog (HeroOverlay).
|
||||
|
||||
import React from 'react';
|
||||
import HeroVideoScroll from "@/components/sections/hero/HeroVideoScroll";
|
||||
import HeroOverlay from '@/components/sections/hero/HeroOverlay';
|
||||
|
||||
export default function HeroSection(): React.JSX.Element {
|
||||
return (
|
||||
<div id="hero" data-section="hero">
|
||||
<HeroVideoScroll
|
||||
textAnimation="fade"
|
||||
videoSrc="https://storage.googleapis.com/webild/default/templates/racing/hero/hero.mp4"
|
||||
tag="Samuel Uváček Racing"
|
||||
title="Adrenalín na štyroch kolesách"
|
||||
<div data-webild-section="hero" data-section="hero" id="hero">
|
||||
<HeroOverlay
|
||||
description="Rýchlosť, precíznosť a vášeň pre motoršport. Sledujte moju cestu za víťazstvami na najprestížnejších pretekoch."
|
||||
primaryButton={{"href":"#gallery","text":"Pozrieť galériu"}}
|
||||
secondaryButton={{"text":"Kontaktovať","href":"#contact"}}
|
||||
bottomText="Profesionálny pretekár reprezentujúci Slovensko na medzinárodných okruhoch"
|
||||
tag="Samuel Uváček Racing"
|
||||
title="Adrenalín na štyroch kolesách"
|
||||
secondaryButton={{"href":"#contact","text":"Kontaktovať"}}
|
||||
imageSrc="https://storage.googleapis.com/webild/users/user_3G3RRYMNJY63CoZ96oJOAlJc2Et/uploaded-1783201278651-n1egshdk.jpg"
|
||||
textAnimation="fade"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
35
src/pages/HomePage/sections/KartScroller.tsx
Normal file
35
src/pages/HomePage/sections/KartScroller.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
import React from 'react';
|
||||
import { motion, useScroll, useTransform, useVelocity, useSpring } from 'motion/react';
|
||||
|
||||
export default function KartScrollerSection() {
|
||||
const { scrollYProgress } = useScroll();
|
||||
|
||||
const y = useTransform(scrollYProgress, [0, 1], ['10vh', '85vh']);
|
||||
|
||||
const scrollVelocity = useVelocity(scrollYProgress);
|
||||
const smoothVelocity = useSpring(scrollVelocity, { damping: 50, stiffness: 400 });
|
||||
|
||||
const scaleY = useTransform(smoothVelocity, [-2, 0, 2], [1.5, 1, 1.5]);
|
||||
|
||||
const fireOpacity = useTransform(smoothVelocity, [0, 0.5], [0, 1]);
|
||||
|
||||
return (
|
||||
<div id="kart-scroller" data-webild-section="kart-scroller">
|
||||
<motion.div
|
||||
style={{ y, scaleY }}
|
||||
className="fixed right-2 md:right-6 top-0 z-50 pointer-events-none flex flex-col items-center justify-center"
|
||||
>
|
||||
<motion.div
|
||||
style={{ opacity: fireOpacity }}
|
||||
className="text-3xl md:text-5xl -mb-3 origin-bottom"
|
||||
>
|
||||
🔥
|
||||
</motion.div>
|
||||
|
||||
<div className="text-4xl md:text-6xl transform -rotate-90 drop-shadow-[0_0_15px_rgba(255,51,51,0.5)]">
|
||||
🏎️
|
||||
</div>
|
||||
</motion.div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user