|
| 1 | +"use client" |
| 2 | + |
| 3 | +import { useState } from "react" |
| 4 | +import MainSection from "@/components/MainSection" |
| 5 | +import Link from "next/link" |
| 6 | +import { ArrowRight, X } from "lucide-react" |
| 7 | +import dynamic from "next/dynamic" |
| 8 | + |
| 9 | +// Import SplineBackground with no SSR |
| 10 | +const SplineBackground = dynamic(() => import("@/components/SplineBackground"), { |
| 11 | + ssr: false, |
| 12 | +}) |
| 13 | + |
| 14 | +export default function ClientPage() { |
| 15 | + const [mobileMenuOpen, setMobileMenuOpen] = useState(false) |
| 16 | + |
| 17 | + const toggleMobileMenu = () => { |
| 18 | + setMobileMenuOpen(!mobileMenuOpen) |
| 19 | + } |
| 20 | + |
| 21 | + return ( |
| 22 | + <div className="min-h-screen bg-transparent text-white relative"> |
| 23 | + {/* Main content with lowest z-index */} |
| 24 | + <div className="relative z-[1]"> |
| 25 | + <MainSection /> |
| 26 | + </div> |
| 27 | + |
| 28 | + {/* Spline Background with middle z-index */} |
| 29 | + <div className="fixed inset-0 z-[50]"> |
| 30 | + <SplineBackground /> |
| 31 | + </div> |
| 32 | + |
| 33 | + {/* Navigation with highest z-index */} |
| 34 | + <nav className="fixed top-0 left-0 right-0 z-[100] py-4 sm:py-8"> |
| 35 | + <div className="w-full px-4 sm:px-6 flex justify-between items-center"> |
| 36 | + {/* Logo at extreme left */} |
| 37 | + <div className="z-[200]"> |
| 38 | + <Link href="/" className="text-xl sm:text-2xl font-medium" style={{ pointerEvents: "auto" }}> |
| 39 | + Tanmay Hinge |
| 40 | + </Link> |
| 41 | + </div> |
| 42 | + |
| 43 | + {/* Center navigation links (desktop only) */} |
| 44 | + <div className="absolute left-1/2 transform -translate-x-1/2 hidden md:flex items-center gap-8 z-[200]"> |
| 45 | + <Link href="#work" className="hover:text-gray-300" style={{ pointerEvents: "auto" }}> |
| 46 | + Work |
| 47 | + </Link> |
| 48 | + <Link href="#about" className="hover:text-gray-300" style={{ pointerEvents: "auto" }}> |
| 49 | + About |
| 50 | + </Link> |
| 51 | + <Link href="#contact" className="hover:text-gray-300" style={{ pointerEvents: "auto" }}> |
| 52 | + Contact |
| 53 | + </Link> |
| 54 | + </div> |
| 55 | + |
| 56 | + {/* Right section - Button and mobile menu toggle */} |
| 57 | + <div className="z-[200]"> |
| 58 | + {/* Mobile menu button (only visible on small screens) */} |
| 59 | + <button |
| 60 | + onClick={toggleMobileMenu} |
| 61 | + className="md:hidden w-8 h-8 flex flex-col justify-center gap-1.5" |
| 62 | + style={{ pointerEvents: "auto" }} |
| 63 | + aria-label="Toggle mobile menu" |
| 64 | + > |
| 65 | + {mobileMenuOpen ? ( |
| 66 | + <X className="w-6 h-6" /> |
| 67 | + ) : ( |
| 68 | + <> |
| 69 | + <span className="w-full h-0.5 bg-white"></span> |
| 70 | + <span className="w-full h-0.5 bg-white"></span> |
| 71 | + </> |
| 72 | + )} |
| 73 | + </button> |
| 74 | + |
| 75 | + {/* Let's collaborate button (desktop only) */} |
| 76 | + <Link |
| 77 | + href="#contact" |
| 78 | + className="hidden md:inline-flex items-center gap-2 border border-white px-4 py-2 hover:bg-white hover:text-black transition-colors bg-black bg-opacity-70" |
| 79 | + style={{ pointerEvents: "auto" }} |
| 80 | + > |
| 81 | + Let's collaborate <ArrowRight className="w-4 h-4" /> |
| 82 | + </Link> |
| 83 | + </div> |
| 84 | + </div> |
| 85 | + |
| 86 | + {/* Mobile menu (only visible when open) */} |
| 87 | + {mobileMenuOpen && ( |
| 88 | + <div |
| 89 | + className="md:hidden fixed inset-0 bg-black bg-opacity-95 z-[150] pt-20 px-4" |
| 90 | + style={{ pointerEvents: "auto" }} |
| 91 | + > |
| 92 | + <div className="flex flex-col items-center gap-8 text-xl"> |
| 93 | + <Link href="#work" className="hover:text-gray-300" onClick={() => setMobileMenuOpen(false)}> |
| 94 | + Work |
| 95 | + </Link> |
| 96 | + <Link href="#about" className="hover:text-gray-300" onClick={() => setMobileMenuOpen(false)}> |
| 97 | + About |
| 98 | + </Link> |
| 99 | + <Link href="#contact" className="hover:text-gray-300" onClick={() => setMobileMenuOpen(false)}> |
| 100 | + Contact |
| 101 | + </Link> |
| 102 | + <Link |
| 103 | + href="#contact" |
| 104 | + className="inline-flex items-center gap-2 border border-white px-4 py-2 mt-4 hover:bg-white hover:text-black transition-colors" |
| 105 | + onClick={() => setMobileMenuOpen(false)} |
| 106 | + > |
| 107 | + Let's collaborate <ArrowRight className="w-4 h-4" /> |
| 108 | + </Link> |
| 109 | + </div> |
| 110 | + </div> |
| 111 | + )} |
| 112 | + </nav> |
| 113 | + </div> |
| 114 | + ) |
| 115 | +} |
| 116 | + |
0 commit comments