-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathApp.tsx
More file actions
36 lines (30 loc) · 1.19 KB
/
Copy pathApp.tsx
File metadata and controls
36 lines (30 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import React, { useEffect, useState } from 'react';
import Navigation from './components/Navigation';
import Hero from './components/Hero';
import gsap from 'gsap';
const App: React.FC = () => {
const [isDarkMode, setIsDarkMode] = useState(false);
const toggleTheme = () => {
setIsDarkMode((prev) => !prev);
};
useEffect(() => {
// Global GSAP settings
gsap.config({
autoSleep: 60,
force3D: true,
});
}, []);
return (
<div className={`min-h-screen transition-colors duration-700 ${isDarkMode ? 'bg-[#050505] text-white selection:bg-orange-900 selection:text-orange-100' : 'bg-white text-slate-900 selection:bg-orange-100 selection:text-orange-900'} overflow-hidden`}>
<Navigation isDarkMode={isDarkMode} toggleTheme={toggleTheme} />
<main>
<Hero isDarkMode={isDarkMode} />
</main>
{/* Footer fixed at bottom right or hidden for infinite feel */}
<footer className={`fixed bottom-4 right-6 text-[10px] pointer-events-none z-50 transition-colors duration-500 ${isDarkMode ? 'text-white/30' : 'text-black/30'}`}>
<p>© {new Date().getFullYear()} Delphi Clone.</p>
</footer>
</div>
);
};
export default App;