| | |
| | | const pathname = usePathname(); |
| | | const isLoginPage = pathname === '/login'; |
| | | const isHomePage = pathname === '/'; |
| | | const isAIScenePage = pathname.startsWith('/ai-scene'); |
| | | |
| | | useEffect(() => { |
| | | setIsClient(true); |
| | |
| | | return ( |
| | | <div className="animate-fadeIn"> |
| | | <div className="flex flex-col min-h-screen"> |
| | | <Navbar /> |
| | | <main className={`flex-1 ${isHomePage ? '' : 'bg-gradient-to-b from-[var(--ai-surface)] to-white'} pt-0 mt-0`}> |
| | | {!isLoginPage && <Navbar />} |
| | | <main className={`flex-1 ${isHomePage || isAIScenePage ? '' : 'bg-gradient-to-b from-[var(--ai-surface)] to-white'} pt-0 mt-0`}> |
| | | {children} |
| | | </main> |
| | | {!isLoginPage && ( |
| | | <footer className="relative z-20 bg-gradient-to-br from-[#0A1033] via-[#1E2B63] to-[#131C41] text-white py-10 overflow-hidden"> |
| | | {/* 科技感动态背景元素 */} |
| | | <div className="absolute inset-0 overflow-hidden pointer-events-none"> |
| | |
| | | <linearGradient id="footerGradient" x1="0%" y1="0%" x2="100%" y2="0%"> |
| | | <stop offset="0%" stopColor="#6ADBFF" /> |
| | | <stop offset="50%" stopColor="#5E72EB" /> |
| | | <stop offset="100%" stopColor="#6ADBFF" /> |
| | | <stop offset="100%" stopColor="#FF6A88" /> |
| | | </linearGradient> |
| | | </defs> |
| | | </svg> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | {/* 底部脉冲指示器 - 使用条件渲染 */} |
| | | {isClient ? ( |
| | | {/* 底部脉冲指示器 */} |
| | | <div className="flex items-center justify-center mb-4"> |
| | | <span className="inline-block w-2 h-2 bg-[#6ADBFF] rounded-full mr-3 animate-pulse"></span> |
| | | <span className="inline-block w-2 h-2 bg-[#5E72EB] rounded-full mx-3 animate-pulse" style={{animationDelay: '0.3s'}}></span> |
| | | <span className="inline-block w-2 h-2 bg-[#FF6A88] rounded-full ml-3 animate-pulse" style={{animationDelay: '0.6s'}}></span> |
| | | </div> |
| | | ) : ( |
| | | <div className="h-4 mb-4"></div> |
| | | )} |
| | | <p className="text-gray-300 text-sm">© 2024 帷幄君成. All rights reserved.</p> |
| | | |
| | | <p className="text-sm text-gray-400">© 2024 帷幄君成. All rights reserved.</p> |
| | | </div> |
| | | </div> |
| | | </footer> |
| | | )} |
| | | </div> |
| | | </div> |
| | | ); |