|
1 | 1 | import React from 'react'; |
2 | 2 | import About from './components/About'; |
3 | | -import Header from './components/Header'; |
4 | | -import MeshCanvas from './components/MeshCanvas'; |
5 | | -import BackgroundCanvas from './components/BackgroundCanvas'; |
6 | | -import ContactFormModal from './components/modal/ContactForm/ContactFormModal'; |
7 | | - |
| 3 | +import Header from './components/common/Header'; |
| 4 | +import MeshCanvas from './components/canvas/MeshCanvas'; |
| 5 | +import BackgroundCanvas from './components/canvas/BackgroundCanvas'; |
| 6 | +import ContactFormModal from './components/contact-form/ContactFormModal'; |
| 7 | + |
| 8 | +/** |
| 9 | + * App Component |
| 10 | + * |
| 11 | + * The main component that renders the entire application/site. |
| 12 | + * |
| 13 | + */ |
8 | 14 | const App: React.FC = () => { |
9 | | - return ( |
10 | | - <div className="w-full h-full bg-gradient-to-b from-background-top to-black"> |
11 | | - {/* Main container with flex layout */} |
12 | | - <div className=" top-0 left-0 w-full h-full fixed"> |
13 | | - <BackgroundCanvas /> |
14 | | - </div> |
15 | | - |
16 | | - <div className="min-h-screen flex flex-col lg:flex-row items-center justify-center w-full"> |
17 | | - |
18 | | - {/* Header section (visible on medium screens and up) */} |
19 | | - <div className="absolute top-0 left-0 p-5 hidden md:block"> |
20 | | - <Header text="trsctr.github.io" textSize="text-2xl" className="tracking-widest font-mono z-20" hasGradient /> |
21 | | - </div> |
22 | | - |
23 | | - |
24 | | - <div className="flex flex-col lg:flex-row items-center justify-center lg:justify-between w-full h-full relative"> |
25 | | - |
26 | | - {/* Textbox section */} |
27 | | - <div className="flex-1 p-5 z-30"> |
28 | | - <About title="Hello, my name is Otto" imageUrl="/assets/photo.jpg" imageOnRight> |
29 | | - <p className="mb-2">I'm an aspiring software developer with a background in audio engineering and tech support, passionate about creative coding.</p> |
30 | | - <p>I recently completed my core studies at <a href="http://hive.fi" className="text-primary hover:text-accent transition-all" target="_blank">Hive Helsinki</a>, where I gained hands-on experience in programming with C and C++. </p> |
31 | | - <p className="mt-2">I built this page so I could have some fun with React, Tailwind, and Three.js, and showcase my projects in the future.</p> |
32 | | - <p className="mt-2">Hope you like what you see! Feel free to interact with that mesh, check out my work and connect with me on LinkedIn or GitHub.</p> |
33 | | - <p className="mt-2">Photo by <a href="https://www.instagram.com/diego_j_videos_and_photography/" className="text-primary hover:text-accent transition-all" target="_blank">Diego James</a>.</p> |
34 | | - </About> |
35 | | - <ContactFormModal/> |
36 | | - </div> |
37 | | - |
38 | | - {/* 3D Mesh section */} |
39 | | - <div className="flex-1 p-5 flex justify-center -mt-20 lg:mt-0 z-0"> |
40 | | - <div className="relative min-w-[200px] w-full max-w-[800px] h-auto aspect-[1/1]"> |
41 | | - <MeshCanvas /> |
42 | | - </div> |
43 | | - </div> |
44 | | - </div> |
45 | | - </div> |
46 | | - |
47 | | - </div> |
48 | | - ); |
| 15 | + return ( |
| 16 | + <div className="w-full h-full bg-gradient-to-b from-background-top to-black"> |
| 17 | + {/* Main container with flex layout */} |
| 18 | + |
| 19 | + { /* Add animation: |
| 20 | + - Loading animation displayed while still loading |
| 21 | + - Fade-in animation for the entire page |
| 22 | + */} |
| 23 | + |
| 24 | + {/* Background canvas */} |
| 25 | + <div className=" top-0 left-0 w-full h-full fixed"> |
| 26 | + <BackgroundCanvas /> |
| 27 | + </div> |
| 28 | + |
| 29 | + <div className="min-h-screen flex flex-col lg:flex-row items-center justify-center w-full"> |
| 30 | + |
| 31 | + {/* Page url at top left of the page (visible on medium screens and up) */} |
| 32 | + <div className="absolute top-0 left-0 p-5 hidden md:block"> |
| 33 | + <Header text="trsctr.github.io" textSize="text-2xl" hasGradient className="tracking-widest font-mono z-20" /> |
| 34 | + </div> |
| 35 | + |
| 36 | + |
| 37 | + <div className="flex flex-col lg:flex-row items-center justify-center lg:justify-between w-full h-full relative"> |
| 38 | + |
| 39 | + {/* Textbox section */} |
| 40 | + <div className="flex-1 p-5 z-30"> |
| 41 | + <About/> |
| 42 | + <ContactFormModal/> |
| 43 | + </div> |
| 44 | + |
| 45 | + {/* 3D Mesh section */} |
| 46 | + <div className="flex-1 p-5 flex justify-center -mt-20 lg:mt-0 z-0"> |
| 47 | + <div className="relative min-w-[200px] w-full max-w-[800px] h-auto aspect-[1/1]"> |
| 48 | + <MeshCanvas /> |
| 49 | + </div> |
| 50 | + </div> |
| 51 | + </div> |
| 52 | + </div> |
| 53 | + |
| 54 | + </div> |
| 55 | + ); |
49 | 56 | }; |
50 | 57 |
|
51 | 58 | export default App; |
0 commit comments