Spaces:
Runtime error
Runtime error
Florin Bobiș
commited on
Commit
•
6a37227
1
Parent(s):
f3d88e5
cool landing
Browse files- package-lock.json +26 -0
- package.json +1 -0
- public/screenshot.jpg +0 -0
- src/app/layout.tsx +14 -11
- src/app/page.tsx +34 -189
- src/components/header.tsx +1 -1
- src/components/ui/container-scroll-animation.tsx +95 -0
package-lock.json
CHANGED
@@ -17,6 +17,7 @@
|
|
17 |
"@tsparticles/slim": "^3.5.0",
|
18 |
"class-variance-authority": "^0.7.0",
|
19 |
"clsx": "^2.1.1",
|
|
|
20 |
"lucide-react": "^0.445.0",
|
21 |
"next": "14.2.13",
|
22 |
"next-themes": "^0.3.0",
|
@@ -3334,6 +3335,31 @@
|
|
3334 |
"url": "https://github.com/sponsors/isaacs"
|
3335 |
}
|
3336 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3337 |
"node_modules/fs.realpath": {
|
3338 |
"version": "1.0.0",
|
3339 |
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
|
|
17 |
"@tsparticles/slim": "^3.5.0",
|
18 |
"class-variance-authority": "^0.7.0",
|
19 |
"clsx": "^2.1.1",
|
20 |
+
"framer-motion": "^11.5.6",
|
21 |
"lucide-react": "^0.445.0",
|
22 |
"next": "14.2.13",
|
23 |
"next-themes": "^0.3.0",
|
|
|
3335 |
"url": "https://github.com/sponsors/isaacs"
|
3336 |
}
|
3337 |
},
|
3338 |
+
"node_modules/framer-motion": {
|
3339 |
+
"version": "11.5.6",
|
3340 |
+
"resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-11.5.6.tgz",
|
3341 |
+
"integrity": "sha512-JMwUpAxv/DWgul9vPgX0ElKn0G66sUc6O9tOXsYwn3zxwvhxFljSXC0XT2QCzuTYBshwC8nyDAa1SYcV0Ldbhw==",
|
3342 |
+
"license": "MIT",
|
3343 |
+
"dependencies": {
|
3344 |
+
"tslib": "^2.4.0"
|
3345 |
+
},
|
3346 |
+
"peerDependencies": {
|
3347 |
+
"@emotion/is-prop-valid": "*",
|
3348 |
+
"react": "^18.0.0",
|
3349 |
+
"react-dom": "^18.0.0"
|
3350 |
+
},
|
3351 |
+
"peerDependenciesMeta": {
|
3352 |
+
"@emotion/is-prop-valid": {
|
3353 |
+
"optional": true
|
3354 |
+
},
|
3355 |
+
"react": {
|
3356 |
+
"optional": true
|
3357 |
+
},
|
3358 |
+
"react-dom": {
|
3359 |
+
"optional": true
|
3360 |
+
}
|
3361 |
+
}
|
3362 |
+
},
|
3363 |
"node_modules/fs.realpath": {
|
3364 |
"version": "1.0.0",
|
3365 |
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
package.json
CHANGED
@@ -18,6 +18,7 @@
|
|
18 |
"@tsparticles/slim": "^3.5.0",
|
19 |
"class-variance-authority": "^0.7.0",
|
20 |
"clsx": "^2.1.1",
|
|
|
21 |
"lucide-react": "^0.445.0",
|
22 |
"next": "14.2.13",
|
23 |
"next-themes": "^0.3.0",
|
|
|
18 |
"@tsparticles/slim": "^3.5.0",
|
19 |
"class-variance-authority": "^0.7.0",
|
20 |
"clsx": "^2.1.1",
|
21 |
+
"framer-motion": "^11.5.6",
|
22 |
"lucide-react": "^0.445.0",
|
23 |
"next": "14.2.13",
|
24 |
"next-themes": "^0.3.0",
|
public/screenshot.jpg
ADDED
src/app/layout.tsx
CHANGED
@@ -1,11 +1,17 @@
|
|
1 |
import type { Metadata } from "next";
|
2 |
-
import
|
3 |
import "./globals.css";
|
4 |
import { ThemeProvider } from "@/components/theme-provider";
|
5 |
|
6 |
-
const
|
7 |
-
|
8 |
-
variable: "--font-sans",
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
});
|
10 |
|
11 |
export const metadata: Metadata = {
|
@@ -20,13 +26,10 @@ export default function RootLayout({
|
|
20 |
}>) {
|
21 |
return (
|
22 |
<html lang="en" suppressHydrationWarning>
|
23 |
-
<body
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
enableSystem
|
28 |
-
storageKey="theme"
|
29 |
-
>
|
30 |
{children}
|
31 |
</ThemeProvider>
|
32 |
</body>
|
|
|
1 |
import type { Metadata } from "next";
|
2 |
+
import localFont from "next/font/local";
|
3 |
import "./globals.css";
|
4 |
import { ThemeProvider } from "@/components/theme-provider";
|
5 |
|
6 |
+
const geistSans = localFont({
|
7 |
+
src: "./fonts/GeistVF.woff",
|
8 |
+
variable: "--font-geist-sans",
|
9 |
+
weight: "100 900",
|
10 |
+
});
|
11 |
+
const geistMono = localFont({
|
12 |
+
src: "./fonts/GeistMonoVF.woff",
|
13 |
+
variable: "--font-geist-mono",
|
14 |
+
weight: "100 900",
|
15 |
});
|
16 |
|
17 |
export const metadata: Metadata = {
|
|
|
26 |
}>) {
|
27 |
return (
|
28 |
<html lang="en" suppressHydrationWarning>
|
29 |
+
<body
|
30 |
+
className={`${geistSans.variable} ${geistMono.variable} min-h-screen antialiased`}
|
31 |
+
>
|
32 |
+
<ThemeProvider attribute="class" defaultTheme="system" enableSystem storageKey="theme">
|
|
|
|
|
|
|
33 |
{children}
|
34 |
</ThemeProvider>
|
35 |
</body>
|
src/app/page.tsx
CHANGED
@@ -1,15 +1,17 @@
|
|
1 |
import Footer from "@/components/footer";
|
2 |
import Header from "@/components/header";
|
|
|
3 |
import { SparklesCore } from "@/components/ui/sparkles";
|
|
|
4 |
|
5 |
export default function Home() {
|
6 |
return (
|
7 |
<div className="flex min-h-screen w-full flex-col">
|
8 |
<Header />
|
9 |
-
<main className="flex min-h-[calc(100vh_-_theme(spacing.16))] flex-1 flex-col
|
10 |
-
<div className="h-
|
11 |
<h1 className="md:text-7xl text-3xl lg:text-9xl font-bold text-center text-white relative z-20">
|
12 |
-
|
13 |
</h1>
|
14 |
<div className="w-[40rem] h-40 relative">
|
15 |
{/* Gradients */}
|
@@ -28,196 +30,39 @@ export default function Home() {
|
|
28 |
particleColor="#FFFFFF"
|
29 |
/>
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
{/* Radial Gradient to prevent sharp edges */}
|
32 |
<div className="absolute inset-0 w-full h-full bg-black [mask-image:radial-gradient(350px_200px_at_top,transparent_20%,white)]"></div>
|
33 |
</div>
|
34 |
</div>
|
35 |
-
<
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
consectetur rem laborum earum? Laudantium, eaque. Laudantium iste,
|
59 |
-
cumque animi repellat enim voluptatibus quasi quas facilis atque.
|
60 |
-
Sapiente molestiae praesentium fuga illum, numquam id, vero
|
61 |
-
consequuntur, aut molestias magni veritatis dolores aperiam
|
62 |
-
reprehenderit reiciendis. Sunt saepe tempora, reiciendis quaerat
|
63 |
-
accusantium cumque recusandae quisquam numquam expedita iste, veniam
|
64 |
-
ullam ea sequi. Aliquam a rem facilis soluta sint nesciunt.
|
65 |
-
</p>
|
66 |
-
<p>
|
67 |
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Unde id
|
68 |
-
obcaecati minus explicabo, corporis delectus. Debitis ipsam
|
69 |
-
praesentium nam! Vero!
|
70 |
-
</p>
|
71 |
-
<p>
|
72 |
-
Lorem ipsum dolor sit amet consectetur, adipisicing elit.
|
73 |
-
Voluptatibus, temporibus mollitia. Eaque, magni tempore aliquam odit
|
74 |
-
libero expedita maxime unde obcaecati doloremque eveniet, rerum
|
75 |
-
laboriosam illum fugiat quas et vitae quo veritatis tempora. Officiis
|
76 |
-
non eaque pariatur ducimus nisi temporibus labore? Eum temporibus
|
77 |
-
officiis expedita. Eaque, explicabo numquam. Consequuntur nihil
|
78 |
-
eligendi libero asperiores! Rem, delectus cum molestiae eveniet harum
|
79 |
-
magni!
|
80 |
-
</p>
|
81 |
-
<p>
|
82 |
-
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Amet
|
83 |
-
blanditiis atque sint totam consequatur! Consectetur illo quas rem
|
84 |
-
iure enim totam ex quisquam libero dolorem, commodi voluptatem odit
|
85 |
-
mollitia repellendus similique nulla dicta maiores, amet, quia quod
|
86 |
-
molestias! In officia ut exercitationem! Ut, maiores. Consequuntur
|
87 |
-
eligendi exercitationem laudantium placeat fuga qui, aliquid quod amet
|
88 |
-
facilis vel voluptatem quis maiores minima ut, harum corrupti
|
89 |
-
consectetur rem laborum earum? Laudantium, eaque. Laudantium iste,
|
90 |
-
cumque animi repellat enim voluptatibus quasi quas facilis atque.
|
91 |
-
Sapiente molestiae praesentium fuga illum, numquam id, vero
|
92 |
-
consequuntur, aut molestias magni veritatis dolores aperiam
|
93 |
-
reprehenderit reiciendis. Sunt saepe tempora, reiciendis quaerat
|
94 |
-
accusantium cumque recusandae quisquam numquam expedita iste, veniam
|
95 |
-
ullam ea sequi. Aliquam a rem facilis soluta sint nesciunt.
|
96 |
-
</p>
|
97 |
-
<p>
|
98 |
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Unde id
|
99 |
-
obcaecati minus explicabo, corporis delectus. Debitis ipsam
|
100 |
-
praesentium nam! Vero!
|
101 |
-
</p>
|
102 |
-
<p>
|
103 |
-
Lorem ipsum dolor sit amet consectetur, adipisicing elit.
|
104 |
-
Voluptatibus, temporibus mollitia. Eaque, magni tempore aliquam odit
|
105 |
-
libero expedita maxime unde obcaecati doloremque eveniet, rerum
|
106 |
-
laboriosam illum fugiat quas et vitae quo veritatis tempora. Officiis
|
107 |
-
non eaque pariatur ducimus nisi temporibus labore? Eum temporibus
|
108 |
-
officiis expedita. Eaque, explicabo numquam. Consequuntur nihil
|
109 |
-
eligendi libero asperiores! Rem, delectus cum molestiae eveniet harum
|
110 |
-
magni!
|
111 |
-
</p>
|
112 |
-
<p>
|
113 |
-
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Amet
|
114 |
-
blanditiis atque sint totam consequatur! Consectetur illo quas rem
|
115 |
-
iure enim totam ex quisquam libero dolorem, commodi voluptatem odit
|
116 |
-
mollitia repellendus similique nulla dicta maiores, amet, quia quod
|
117 |
-
molestias! In officia ut exercitationem! Ut, maiores. Consequuntur
|
118 |
-
eligendi exercitationem laudantium placeat fuga qui, aliquid quod amet
|
119 |
-
facilis vel voluptatem quis maiores minima ut, harum corrupti
|
120 |
-
consectetur rem laborum earum? Laudantium, eaque. Laudantium iste,
|
121 |
-
cumque animi repellat enim voluptatibus quasi quas facilis atque.
|
122 |
-
Sapiente molestiae praesentium fuga illum, numquam id, vero
|
123 |
-
consequuntur, aut molestias magni veritatis dolores aperiam
|
124 |
-
reprehenderit reiciendis. Sunt saepe tempora, reiciendis quaerat
|
125 |
-
accusantium cumque recusandae quisquam numquam expedita iste, veniam
|
126 |
-
ullam ea sequi. Aliquam a rem facilis soluta sint nesciunt.
|
127 |
-
</p>
|
128 |
-
<p>
|
129 |
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Unde id
|
130 |
-
obcaecati minus explicabo, corporis delectus. Debitis ipsam
|
131 |
-
praesentium nam! Vero!
|
132 |
-
</p>
|
133 |
-
<p>
|
134 |
-
Lorem ipsum dolor sit amet consectetur, adipisicing elit.
|
135 |
-
Voluptatibus, temporibus mollitia. Eaque, magni tempore aliquam odit
|
136 |
-
libero expedita maxime unde obcaecati doloremque eveniet, rerum
|
137 |
-
laboriosam illum fugiat quas et vitae quo veritatis tempora. Officiis
|
138 |
-
non eaque pariatur ducimus nisi temporibus labore? Eum temporibus
|
139 |
-
officiis expedita. Eaque, explicabo numquam. Consequuntur nihil
|
140 |
-
eligendi libero asperiores! Rem, delectus cum molestiae eveniet harum
|
141 |
-
magni!
|
142 |
-
</p>
|
143 |
-
<p>
|
144 |
-
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Amet
|
145 |
-
blanditiis atque sint totam consequatur! Consectetur illo quas rem
|
146 |
-
iure enim totam ex quisquam libero dolorem, commodi voluptatem odit
|
147 |
-
mollitia repellendus similique nulla dicta maiores, amet, quia quod
|
148 |
-
molestias! In officia ut exercitationem! Ut, maiores. Consequuntur
|
149 |
-
eligendi exercitationem laudantium placeat fuga qui, aliquid quod amet
|
150 |
-
facilis vel voluptatem quis maiores minima ut, harum corrupti
|
151 |
-
consectetur rem laborum earum? Laudantium, eaque. Laudantium iste,
|
152 |
-
cumque animi repellat enim voluptatibus quasi quas facilis atque.
|
153 |
-
Sapiente molestiae praesentium fuga illum, numquam id, vero
|
154 |
-
consequuntur, aut molestias magni veritatis dolores aperiam
|
155 |
-
reprehenderit reiciendis. Sunt saepe tempora, reiciendis quaerat
|
156 |
-
accusantium cumque recusandae quisquam numquam expedita iste, veniam
|
157 |
-
ullam ea sequi. Aliquam a rem facilis soluta sint nesciunt.
|
158 |
-
</p>
|
159 |
-
<p>
|
160 |
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Unde id
|
161 |
-
obcaecati minus explicabo, corporis delectus. Debitis ipsam
|
162 |
-
praesentium nam! Vero!
|
163 |
-
</p>
|
164 |
-
<p>
|
165 |
-
Lorem ipsum dolor sit amet consectetur, adipisicing elit.
|
166 |
-
Voluptatibus, temporibus mollitia. Eaque, magni tempore aliquam odit
|
167 |
-
libero expedita maxime unde obcaecati doloremque eveniet, rerum
|
168 |
-
laboriosam illum fugiat quas et vitae quo veritatis tempora. Officiis
|
169 |
-
non eaque pariatur ducimus nisi temporibus labore? Eum temporibus
|
170 |
-
officiis expedita. Eaque, explicabo numquam. Consequuntur nihil
|
171 |
-
eligendi libero asperiores! Rem, delectus cum molestiae eveniet harum
|
172 |
-
magni!
|
173 |
-
</p>
|
174 |
-
<p>
|
175 |
-
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Amet
|
176 |
-
blanditiis atque sint totam consequatur! Consectetur illo quas rem
|
177 |
-
iure enim totam ex quisquam libero dolorem, commodi voluptatem odit
|
178 |
-
mollitia repellendus similique nulla dicta maiores, amet, quia quod
|
179 |
-
molestias! In officia ut exercitationem! Ut, maiores. Consequuntur
|
180 |
-
eligendi exercitationem laudantium placeat fuga qui, aliquid quod amet
|
181 |
-
facilis vel voluptatem quis maiores minima ut, harum corrupti
|
182 |
-
consectetur rem laborum earum? Laudantium, eaque. Laudantium iste,
|
183 |
-
cumque animi repellat enim voluptatibus quasi quas facilis atque.
|
184 |
-
Sapiente molestiae praesentium fuga illum, numquam id, vero
|
185 |
-
consequuntur, aut molestias magni veritatis dolores aperiam
|
186 |
-
reprehenderit reiciendis. Sunt saepe tempora, reiciendis quaerat
|
187 |
-
accusantium cumque recusandae quisquam numquam expedita iste, veniam
|
188 |
-
ullam ea sequi. Aliquam a rem facilis soluta sint nesciunt.
|
189 |
-
</p>
|
190 |
-
<p>
|
191 |
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Unde id
|
192 |
-
obcaecati minus explicabo, corporis delectus. Debitis ipsam
|
193 |
-
praesentium nam! Vero!
|
194 |
-
</p>
|
195 |
-
<p>
|
196 |
-
Lorem ipsum dolor sit amet consectetur, adipisicing elit.
|
197 |
-
Voluptatibus, temporibus mollitia. Eaque, magni tempore aliquam odit
|
198 |
-
libero expedita maxime unde obcaecati doloremque eveniet, rerum
|
199 |
-
laboriosam illum fugiat quas et vitae quo veritatis tempora. Officiis
|
200 |
-
non eaque pariatur ducimus nisi temporibus labore? Eum temporibus
|
201 |
-
officiis expedita. Eaque, explicabo numquam. Consequuntur nihil
|
202 |
-
eligendi libero asperiores! Rem, delectus cum molestiae eveniet harum
|
203 |
-
magni!
|
204 |
-
</p>
|
205 |
-
<p>
|
206 |
-
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Amet
|
207 |
-
blanditiis atque sint totam consequatur! Consectetur illo quas rem
|
208 |
-
iure enim totam ex quisquam libero dolorem, commodi voluptatem odit
|
209 |
-
mollitia repellendus similique nulla dicta maiores, amet, quia quod
|
210 |
-
molestias! In officia ut exercitationem! Ut, maiores. Consequuntur
|
211 |
-
eligendi exercitationem laudantium placeat fuga qui, aliquid quod amet
|
212 |
-
facilis vel voluptatem quis maiores minima ut, harum corrupti
|
213 |
-
consectetur rem laborum earum? Laudantium, eaque. Laudantium iste,
|
214 |
-
cumque animi repellat enim voluptatibus quasi quas facilis atque.
|
215 |
-
Sapiente molestiae praesentium fuga illum, numquam id, vero
|
216 |
-
consequuntur, aut molestias magni veritatis dolores aperiam
|
217 |
-
reprehenderit reiciendis. Sunt saepe tempora, reiciendis quaerat
|
218 |
-
accusantium cumque recusandae quisquam numquam expedita iste, veniam
|
219 |
-
ullam ea sequi. Aliquam a rem facilis soluta sint nesciunt.
|
220 |
-
</p>
|
221 |
</main>
|
222 |
<Footer />
|
223 |
</div>
|
|
|
1 |
import Footer from "@/components/footer";
|
2 |
import Header from "@/components/header";
|
3 |
+
import { ContainerScroll } from "@/components/ui/container-scroll-animation";
|
4 |
import { SparklesCore } from "@/components/ui/sparkles";
|
5 |
+
import Image from "next/image";
|
6 |
|
7 |
export default function Home() {
|
8 |
return (
|
9 |
<div className="flex min-h-screen w-full flex-col">
|
10 |
<Header />
|
11 |
+
<main className="flex min-h-[calc(100vh_-_theme(spacing.16))] flex-1 flex-col">
|
12 |
+
<div className="h-screen w-full bg-black flex flex-col items-center justify-center overflow-hidden rounded-md">
|
13 |
<h1 className="md:text-7xl text-3xl lg:text-9xl font-bold text-center text-white relative z-20">
|
14 |
+
ATOM
|
15 |
</h1>
|
16 |
<div className="w-[40rem] h-40 relative">
|
17 |
{/* Gradients */}
|
|
|
30 |
particleColor="#FFFFFF"
|
31 |
/>
|
32 |
|
33 |
+
<h3 className="mt-[-9rem] pb-1 md:text-xl text-sm lg:text-3xl bg-clip-text text-transparent bg-gradient-to-b from-gray-800 to-gray-500 dark:from-neutral-200 dark:to-neutral-600 text-center font-sans font-bold relative z-20">
|
34 |
+
Your one-stop shop
|
35 |
+
<br />
|
36 |
+
for gravity-free design...
|
37 |
+
</h3>
|
38 |
+
|
39 |
{/* Radial Gradient to prevent sharp edges */}
|
40 |
<div className="absolute inset-0 w-full h-full bg-black [mask-image:radial-gradient(350px_200px_at_top,transparent_20%,white)]"></div>
|
41 |
</div>
|
42 |
</div>
|
43 |
+
<div className="flex flex-col overflow-hidden bg-black">
|
44 |
+
<ContainerScroll
|
45 |
+
titleComponent={
|
46 |
+
<>
|
47 |
+
<h1 className="text-4xl font-semibold text-black dark:text-white">
|
48 |
+
Discover the power of <br />
|
49 |
+
<span className="text-4xl md:text-[6rem] font-bold mt-1 leading-none">
|
50 |
+
Microgravity
|
51 |
+
</span>
|
52 |
+
</h1>
|
53 |
+
</>
|
54 |
+
}
|
55 |
+
>
|
56 |
+
<Image
|
57 |
+
src={`/screenshot.jpg`}
|
58 |
+
alt="hero"
|
59 |
+
height={720}
|
60 |
+
width={1400}
|
61 |
+
className="mx-auto rounded-2xl object-cover h-full object-left-top"
|
62 |
+
draggable={false}
|
63 |
+
/>
|
64 |
+
</ContainerScroll>
|
65 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
</main>
|
67 |
<Footer />
|
68 |
</div>
|
src/components/header.tsx
CHANGED
@@ -6,7 +6,7 @@ import { Button } from "./ui/button";
|
|
6 |
|
7 |
const Header = () => {
|
8 |
return (
|
9 |
-
<header className="sticky top-0 flex h-16 items-center gap-4 bg-background/30 backdrop-blur px-4 md:px-6">
|
10 |
<Navbar />
|
11 |
<Sidebar />
|
12 |
<div className="flex w-full md:w-auto justify-end gap-4 md:ml-auto md:gap-2 lg:gap-4">
|
|
|
6 |
|
7 |
const Header = () => {
|
8 |
return (
|
9 |
+
<header className="sticky top-0 flex h-16 items-center gap-4 bg-background/30 backdrop-blur px-4 md:px-6 z-30">
|
10 |
<Navbar />
|
11 |
<Sidebar />
|
12 |
<div className="flex w-full md:w-auto justify-end gap-4 md:ml-auto md:gap-2 lg:gap-4">
|
src/components/ui/container-scroll-animation.tsx
ADDED
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use client";
|
2 |
+
import React, { useRef } from "react";
|
3 |
+
import { useScroll, useTransform, motion, MotionValue } from "framer-motion";
|
4 |
+
|
5 |
+
export const ContainerScroll = ({
|
6 |
+
titleComponent,
|
7 |
+
children,
|
8 |
+
}: {
|
9 |
+
titleComponent: string | React.ReactNode;
|
10 |
+
children: React.ReactNode;
|
11 |
+
}) => {
|
12 |
+
const containerRef = useRef<any>(null);
|
13 |
+
const { scrollYProgress } = useScroll({
|
14 |
+
target: containerRef,
|
15 |
+
});
|
16 |
+
const [isMobile, setIsMobile] = React.useState(false);
|
17 |
+
|
18 |
+
React.useEffect(() => {
|
19 |
+
const checkMobile = () => {
|
20 |
+
setIsMobile(window.innerWidth <= 768);
|
21 |
+
};
|
22 |
+
checkMobile();
|
23 |
+
window.addEventListener("resize", checkMobile);
|
24 |
+
return () => {
|
25 |
+
window.removeEventListener("resize", checkMobile);
|
26 |
+
};
|
27 |
+
}, []);
|
28 |
+
|
29 |
+
const scaleDimensions = () => {
|
30 |
+
return isMobile ? [0.7, 0.9] : [1.05, 1];
|
31 |
+
};
|
32 |
+
|
33 |
+
const rotate = useTransform(scrollYProgress, [0, 1], [20, 0]);
|
34 |
+
const scale = useTransform(scrollYProgress, [0, 1], scaleDimensions());
|
35 |
+
const translate = useTransform(scrollYProgress, [0, 1], [0, -100]);
|
36 |
+
|
37 |
+
return (
|
38 |
+
<div
|
39 |
+
className="h-[60rem] md:h-[80rem] flex items-center justify-center relative p-2 md:p-20"
|
40 |
+
ref={containerRef}
|
41 |
+
>
|
42 |
+
<div
|
43 |
+
className="py-10 md:py-40 w-full relative"
|
44 |
+
style={{
|
45 |
+
perspective: "1000px",
|
46 |
+
}}
|
47 |
+
>
|
48 |
+
<Header translate={translate} titleComponent={titleComponent} />
|
49 |
+
<Card rotate={rotate} translate={translate} scale={scale}>
|
50 |
+
{children}
|
51 |
+
</Card>
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
);
|
55 |
+
};
|
56 |
+
|
57 |
+
export const Header = ({ translate, titleComponent }: any) => {
|
58 |
+
return (
|
59 |
+
<motion.div
|
60 |
+
style={{
|
61 |
+
translateY: translate,
|
62 |
+
}}
|
63 |
+
className="div max-w-5xl mx-auto text-center"
|
64 |
+
>
|
65 |
+
{titleComponent}
|
66 |
+
</motion.div>
|
67 |
+
);
|
68 |
+
};
|
69 |
+
|
70 |
+
export const Card = ({
|
71 |
+
rotate,
|
72 |
+
scale,
|
73 |
+
children,
|
74 |
+
}: {
|
75 |
+
rotate: MotionValue<number>;
|
76 |
+
scale: MotionValue<number>;
|
77 |
+
translate: MotionValue<number>;
|
78 |
+
children: React.ReactNode;
|
79 |
+
}) => {
|
80 |
+
return (
|
81 |
+
<motion.div
|
82 |
+
style={{
|
83 |
+
rotateX: rotate,
|
84 |
+
scale,
|
85 |
+
boxShadow:
|
86 |
+
"0 0 #0000004d, 0 9px 20px #0000004a, 0 37px 37px #00000042, 0 84px 50px #00000026, 0 149px 60px #0000000a, 0 233px 65px #00000003",
|
87 |
+
}}
|
88 |
+
className="max-w-5xl -mt-12 mx-auto h-[30rem] md:h-[40rem] w-full border-4 border-[#6C6C6C] p-2 md:p-6 bg-[#222222] rounded-[30px] shadow-2xl"
|
89 |
+
>
|
90 |
+
<div className=" h-full w-full overflow-hidden rounded-2xl bg-gray-100 dark:bg-zinc-900 md:rounded-2xl md:p-4 ">
|
91 |
+
{children}
|
92 |
+
</div>
|
93 |
+
</motion.div>
|
94 |
+
);
|
95 |
+
};
|