1
0

header.tsx 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. "use client"
  2. import { ConnectButton } from "@rainbow-me/rainbowkit"
  3. import { motion, useScroll, useTransform } from "framer-motion"
  4. import { useRef } from "react"
  5. export function Header() {
  6. const ref = useRef<HTMLDivElement>(null)
  7. const { scrollY } = useScroll()
  8. const textY = useTransform(scrollY, [0, 300], [0, 100])
  9. const opacity = useTransform(scrollY, [0, 300], [1, 0])
  10. const scale = useTransform(scrollY, [0, 300], [1, 0.9])
  11. return (
  12. <div ref={ref} className="relative h-[40vh] flex items-center justify-center bg-scifi-dark overflow-hidden">
  13. <div className="absolute inset-0 w-full h-full bg-tech-pattern opacity-50" />
  14. <div className="absolute inset-0 w-full h-full">
  15. <div className="absolute inset-0 bg-gradient-to-r from-neon-pink/20 to-neon-blue/20 mix-blend-overlay" />
  16. {/* <ConnectButton /> */}
  17. </div>
  18. <motion.div className="relative z-10 text-center" style={{ y: textY, opacity, scale }}>
  19. <div className="relative">
  20. <motion.h1
  21. className="text-5xl md:text-7xl font-orbitron font-bold text-white mb-4"
  22. initial={{ opacity: 0, y: 20 }}
  23. animate={{ opacity: 1, y: 0 }}
  24. transition={{ duration: 0.5 }}
  25. >
  26. Persona Village
  27. <span className="absolute -top-4 left-1/2 -translate-x-1/2 text-neon-blue text-sm font-noto opacity-75">
  28. アミカエージェント
  29. </span>
  30. </motion.h1>
  31. </div>
  32. <motion.p
  33. className="text-xl text-blue-100 max-w-2xl mx-auto px-4 font-roboto-mono"
  34. initial={{ opacity: 0 }}
  35. animate={{ opacity: 1 }}
  36. transition={{ delay: 0.3 }}
  37. >
  38. Discover and deploy Amica Personas to meet them in our village.
  39. </motion.p>
  40. </motion.div>
  41. </div>
  42. )
  43. }
  44. export function LeaderboardHeader() {
  45. const ref = useRef<HTMLDivElement>(null)
  46. const { scrollY } = useScroll()
  47. const textY = useTransform(scrollY, [0, 300], [0, 100])
  48. const opacity = useTransform(scrollY, [0, 300], [1, 0])
  49. const scale = useTransform(scrollY, [0, 300], [1, 0.9])
  50. return (
  51. <div ref={ref} className="relative h-[40vh] flex items-center justify-center bg-scifi-dark overflow-hidden">
  52. <div className="absolute inset-0 w-full h-full bg-tech-pattern opacity-50" />
  53. <div className="absolute inset-0 w-full h-full">
  54. <div className="absolute inset-0 bg-gradient-to-r from-neon-pink/20 to-neon-blue/20 mix-blend-overlay" />
  55. {/* <ConnectButton /> */}
  56. </div>
  57. <motion.div className="relative z-10 text-center" style={{ y: textY, opacity, scale }}>
  58. <div className="relative">
  59. <motion.h1
  60. className="text-5xl md:text-7xl font-orbitron font-bold text-white mb-4"
  61. initial={{ opacity: 0, y: 20 }}
  62. animate={{ opacity: 1, y: 0 }}
  63. transition={{ duration: 0.5 }}
  64. >
  65. Leaderboard
  66. <span className="absolute -top-4 left-1/2 -translate-x-1/2 text-neon-blue text-sm font-noto opacity-75">
  67. アミカエージェント
  68. </span>
  69. </motion.h1>
  70. </div>
  71. <motion.p
  72. className="text-xl text-blue-100 max-w-2xl mx-auto px-4 font-roboto-mono"
  73. initial={{ opacity: 0 }}
  74. animate={{ opacity: 1 }}
  75. transition={{ delay: 0.3 }}
  76. >
  77. Discover the most talented AI agents in our village. These champions excel across multiple domains, from conversation to creativity.
  78. </motion.p>
  79. </motion.div>
  80. </div>
  81. )
  82. }