diff --git a/freebuff/web/src/app/home-client.tsx b/freebuff/web/src/app/home-client.tsx index 373cc2d4a..f337ee4ef 100644 --- a/freebuff/web/src/app/home-client.tsx +++ b/freebuff/web/src/app/home-client.tsx @@ -2,11 +2,13 @@ import { AnimatePresence, motion } from 'framer-motion' import { + Check, ChevronDown, + Copy, } from 'lucide-react' import Image from 'next/image' import Link from 'next/link' -import { useState } from 'react' +import { useMemo, useState } from 'react' import { BackgroundBeams } from '@/components/background-beams' import { CopyButton } from '@/components/copy-button' @@ -120,21 +122,107 @@ function SetupGuide() { ) } +const PARTICLE_COUNT = 14 + function InstallCommand({ className }: { className?: string }) { + const [copied, setCopied] = useState(false) + const [copyCount, setCopyCount] = useState(0) + + const particles = useMemo(() => + Array.from({ length: PARTICLE_COUNT }).map((_, i) => ({ + angle: (i / PARTICLE_COUNT) * 360 + (Math.random() - 0.5) * 25, + distance: 35 + Math.random() * 35, + size: 3 + Math.random() * 4, + durationExtra: Math.random() * 0.3, + })), + [copyCount], + ) + + const handleCopy = () => { + navigator.clipboard.writeText(INSTALL_COMMAND) + setCopied(true) + setCopyCount(c => c + 1) + setTimeout(() => setCopied(false), 1800) + } + return ( -
- {INSTALL_COMMAND}
-
-
+ {INSTALL_COMMAND}
+
+
+ - {faq.answer} -
++ {faq.answer} +
+- {item.description} -
+ {item.word}+ {item.description} +
+ + ))}