Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
refactor(web): remove legacy bento feature section
Richie McIlroy921f37554cf6
diff --git a/apps/web/components/pages/HomePage/Bento.tsx b/apps/web/components/pages/HomePage/Bento.tsxdeleted file mode 100644index dbc970862..000000000--- a/apps/web/components/pages/HomePage/Bento.tsx+++ /dev/null@@ -1,177 +0,0 @@-"use client";--import { Button } from "@cap/ui";-import clsx from "clsx";-import { motion } from "framer-motion";-import type { ComponentType, ReactNode } from "react";-import { homepageCopy } from "../../../data/homepage-copy";-import AsyncCommentsArt from "./bento/AsyncCommentsArt";-import CapAIArt from "./bento/CapAIArt";-import NativePerformanceArt from "./bento/NativePerformanceArt";-import OpenSourceArt from "./bento/OpenSourceArt";-import PixelPerfectArt from "./bento/PixelPerfectArt";-import StorageRoutingArt from "./bento/StorageRoutingArt";--type ArtComponent = ComponentType<{ className?: string }>;--type LayoutClass = string;--interface CardConfig {- key: string;- art: ArtComponent;- span: LayoutClass;- artHeight: LayoutClass;-}--const CARD_CONFIG: CardConfig[] = [- {- key: "storage",- art: StorageRoutingArt,- span: "md:col-span-4",- artHeight: "h-[260px] md:h-[300px]",- },- {- key: "ai",- art: CapAIArt,- span: "md:col-span-2",- artHeight: "h-[260px] md:h-[300px]",- },- {- key: "async",- art: AsyncCommentsArt,- span: "md:col-span-3",- artHeight: "h-[240px]",- },- {- key: "native",- art: NativePerformanceArt,- span: "md:col-span-3",- artHeight: "h-[240px]",- },- {- key: "oss",- art: OpenSourceArt,- span: "md:col-span-2",- artHeight: "h-[240px]",- },- {- key: "pixel",- art: PixelPerfectArt,- span: "md:col-span-4",- artHeight: "h-[240px]",- },-];--const cardVariants = {- hidden: { opacity: 0, y: 24 },- visible: (custom: number) => ({- opacity: 1,- y: 0,- transition: {- delay: custom * 0.06,- duration: 0.55,- ease: [0.22, 1, 0.36, 1],- },- }),-};--interface BentoCardProps {- title: string;- description: string;- span: LayoutClass;- artHeight: LayoutClass;- children: ReactNode;- index: number;-}--const BentoCard = ({- title,- description,- span,- artHeight,- children,- index,-}: BentoCardProps) => (- <motion.div- custom={index}- variants={cardVariants}- className={clsx(- "relative col-span-1 flex flex-col overflow-hidden rounded-2xl border border-gray-5 bg-gray-1 shadow-[0_1px_0_0_rgba(0,0,0,0.02),0_18px_40px_-25px_rgba(15,23,42,0.18)]",- span,- )}- >- <div- className={clsx(- "relative flex w-full items-center justify-center overflow-hidden bg-gradient-to-b from-gray-2/60 to-gray-1",- artHeight,- )}- >- {children}- </div>- <div className="flex flex-col gap-2 px-6 pb-6 pt-5 text-left md:px-7 md:pb-7">- <h3 className="text-lg font-medium text-gray-12 md:text-xl">{title}</h3>- <p className="text-sm leading-relaxed text-gray-10 md:text-[15px]">- {description}- </p>- </div>- </motion.div>-);--const Bento = () => {- const { eyebrow, title, subtitle, cards, cta } = homepageCopy.bento;-- return (- <div className="mx-auto w-full max-w-[1200px] px-5">- <motion.div- initial={{ opacity: 0, y: 30 }}- whileInView={{ opacity: 1, y: 0 }}- viewport={{ once: true, margin: "-80px" }}- transition={{ duration: 0.6 }}- className="mb-12 text-center md:mb-16"- >- <span className="mb-3 inline-block text-xs font-semibold uppercase tracking-[0.2em] text-gray-9">- {eyebrow}- </span>- <h2 className="mb-3 text-3xl font-medium text-gray-12 md:text-4xl">- {title}- </h2>- <p className="mx-auto max-w-[640px] text-base text-gray-10 md:text-lg">- {subtitle}- </p>- </motion.div>-- <motion.div- initial="hidden"- whileInView="visible"- viewport={{ once: true, margin: "-60px" }}- className="grid grid-cols-1 gap-4 md:grid-cols-6 md:gap-5"- >- {cards.map((card, i) => {- const config = CARD_CONFIG.find((c) => c.key === card.key);- if (!config) return null;- const Art = config.art;- return (- <BentoCard- key={card.key}- title={card.title}- description={card.description}- span={config.span}- artHeight={config.artHeight}- index={i}- >- <Art className="h-full w-full" />- </BentoCard>- );- })}- </motion.div>-- <div className="mt-12 flex justify-center">- <Button href={cta.href} variant="dark" size="lg">- {cta.label}- </Button>- </div>- </div>- );-};--export default Bento;diff --git a/apps/web/components/pages/HomePage/bento/AsyncCommentsArt.tsx b/apps/web/components/pages/HomePage/bento/AsyncCommentsArt.tsxdeleted file mode 100644index 23114c8c9..000000000--- a/apps/web/components/pages/HomePage/bento/AsyncCommentsArt.tsx+++ /dev/null@@ -1,202 +0,0 @@-"use client";--import { AnimatePresence, motion, useReducedMotion } from "framer-motion";-import { useEffect, useRef, useState } from "react";--interface ArtProps {- className?: string;-}--const CYCLE_MS = 5000;--const MARKERS = [- {- pct: 0.25,- name: "Sarah M",- text: "Love this approach π₯",- emoji: "β€οΈ",- color: "from-pink-400 to-rose-500",- yOffset: -110,- },- {- pct: 0.55,- name: "Jamie L",- text: "Can we extract this into a hook?",- emoji: "π₯",- color: "from-violet-400 to-purple-500",- yOffset: -80,- },- {- pct: 0.8,- name: "Alex K",- text: "Shipped! π",- emoji: "π",- color: "from-blue-400 to-cyan-500",- yOffset: -100,- },-];--const WAVEFORM = Array.from({ length: 48 }, (_, i) => {- const base =- Math.sin(i * 0.7) * 0.4 +- Math.sin(i * 1.3) * 0.3 +- Math.sin(i * 2.1) * 0.2 +- 0.1;- return { id: `wb${i}`, height: Math.max(0.08, Math.min(1, Math.abs(base))) };-});--interface CommentBubbleProps {- name: string;- text: string;- emoji: string;- color: string;- yOffset: number;-}--function CommentBubble({- name,- text,- emoji,- color,- yOffset,-}: CommentBubbleProps) {- return (- <motion.div- initial={{ opacity: 0, scale: 0.7, y: 10 }}- animate={{ opacity: 1, scale: 1, y: 0 }}- exit={{ opacity: 0, scale: 0.85, y: -6 }}- transition={{ type: "spring", stiffness: 420, damping: 28 }}- style={{ bottom: `calc(28px + ${-yOffset}px)` }}- className="absolute flex items-start gap-1.5 pointer-events-none"- >- <div- className={`w-6 h-6 rounded-full bg-gradient-to-br ${color} flex-shrink-0 mt-0.5`}- />- <div className="bg-gray-2 border border-gray-5 rounded-xl px-2.5 py-1.5 shadow-sm max-w-[180px]">- <p className="text-[10px] font-semibold text-gray-12 leading-tight">- {name}- </p>- <p className="text-[10px] text-gray-10 leading-snug mt-0.5">{text}</p>- </div>- <FloatingEmoji emoji={emoji} />- </motion.div>- );-}--function FloatingEmoji({ emoji }: { emoji: string }) {- return (- <motion.span- initial={{ opacity: 1, y: 0 }}- animate={{ opacity: 0, y: -30 }}- transition={{ duration: 1.4, ease: "easeOut", delay: 0.3 }}- className="text-sm absolute -top-5 -right-2 pointer-events-none select-none"- >- {emoji}- </motion.span>- );-}--const AsyncCommentsArt = ({ className }: ArtProps) => {- const prefersReduced = useReducedMotion();- const [progress, setProgress] = useState(0);- const [cycle, setCycle] = useState(0);- const [commentCount, setCommentCount] = useState(3);- const [reactionCount, setReactionCount] = useState(12);- const rafRef = useRef<number | null>(null);- const startRef = useRef<number | null>(null);-- useEffect(() => {- if (prefersReduced) return;-- function tick(ts: number) {- if (startRef.current === null) startRef.current = ts;- const elapsed = ts - startRef.current;- const p = Math.min(elapsed / CYCLE_MS, 1);- setProgress(p);- if (p < 1) {- rafRef.current = requestAnimationFrame(tick);- } else {- setTimeout(() => {- startRef.current = null;- setProgress(0);- setCycle((c) => c + 1);- setCommentCount((c) => c + Math.floor(Math.random() * 2));- setReactionCount((r) => r + Math.floor(Math.random() * 4 + 1));- rafRef.current = requestAnimationFrame(tick);- }, 400);- }- }-- rafRef.current = requestAnimationFrame(tick);- return () => {- if (rafRef.current !== null) cancelAnimationFrame(rafRef.current);- };- }, [prefersReduced]);-- const visibleMarkers = MARKERS.filter(- (m) => prefersReduced || progress >= m.pct,- );-- return (- <div- className={`relative w-full h-full overflow-hidden select-none ${className ?? ""}`}- >- <div className="absolute top-3 left-3 flex items-center gap-1.5">- <span className="text-[11px] text-gray-10 font-medium tabular-nums">- {commentCount} comments β’ {reactionCount} reactions- </span>- </div>-- <div className="absolute bottom-0 left-0 right-0 h-[28px] bg-gray-2 border-t border-gray-5 flex items-end px-3 gap-[2px]">- {WAVEFORM.map((bar) => (- <div- key={bar.id}- className="flex-1 rounded-sm bg-gray-5"- style={{ height: `${Math.round(bar.height * 18)}px` }}- />- ))}-- {MARKERS.map((m) => (- <div- key={m.pct}- className="absolute bottom-[28px] w-[1px] h-2 bg-blue-500 opacity-60"- style={{ left: `${m.pct * 100}%` }}- />- ))}-- <motion.div- className="absolute bottom-0 flex flex-col items-center pointer-events-none"- style={{ left: prefersReduced ? "50%" : `${progress * 100}%` }}- >- <div className="w-2 h-2 rounded-full bg-blue-500 -mb-px" />- <div- className="w-[2px] bg-blue-500 rounded-full"- style={{ height: "28px" }}- />- </motion.div>- </div>-- <div className="absolute bottom-[28px] left-0 right-0">- <AnimatePresence mode="sync">- {visibleMarkers.map((m) => (- <div- key={`${cycle}-${m.pct}`}- className="absolute"- style={{ left: `calc(${m.pct * 100}% - 12px)` }}- >- <CommentBubble- name={m.name}- text={m.text}- emoji={m.emoji}- color={m.color}- yOffset={m.yOffset}- />- </div>- ))}- </AnimatePresence>- </div>- </div>- );-};--export default AsyncCommentsArt;diff --git a/apps/web/components/pages/HomePage/bento/CapAIArt.tsx b/apps/web/components/pages/HomePage/bento/CapAIArt.tsxdeleted file mode 100644index cae61c1e5..000000000--- a/apps/web/components/pages/HomePage/bento/CapAIArt.tsx+++ /dev/null@@ -1,226 +0,0 @@-"use client";--import { AnimatePresence, motion, useReducedMotion } from "framer-motion";-import { BookOpen, Captions, FileText, Sparkles, Type } from "lucide-react";-import { useEffect, useRef, useState } from "react";--const STATES = ["title", "summary", "chapters", "transcript"] as const;--const TITLE_TEXT = "How to ship a feature in 24 hours";--const SUMMARY_LINES = [- "Walks through a complete feature lifecycle",- "From initial spec to production deploy",- "Includes testing, review & rollout steps",-];--const CHAPTERS = [- { time: "0:00", label: "Defining the scope" },- { time: "1:24", label: "Writing the spec" },- { time: "3:47", label: "Building & testing" },-];--const TRANSCRIPT_ROWS = [- { time: "0:12", text: "Let's start by scoping the feature clearly" },- { time: "0:28", text: "so the team knows exactly what to build" },- { time: "0:41", text: "and what to leave for a future iteration." },- { time: "0:55", text: "First, write a one-pager with the goal" },- { time: "1:08", text: "success criteria and non-goals defined." },-];--function TitleCard({ reduced }: { reduced: boolean }) {- const [displayed, setDisplayed] = useState(reduced ? TITLE_TEXT : "");- const idx = useRef(0);-- useEffect(() => {- if (reduced) return;- idx.current = 0;- setDisplayed("");- const id = setInterval(() => {- idx.current += 2;- setDisplayed(TITLE_TEXT.slice(0, idx.current));- if (idx.current >= TITLE_TEXT.length) clearInterval(id);- }, 25);- return () => clearInterval(id);- }, [reduced]);-- return (- <div className="flex flex-col gap-3 p-4">- <div className="flex items-center gap-1.5 text-blue-500">- <Type size={13} />- <span className="text-xs font-medium">Title</span>- </div>- <p className="text-gray-12 text-sm font-semibold leading-snug min-h-[3.5rem]">- {displayed}- {!reduced && displayed.length < TITLE_TEXT.length && (- <motion.span- animate={{ opacity: [1, 0] }}- transition={{ repeat: Infinity, duration: 0.5 }}- className="inline-block w-0.5 h-4 bg-blue-500 ml-0.5 align-middle"- />- )}- </p>- </div>- );-}--function SummaryCard() {- return (- <div className="flex flex-col gap-3 p-4">- <div className="flex items-center gap-1.5 text-blue-500">- <FileText size={13} />- <span className="text-xs font-medium">Summary</span>- </div>- <div className="flex flex-col gap-2">- {SUMMARY_LINES.map((line, i) => (- <motion.div- key={line}- initial={{ width: "0%" }}- animate={{ width: "100%" }}- transition={{ delay: i * 0.12, duration: 0.4, ease: "easeOut" }}- className="overflow-hidden"- >- <p className="text-gray-10 text-xs leading-relaxed whitespace-nowrap">- {line}- </p>- </motion.div>- ))}- </div>- </div>- );-}--function ChaptersCard() {- return (- <div className="flex flex-col gap-3 p-4">- <div className="flex items-center gap-1.5 text-blue-500">- <BookOpen size={13} />- <span className="text-xs font-medium">Chapters</span>- </div>- <div className="flex flex-col gap-1.5">- {CHAPTERS.map((ch, i) => (- <motion.div- key={ch.time}- initial={{ opacity: 0, y: 8 }}- animate={{ opacity: 1, y: 0 }}- transition={{ delay: i * 0.15, duration: 0.3 }}- className={`flex items-center gap-2 rounded-md px-2 py-1.5 ${i === 1 ? "bg-gray-2 border-l-2 border-blue-500" : ""}`}- >- <span className="text-gray-9 text-[10px] font-mono w-8 shrink-0">- {ch.time}- </span>- <span- className={`text-xs ${i === 1 ? "text-gray-12 font-medium" : "text-gray-10"}`}- >- {ch.label}- </span>- </motion.div>- ))}- </div>- </div>- );-}--function TranscriptCard() {- return (- <div className="flex flex-col gap-3 p-4 overflow-hidden">- <div className="flex items-center gap-1.5 text-blue-500">- <Captions size={13} />- <span className="text-xs font-medium">Transcript</span>- </div>- <motion.div- animate={{ y: [0, -52] }}- transition={{ duration: 2.2, ease: "linear", repeat: 0 }}- className="flex flex-col gap-2"- >- {TRANSCRIPT_ROWS.map((row) => (- <div key={row.time} className="flex items-start gap-2">- <span className="text-gray-9 text-[10px] font-mono w-8 shrink-0 pt-0.5">- {row.time}- </span>- <span className="text-gray-10 text-xs leading-relaxed">- {row.text}- </span>- </div>- ))}- </motion.div>- </div>- );-}--interface ArtProps {- className?: string;-}--const CapAIArt = ({ className }: ArtProps) => {- const reduced = useReducedMotion() ?? false;- const [stateIdx, setStateIdx] = useState(0);-- useEffect(() => {- if (reduced) return;- const id = setInterval(() => {- setStateIdx((prev) => (prev + 1) % STATES.length);- }, 2200);- return () => clearInterval(id);- }, [reduced]);-- const current = STATES[stateIdx];-- return (- <div- className={`relative flex flex-col items-center justify-center overflow-hidden bg-gray-1 ${className ?? ""}`}- >- <motion.div- animate={reduced ? {} : { x: [0, 22, 0], y: [0, -14, 0] }}- transition={{ duration: 7, repeat: Infinity, ease: "easeInOut" }}- className="pointer-events-none absolute left-6 top-8 h-28 w-28 rounded-full bg-blue-500 opacity-10 blur-2xl"- />- <motion.div- animate={reduced ? {} : { x: [0, -18, 0], y: [0, 18, 0] }}- transition={{ duration: 9, repeat: Infinity, ease: "easeInOut" }}- className="pointer-events-none absolute bottom-8 right-6 h-28 w-28 rounded-full opacity-10 blur-2xl"- style={{ background: "#8b5cf6" }}- />-- <div className="relative z-10 flex w-full flex-col items-center gap-3 px-4">- <div className="flex items-center gap-1.5 self-start rounded-full border border-gray-5 bg-gray-2 px-2.5 py-1">- <motion.div- animate={reduced ? {} : { opacity: [0.6, 1, 0.6] }}- transition={{ duration: 2, repeat: Infinity, ease: "easeInOut" }}- >- <Sparkles size={11} className="text-blue-500" />- </motion.div>- <span className="text-gray-12 text-[11px] font-medium">Cap AI</span>- </div>-- <div className="w-full rounded-xl border border-gray-5 bg-gray-1 shadow-sm min-h-[140px]">- <AnimatePresence mode="wait">- <motion.div- key={current}- initial={{ opacity: 0, y: reduced ? 0 : 6 }}- animate={{ opacity: 1, y: 0 }}- exit={{ opacity: 0, y: reduced ? 0 : -6 }}- transition={reduced ? { duration: 0 } : { duration: 0.25 }}- >- {current === "title" && <TitleCard reduced={reduced} />}- {current === "summary" && <SummaryCard />}- {current === "chapters" && <ChaptersCard />}- {current === "transcript" && <TranscriptCard />}- </motion.div>- </AnimatePresence>- </div>-- <div className="flex gap-1.5 self-center">- {STATES.map((s, i) => (- <div- key={s}- className={`h-1 rounded-full transition-all duration-300 ${i === stateIdx ? "w-4 bg-blue-500" : "w-1 bg-gray-5"}`}- />- ))}- </div>- </div>- </div>- );-};--export default CapAIArt;diff --git a/apps/web/components/pages/HomePage/bento/NativePerformanceArt.tsx b/apps/web/components/pages/HomePage/bento/NativePerformanceArt.tsxdeleted file mode 100644index 8742b8bc7..000000000--- a/apps/web/components/pages/HomePage/bento/NativePerformanceArt.tsx+++ /dev/null@@ -1,193 +0,0 @@-"use client";--import { motion, useReducedMotion } from "framer-motion";-import { Activity, Globe, Zap } from "lucide-react";-import { useEffect, useState } from "react";--interface PerfValues {- capCpu: number;- capRam: number;- elCpu: number;- elRam: number;-}--const STATIC: PerfValues = {- capCpu: 8,- capRam: 128,- elCpu: 72,- elRam: 680,-};--const RAM_MAX = 1024;--function randomBetween(min: number, max: number) {- return Math.floor(Math.random() * (max - min + 1)) + min;-}--function PerformanceBar({- value,- max,- accent,-}: {- value: number;- max: number;- accent: "blue" | "muted";-}) {- const pct = Math.min((value / max) * 100, 100);- return (- <div className="relative h-1.5 w-full rounded-full bg-gray-3 overflow-hidden">- <motion.div- className={- accent === "blue"- ? "absolute inset-y-0 left-0 rounded-full bg-blue-500"- : "absolute inset-y-0 left-0 rounded-full bg-gray-9"- }- animate={{ width: `${pct}%` }}- transition={{ duration: 0.6, ease: "easeOut" }}- style={{ width: `${pct}%` }}- />- </div>- );-}--function StatRow({- cpu,- ram,- accent,-}: {- cpu: number;- ram: number;- accent: "blue" | "muted";-}) {- return (- <div className="flex flex-col gap-2 w-full">- <div className="flex flex-col gap-1.5">- <div className="flex items-center justify-between">- <span className="text-[10px] font-medium text-gray-10">CPU</span>- <motion.span- key={cpu}- className={- accent === "blue"- ? "text-[10px] font-semibold tabular-nums text-blue-500"- : "text-[10px] font-semibold tabular-nums text-gray-10"- }- initial={{ opacity: 0.6 }}- animate={{ opacity: 1 }}- transition={{ duration: 0.3 }}- >- {cpu}%- </motion.span>- </div>- <PerformanceBar value={cpu} max={100} accent={accent} />- </div>- <div className="flex flex-col gap-1.5">- <div className="flex items-center justify-between">- <span className="text-[10px] font-medium text-gray-10">RAM</span>- <motion.span- key={ram}- className={- accent === "blue"- ? "text-[10px] font-semibold tabular-nums text-blue-500"- : "text-[10px] font-semibold tabular-nums text-gray-10"- }- initial={{ opacity: 0.6 }}- animate={{ opacity: 1 }}- transition={{ duration: 0.3 }}- >- {ram} MB- </motion.span>- </div>- <PerformanceBar value={ram} max={RAM_MAX} accent={accent} />- </div>- </div>- );-}--export default function NativePerformanceArt({- className,-}: {- className?: string;-}) {- const reduced = useReducedMotion();- const [values, setValues] = useState<PerfValues>(STATIC);-- useEffect(() => {- if (reduced) return;-- const id = setInterval(() => {- setValues({- capCpu: randomBetween(4, 14),- capRam: randomBetween(110, 140),- elCpu: randomBetween(55, 85),- elRam: randomBetween(580, 720),- });- }, 800);-- return () => clearInterval(id);- }, [reduced]);-- return (- <div- className={`flex flex-col gap-4 w-full h-full p-4 select-none ${className ?? ""}`}- >- <div className="flex items-center gap-1.5">- <Activity className="w-3 h-3 text-green-500" />- <span className="text-[11px] font-medium text-gray-10 uppercase tracking-wide">- Live performance- </span>- {!reduced && (- <motion.div- className="w-1.5 h-1.5 rounded-full bg-green-500 ml-0.5"- animate={{ opacity: [1, 0.3, 1] }}- transition={{ duration: 1.8, repeat: Infinity, ease: "easeInOut" }}- />- )}- {reduced && (- <div className="w-1.5 h-1.5 rounded-full bg-green-500 ml-0.5" />- )}- </div>-- <div className="flex flex-col gap-3 flex-1">- <div- className="flex gap-3 p-3 rounded-xl border border-gray-5 bg-gray-1"- style={{- boxShadow:- "0 0 0 1px rgba(59,130,246,0.15), 0 0 12px rgba(59,130,246,0.08)",- }}- >- <div className="flex items-center gap-2 min-w-[110px]">- <div className="flex items-center justify-center w-6 h-6 rounded-md bg-blue-500 shrink-0">- <Zap className="w-3.5 h-3.5 text-white" />- </div>- <div className="flex flex-col">- <span className="text-[11px] font-semibold text-gray-12 leading-tight">- Cap- </span>- <span className="text-[10px] text-blue-500 leading-tight">- Native- </span>- </div>- </div>- <StatRow cpu={values.capCpu} ram={values.capRam} accent="blue" />- </div>-- <div className="flex gap-3 p-3 rounded-xl border border-gray-5 bg-gray-2">- <div className="flex items-center gap-2 min-w-[110px]">- <div className="flex items-center justify-center w-6 h-6 rounded-md bg-gray-3 border border-gray-5 shrink-0">- <Globe className="w-3.5 h-3.5 text-gray-10" />- </div>- <div className="flex flex-col">- <span className="text-[11px] font-semibold text-gray-12 leading-tight">- Electron App- </span>- <span className="text-[10px] text-gray-9 leading-tight">- Chromium- </span>- </div>- </div>- <StatRow cpu={values.elCpu} ram={values.elRam} accent="muted" />- </div>- </div>- </div>- );-}diff --git a/apps/web/components/pages/HomePage/bento/OpenSourceArt.tsx b/apps/web/components/pages/HomePage/bento/OpenSourceArt.tsxdeleted file mode 100644index b467b7ceb..000000000--- a/apps/web/components/pages/HomePage/bento/OpenSourceArt.tsx+++ /dev/null@@ -1,195 +0,0 @@-"use client";--import {- animate,- motion,- useMotionValue,- useReducedMotion,-} from "framer-motion";-import { Github, Star } from "lucide-react";-import { useEffect, useMemo, useRef, useState } from "react";--const ROWS = 7;-const COLS = 14;-const START_STARS = 9842;-const END_STARS = 10347;-const FILL_CLASSES = [- "bg-emerald-200",- "bg-emerald-400",- "bg-emerald-500",- "bg-emerald-600",-] as const;--const AVATAR_GRADIENTS = [- "from-violet-400 to-blue-500",- "from-pink-400 to-rose-500",- "from-amber-400 to-orange-500",-];--function deterministicFill(- row: number,- col: number,-): (typeof FILL_CLASSES)[number] {- const hash = (row * 31 + col * 17 + row * col * 7) % FILL_CLASSES.length;- return FILL_CLASSES[hash] ?? FILL_CLASSES[0];-}--function deterministicActive(row: number, col: number): boolean {- const hash = (row * 13 + col * 29 + (row + col) * 3) % 10;- return hash > 2;-}--function formatStars(n: number): string {- if (n >= 1000) return `${(n / 1000).toFixed(1)}k`;- return String(n);-}--interface CellData {- id: string;- row: number;- col: number;- active: boolean;- fill: (typeof FILL_CLASSES)[number];-}--interface ArtProps {- className?: string;-}--const OpenSourceArt = ({ className }: ArtProps) => {- const shouldReduceMotion = useReducedMotion();- const [step, setStep] = useState(shouldReduceMotion ? COLS : 0);- const intervalRef = useRef<ReturnType<typeof setInterval> | null>(null);- const starCount = useMotionValue(START_STARS);- const [displayStars, setDisplayStars] = useState(START_STARS);-- const cellPattern = useMemo<CellData[][]>(() => {- return Array.from({ length: ROWS }, (_, r) =>- Array.from({ length: COLS }, (_, c) => ({- id: `cell-${r}-${c}`,- row: r,- col: c,- active: deterministicActive(r, c),- fill: deterministicFill(r, c),- })),- );- }, []);-- useEffect(() => {- if (shouldReduceMotion) return;-- const unsubscribe = starCount.on("change", (v) => {- setDisplayStars(Math.round(v));- });-- return unsubscribe;- }, [starCount, shouldReduceMotion]);-- useEffect(() => {- if (shouldReduceMotion) return;-- const runStarAnimation = () => {- starCount.set(START_STARS);- animate(starCount, END_STARS, { duration: 4, ease: "easeOut" });- };-- runStarAnimation();- const starInterval = setInterval(runStarAnimation, 6000);-- return () => clearInterval(starInterval);- }, [starCount, shouldReduceMotion]);-- useEffect(() => {- if (shouldReduceMotion) return;-- const STEP_INTERVAL = 150;- const HOLD_STEPS = 8;-- intervalRef.current = setInterval(() => {- setStep((prev) => {- if (prev >= COLS + HOLD_STEPS) return 0;- return prev + 1;- });- }, STEP_INTERVAL);-- return () => {- if (intervalRef.current) clearInterval(intervalRef.current);- };- }, [shouldReduceMotion]);-- return (- <div className={`flex flex-col gap-3 p-4 select-none ${className ?? ""}`}>- <div className="flex items-center gap-2">- <Github className="w-4 h-4 text-gray-12 shrink-0" />- <span className="text-gray-10 text-[11px] font-mono truncate flex-1">- github.com/CapSoftware/Cap- </span>- <div className="flex items-center gap-1 shrink-0">- <Star className="w-3.5 h-3.5 text-yellow-400 fill-current" />- <span className="text-gray-12 text-[12px] font-semibold tabular-nums">- {formatStars(shouldReduceMotion ? END_STARS : displayStars)}- </span>- </div>- </div>-- <div- className="grid gap-[3px]"- style={{- gridTemplateColumns: `repeat(${COLS}, minmax(0, 1fr))`,- gridTemplateRows: `repeat(${ROWS}, minmax(0, 1fr))`,- }}- >- {cellPattern.map((rowArr) =>- rowArr.map((cell) => {- const revealed = cell.col < step;- const isActive = cell.active && revealed;-- if (shouldReduceMotion) {- return (- <div- key={cell.id}- className={`rounded-[2px] aspect-square ${cell.active ? cell.fill : "bg-gray-3"}`}- />- );- }-- return (- <motion.div- key={cell.id}- className={`rounded-[2px] aspect-square ${isActive ? cell.fill : "bg-gray-3"}`}- animate={- isActive- ? { opacity: 1, scale: 1 }- : { opacity: revealed ? 1 : 0.4, scale: revealed ? 1 : 0.8 }- }- initial={{ opacity: 0.4, scale: 0.8 }}- transition={{- duration: 0.25,- delay: isActive ? cell.row * 0.015 : 0,- ease: "easeOut",- }}- />- );- }),- )}- </div>-- <div className="flex items-center gap-2 mt-auto">- <div className="flex items-center">- {AVATAR_GRADIENTS.map((grad, i) => (- <div- key={grad}- className={`w-5 h-5 rounded-full bg-gradient-to-br ${grad} border-2 border-gray-1 shrink-0`}- style={{ marginLeft: i === 0 ? 0 : -6 }}- />- ))}- </div>- <span className="text-gray-9 text-[11px]">- Active contributors this week- </span>- </div>- </div>- );-};--export default OpenSourceArt;diff --git a/apps/web/components/pages/HomePage/bento/PixelPerfectArt.tsx b/apps/web/components/pages/HomePage/bento/PixelPerfectArt.tsxdeleted file mode 100644index ea1d20ba5..000000000--- a/apps/web/components/pages/HomePage/bento/PixelPerfectArt.tsx+++ /dev/null@@ -1,225 +0,0 @@-"use client";--import { motion, useReducedMotion } from "framer-motion";-import { Cpu, Gauge, Maximize } from "lucide-react";-import { useEffect, useRef, useState } from "react";--const badges = [- { icon: Maximize, label: "4K UHD" },- { icon: Gauge, label: "60 FPS" },- { icon: Cpu, label: "HW-Accelerated" },-];--function formatTime(seconds: number): string {- const m = Math.floor(seconds / 60)- .toString()- .padStart(2, "0");- const s = (seconds % 60).toString().padStart(2, "0");- return `${m}:${s}`;-}--export default function PixelPerfectArt({ className }: { className?: string }) {- const reduced = useReducedMotion();- const [elapsed, setElapsed] = useState(23);- const intervalRef = useRef<ReturnType<typeof setInterval> | null>(null);-- useEffect(() => {- if (reduced) return;- intervalRef.current = setInterval(() => {- setElapsed((prev) => (prev + 1) % 60);- }, 1000);- return () => {- if (intervalRef.current) clearInterval(intervalRef.current);- };- }, [reduced]);-- const dividerVariants = reduced- ? {}- : {- animate: {- left: ["25%", "75%", "25%"],- transition: {- duration: 6,- ease: "easeInOut",- repeat: Number.POSITIVE_INFINITY,- repeatType: "loop" as const,- },- },- };-- return (- <div- className={`relative flex flex-col gap-3 w-full h-full select-none ${className ?? ""}`}- >- <div className="relative flex-1 rounded-xl overflow-hidden border border-[var(--gray-5,#e2e8f0)] bg-[var(--gray-1,#fafafa)] flex flex-col min-h-0">- <div className="flex items-center gap-1.5 px-3 py-2 border-b border-[var(--gray-5,#e2e8f0)] bg-[var(--gray-2,#f4f4f5)] shrink-0">- <span className="w-2.5 h-2.5 rounded-full bg-[#ff5f57]" />- <span className="w-2.5 h-2.5 rounded-full bg-[#febc2e]" />- <span className="w-2.5 h-2.5 rounded-full bg-[#28c840]" />- <div className="ml-auto flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-red-500/10 border border-red-500/20">- <motion.span- className="w-2 h-2 rounded-full bg-red-500 shrink-0"- animate={reduced ? {} : { opacity: [1, 0.3, 1] }}- transition={- reduced- ? {}- : { duration: 1.2, repeat: Number.POSITIVE_INFINITY }- }- />- <span className="text-[10px] font-mono font-semibold text-red-500 leading-none">- REC 4K β’ {formatTime(elapsed)}- </span>- </div>- </div>-- <div className="relative flex-1 overflow-hidden min-h-0">- <div className="absolute inset-0">- <div- className="absolute inset-0"- style={{- background:- "linear-gradient(135deg, #a5b4fc 0%, #818cf8 40%, #6366f1 70%, #4f46e5 100%)",- }}- />- <div- className="absolute inset-0 rounded-lg mx-6 my-4"- style={{- background: "rgba(255,255,255,0.12)",- backdropFilter: "blur(2px)",- boxShadow: "0 8px 32px rgba(0,0,0,0.18)",- }}- />- <div- className="absolute inset-x-10 top-8 bottom-8 rounded-md"- style={{- background: "rgba(255,255,255,0.08)",- boxShadow: "0 4px 16px rgba(0,0,0,0.12)",- }}- />- <div- className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-10 h-10 rounded-full flex items-center justify-center"- style={{- background: "rgba(255,255,255,0.22)",- boxShadow: "0 2px 8px rgba(0,0,0,0.15)",- }}- >- <div- className="w-0 h-0"- style={{- borderTop: "7px solid transparent",- borderBottom: "7px solid transparent",- borderLeft: "12px solid rgba(255,255,255,0.9)",- marginLeft: "2px",- }}- />- </div>- </div>-- <div- className="absolute inset-0 overflow-hidden"- style={{- clipPath: `inset(0 ${reduced ? "50%" : "var(--clip-right, 50%)"} 0 0)`,- }}- >- <motion.div- className="absolute inset-0"- initial={- reduced ? undefined : ({ "--clip-right": "50%" } as never)- }- animate={- reduced- ? undefined- : ({- "--clip-right": ["75%", "25%", "75%"],- } as never)- }- transition={- reduced- ? undefined- : {- duration: 6,- ease: "easeInOut",- repeat: Number.POSITIVE_INFINITY,- repeatType: "loop",- }- }- >- <div- className="absolute inset-0"- style={{- background:- "linear-gradient(135deg, #a5b4fc 0%, #818cf8 40%, #6366f1 70%, #4f46e5 100%)",- imageRendering: "pixelated",- filter: "blur(0px)",- }}- />- <div- className="absolute inset-0"- style={{- backgroundImage: `- linear-gradient(to right, rgba(80,70,180,0.55) 1px, transparent 1px),- linear-gradient(to bottom, rgba(80,70,180,0.55) 1px, transparent 1px)- `,- backgroundSize: "12px 12px",- mixBlendMode: "multiply",- }}- />- <div- className="absolute inset-0 rounded-lg mx-6 my-4"- style={{- background: "rgba(255,255,255,0.10)",- filter: "blur(1.5px)",- }}- />- </motion.div>- </div>-- <motion.div- className="absolute top-0 bottom-0 w-px bg-white/80 shadow-[0_0_6px_2px_rgba(255,255,255,0.4)] z-10"- style={{ left: reduced ? "50%" : "25%" }}- {...dividerVariants}- >- <div className="absolute top-1/2 -translate-y-1/2 -translate-x-1/2 w-5 h-5 rounded-full bg-white border border-white/60 shadow-md flex items-center justify-center">- <div className="flex gap-px">- <span className="w-px h-3 bg-gray-400 rounded-full" />- <span className="w-px h-3 bg-gray-400 rounded-full" />- </div>- </div>- </motion.div>-- <div className="absolute bottom-2 left-2 z-10">- <span className="text-[9px] font-semibold text-white/60 uppercase tracking-wider bg-black/20 px-1.5 py-0.5 rounded">- Pixelated- </span>- </div>- <div className="absolute bottom-2 right-2 z-10">- <span className="text-[9px] font-semibold text-white/60 uppercase tracking-wider bg-black/20 px-1.5 py-0.5 rounded">- 4K Sharp- </span>- </div>- </div>- </div>-- <div className="flex items-center gap-2 shrink-0">- {badges.map(({ icon: Icon, label }, i) => (- <motion.div- key={label}- className="flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg border border-[var(--gray-5,#e2e8f0)] bg-[var(--gray-1,#fafafa)] text-[var(--gray-12,#111)]"- initial={reduced ? undefined : { opacity: 0, scale: 0.85 }}- animate={reduced ? undefined : { opacity: 1, scale: 1 }}- transition={- reduced- ? undefined- : { delay: 0.3 + i * 0.15, duration: 0.35, ease: "easeOut" }- }- >- <Icon className="w-3.5 h-3.5 text-blue-500 shrink-0" />- <span className="text-[11px] font-semibold whitespace-nowrap">- {label}- </span>- </motion.div>- ))}- </div>- </div>- );-}diff --git a/apps/web/components/pages/HomePage/bento/StorageRoutingArt.tsx b/apps/web/components/pages/HomePage/bento/StorageRoutingArt.tsxdeleted file mode 100644index 5bc3fb8d4..000000000--- a/apps/web/components/pages/HomePage/bento/StorageRoutingArt.tsx+++ /dev/null@@ -1,283 +0,0 @@-"use client";--import clsx from "clsx";-import { motion, useReducedMotion } from "framer-motion";-import { Cloud, Database, HardDrive } from "lucide-react";-import { useId } from "react";--interface ArtProps {- className?: string;-}--interface Destination {- id: string;- label: string;- icon: React.ReactNode;- cy: number;- primary?: boolean;-}--interface Packet {- id: number;- delay: number;-}--const DESTINATIONS: Destination[] = [- {- id: "cloud",- label: "Cap Cloud",- icon: <Cloud size={14} />,- cy: 60,- },- {- id: "s3",- label: "Your S3",- icon: <Database size={14} />,- cy: 140,- primary: true,- },- {- id: "disk",- label: "Local Disk",- icon: <HardDrive size={14} />,- cy: 220,- },-];--const PACKETS: Packet[] = [- { id: 0, delay: 0 },- { id: 1, delay: 1.1 },- { id: 2, delay: 2.2 },-];--const SOURCE_X = 90;-const SOURCE_CY = 140;-const BRANCH_X = 220;-const DEST_X = 380;-const SVG_W = 480;-const SVG_H = 280;--function buildPath(destCy: number): string {- const mx = (SOURCE_X + BRANCH_X) / 2;- const bx = (BRANCH_X + DEST_X) / 2;- return `M ${SOURCE_X} ${SOURCE_CY} C ${mx} ${SOURCE_CY}, ${mx} ${SOURCE_CY}, ${BRANCH_X} ${SOURCE_CY} C ${bx} ${SOURCE_CY}, ${bx} ${destCy}, ${DEST_X} ${destCy}`;-}--function AnimatedPacket({- destCy,- delay,- primary,- reduced,-}: {- destCy: number;- delay: number;- primary: boolean;- reduced: boolean;-}) {- const path = buildPath(destCy);-- if (reduced) {- return (- <circle- cx={DEST_X}- cy={destCy}- r={4}- className={primary ? "fill-blue-500" : "fill-gray-400"}- opacity={0.7}- />- );- }-- return (- <circle- r={4}- className={primary ? "fill-blue-500" : "fill-gray-400"}- opacity={0}- >- <animateMotion- dur="3s"- begin={`${delay}s`}- repeatCount="indefinite"- path={path}- calcMode="spline"- keyTimes="0;1"- keySplines="0.42 0 0.58 1"- />- <animate- attributeName="opacity"- values="0;1;1;0"- keyTimes="0;0.1;0.85;1"- dur="3s"- begin={`${delay}s`}- repeatCount="indefinite"- />- </circle>- );-}--function PathLine({- destCy,- primary,- delay,-}: {- destCy: number;- primary: boolean;- delay: number;-}) {- const d = buildPath(destCy);- return (- <motion.path- d={d}- fill="none"- strokeWidth={1.5}- strokeLinecap="round"- className={primary ? "stroke-blue-500/40" : "stroke-gray-300/40"}- initial={{ pathLength: 0, opacity: 0 }}- animate={{ pathLength: 1, opacity: 1 }}- transition={{ duration: 0.6, delay, ease: "easeOut" }}- />- );-}--const StorageRoutingArt = ({ className }: ArtProps) => {- const reduced = useReducedMotion() ?? false;- const uid = useId();- const gridId = `grid-dots-${uid}`;-- return (- <div- className={clsx(- "relative flex items-center justify-center w-full overflow-hidden rounded-xl bg-gray-1 border border-gray-5",- className,- )}- style={{ minHeight: 260 }}- >- <svg- viewBox={`0 0 ${SVG_W} ${SVG_H}`}- className="w-full h-full"- style={{ maxHeight: 300 }}- aria-hidden="true"- >- <defs>- <pattern- id={gridId}- width="20"- height="20"- patternUnits="userSpaceOnUse"- >- <circle cx="1" cy="1" r="0.8" className="fill-gray-400/20" />- </pattern>- </defs>-- <rect- x={0}- y={0}- width={SVG_W}- height={SVG_H}- fill={`url(#${gridId})`}- />-- {DESTINATIONS.map((dest, i) => (- <PathLine- key={dest.id}- destCy={dest.cy}- primary={dest.primary ?? false}- delay={reduced ? 0 : 0.3 + i * 0.1}- />- ))}-- {DESTINATIONS.map((dest) =>- PACKETS.map((pkt) => (- <AnimatedPacket- key={`${dest.id}-${pkt.id}`}- destCy={dest.cy}- delay={- pkt.delay + (dest.primary ? 0 : dest.cy > SOURCE_CY ? 0.4 : 0.2)- }- primary={dest.primary ?? false}- reduced={reduced}- />- )),- )}-- <motion.foreignObject- x={SOURCE_X - 52}- y={SOURCE_CY - 26}- width={104}- height={52}- initial={{ opacity: 0, x: SOURCE_X - 62 }}- animate={{ opacity: 1, x: SOURCE_X - 52 }}- transition={{ duration: 0.4, ease: "easeOut" }}- >- <div- className="flex flex-col items-center justify-center w-full h-full rounded-lg bg-gray-2 border border-blue-500/30 px-2 gap-1"- style={{- boxShadow: "0 0 12px 2px rgba(59,130,246,0.18)",- }}- >- <div className="flex items-center gap-1">- <span- className="inline-block w-2 h-2 rounded-full bg-red-500"- style={- reduced- ? undefined- : {- animation: "pulse 1.4s ease-in-out infinite",- }- }- />- <span className="text-gray-12 font-medium leading-none text-[9px]">- recording.mp4- </span>- </div>- </div>- </motion.foreignObject>-- {DESTINATIONS.map((dest, i) => (- <motion.foreignObject- key={dest.id}- x={DEST_X + 8}- y={dest.cy - 22}- width={108}- height={44}- initial={{ opacity: 0, x: DEST_X + 0 }}- animate={{ opacity: 1, x: DEST_X + 8 }}- transition={{- duration: 0.4,- delay: reduced ? 0 : 0.5 + i * 0.1,- ease: "easeOut",- }}- >- <div- className={clsx(- "flex items-center gap-2 w-full h-full rounded-lg px-3 border",- dest.primary- ? "bg-blue-500/10 border-blue-500/30 text-blue-500"- : "bg-gray-2 border-gray-5 text-gray-10",- )}- style={- dest.primary- ? { boxShadow: "0 0 10px 1px rgba(59,130,246,0.15)" }- : undefined- }- >- {dest.icon}- <span className="text-[10px] font-medium leading-none">- {dest.label}- </span>- </div>- </motion.foreignObject>- ))}- </svg>-- <style>{`- @keyframes pulse {- 0%, 100% { opacity: 1; }- 50% { opacity: 0.3; }- }- `}</style>- </div>- );-};--export default StorageRoutingArt;