feat: redesign landing page with brand system and section blocks
Build & Push Docker Image / build (push) Has been cancelled
Build & Push Docker Image / build (push) Has been cancelled
Refresh the homepage around new hero/services/roadmap sections, shared design tokens, and updated brand assets. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
"use client";
|
||||
|
||||
import type { ReactNode } from "react";
|
||||
import { motion, useReducedMotion } from "motion/react";
|
||||
|
||||
import {
|
||||
blockRevealContainer,
|
||||
blockRevealItem,
|
||||
blockViewport,
|
||||
} from "@/lib/block-motion";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
type MotionRevealProps = {
|
||||
children: ReactNode;
|
||||
className?: string;
|
||||
/** Stagger direct `MotionRevealItem` children (max ~8 for feel). */
|
||||
stagger?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* Scroll-driven entrance for page blocks.
|
||||
* Respects `prefers-reduced-motion` and plays once per view.
|
||||
*/
|
||||
export function MotionReveal({
|
||||
children,
|
||||
className,
|
||||
stagger = false,
|
||||
}: MotionRevealProps) {
|
||||
const reduceMotion = useReducedMotion();
|
||||
|
||||
if (reduceMotion) {
|
||||
return <div className={className}>{children}</div>;
|
||||
}
|
||||
|
||||
return (
|
||||
<motion.div
|
||||
className={cn(className)}
|
||||
initial="hidden"
|
||||
whileInView="visible"
|
||||
viewport={blockViewport}
|
||||
variants={stagger ? blockRevealContainer : blockRevealItem}
|
||||
>
|
||||
{children}
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
|
||||
type MotionRevealItemProps = {
|
||||
children: ReactNode;
|
||||
className?: string;
|
||||
};
|
||||
|
||||
/** Child of a staggered `MotionReveal`. No-op when reduced motion is on. */
|
||||
export function MotionRevealItem({
|
||||
children,
|
||||
className,
|
||||
}: MotionRevealItemProps) {
|
||||
const reduceMotion = useReducedMotion();
|
||||
|
||||
if (reduceMotion) {
|
||||
return <div className={className}>{children}</div>;
|
||||
}
|
||||
|
||||
return (
|
||||
<motion.div className={cn(className)} variants={blockRevealItem}>
|
||||
{children}
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user