|
1 | 1 | import { auth } from "@clerk/nextjs/server"; |
2 | | -import { Cloud, Shield, Users, Zap } from "lucide-react"; |
3 | | -import Link from "next/link"; |
4 | 2 | import { redirect } from "next/navigation"; |
5 | 3 |
|
6 | 4 | import { Button } from "~/components/ui/button"; |
7 | 5 |
|
8 | 6 | export default function HomePage() { |
9 | 7 | return ( |
10 | | - <div className="min-h-screen bg-gradient-to-br from-black via-gray-900 to-gray-800 text-white"> |
11 | | - {/* Navigation */} |
12 | | - <nav className="mx-auto flex max-w-7xl items-center justify-between p-6"> |
13 | | - <div className="flex items-center space-x-2"> |
14 | | - <Cloud className="h-8 w-8 text-white" /> |
15 | | - <span className="text-2xl font-bold">T4S Drive</span> |
16 | | - </div> |
17 | | - <div className="hidden items-center space-x-8 md:flex"> |
18 | | - <Link |
19 | | - href="#features" |
20 | | - className="text-gray-300 transition-colors hover:text-white" |
21 | | - > |
22 | | - Features |
23 | | - </Link> |
24 | | - <Link |
25 | | - href="#pricing" |
26 | | - className="text-gray-300 transition-colors hover:text-white" |
27 | | - > |
28 | | - Pricing |
29 | | - </Link> |
30 | | - <Link |
31 | | - href="#contact" |
32 | | - className="text-gray-300 transition-colors hover:text-white" |
33 | | - > |
34 | | - Contact |
35 | | - </Link> |
36 | | - </div> |
37 | | - </nav> |
38 | | - |
39 | | - {/* Hero Section */} |
40 | | - <main className="mx-auto flex max-w-4xl flex-col items-center justify-center px-6 py-20 text-center"> |
41 | | - <div className="space-y-8"> |
42 | | - <h1 className="text-5xl font-bold tracking-tight md:text-7xl"> |
43 | | - Your files, |
44 | | - <br /> |
45 | | - <span className="bg-gradient-to-r from-gray-400 to-gray-200 bg-clip-text text-transparent"> |
46 | | - everywhere |
47 | | - </span> |
48 | | - </h1> |
49 | | - |
50 | | - <p className="mx-auto max-w-2xl text-xl leading-relaxed text-gray-300 md:text-2xl"> |
51 | | - Store, sync, and share your files with T4S Drive. Access your |
52 | | - documents from any device, anywhere in the world. |
53 | | - </p> |
54 | | - |
55 | | - <form |
56 | | - className="pt-8" |
57 | | - action={async () => { |
58 | | - "use server"; |
59 | | - const session = await auth(); |
60 | | - if (!session.userId) return redirect("/sign-in"); |
61 | | - redirect("/drive"); |
62 | | - }} |
63 | | - > |
64 | | - <Button |
65 | | - size="lg" |
66 | | - className="cursor-pointer rounded-full bg-white px-8 py-6 text-lg font-semibold text-black transition-all duration-200 hover:scale-105 hover:bg-gray-100" |
67 | | - type="submit" |
68 | | - > |
69 | | - Get Started |
70 | | - </Button> |
71 | | - </form> |
72 | | - |
73 | | - <p className="pt-4 text-sm text-gray-400"> |
74 | | - Free 15GB storage • No credit card required |
75 | | - </p> |
76 | | - </div> |
77 | | - </main> |
78 | | - |
79 | | - {/* Features Section */} |
80 | | - <section className="mx-auto max-w-6xl px-6 py-20"> |
81 | | - <div className="grid gap-8 md:grid-cols-3"> |
82 | | - <div className="space-y-4 text-center"> |
83 | | - <div className="mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-gray-800"> |
84 | | - <Shield className="h-8 w-8 text-gray-300" /> |
85 | | - </div> |
86 | | - <h3 className="text-xl font-semibold">Secure Storage</h3> |
87 | | - <p className="text-gray-400"> |
88 | | - Your files are encrypted and protected with enterprise-grade |
89 | | - security. |
90 | | - </p> |
91 | | - </div> |
92 | | - |
93 | | - <div className="space-y-4 text-center"> |
94 | | - <div className="mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-gray-800"> |
95 | | - <Zap className="h-8 w-8 text-gray-300" /> |
96 | | - </div> |
97 | | - <h3 className="text-xl font-semibold">Lightning Fast</h3> |
98 | | - <p className="text-gray-400"> |
99 | | - Upload and download files at blazing speeds with our global CDN. |
100 | | - </p> |
101 | | - </div> |
102 | | - |
103 | | - <div className="space-y-4 text-center"> |
104 | | - <div className="mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-gray-800"> |
105 | | - <Users className="h-8 w-8 text-gray-300" /> |
106 | | - </div> |
107 | | - <h3 className="text-xl font-semibold">Easy Sharing</h3> |
108 | | - <p className="text-gray-400"> |
109 | | - Share files and folders with anyone, with granular permission |
110 | | - controls. |
111 | | - </p> |
112 | | - </div> |
113 | | - </div> |
114 | | - </section> |
115 | | - |
116 | | - {/* Footer */} |
117 | | - <footer className="mt-20 border-t border-gray-800 px-6 py-8"> |
118 | | - <div className="mx-auto flex max-w-6xl flex-col items-center justify-between md:flex-row"> |
119 | | - <div className="mb-4 flex items-center space-x-2 md:mb-0"> |
120 | | - <Cloud className="h-6 w-6 text-gray-400" /> |
121 | | - <span className="text-gray-400"> |
122 | | - © 2024 T4S Drive. All rights reserved. |
123 | | - </span> |
124 | | - </div> |
125 | | - <div className="flex space-x-6"> |
126 | | - <Link |
127 | | - href="#" |
128 | | - className="text-gray-400 transition-colors hover:text-white" |
129 | | - > |
130 | | - Privacy |
131 | | - </Link> |
132 | | - <Link |
133 | | - href="#" |
134 | | - className="text-gray-400 transition-colors hover:text-white" |
135 | | - > |
136 | | - Terms |
137 | | - </Link> |
138 | | - <Link |
139 | | - href="#" |
140 | | - className="text-gray-400 transition-colors hover:text-white" |
141 | | - > |
142 | | - Support |
143 | | - </Link> |
144 | | - </div> |
145 | | - </div> |
146 | | - </footer> |
147 | | - </div> |
| 8 | + <form |
| 9 | + action={async () => { |
| 10 | + "use server"; |
| 11 | + const session = await auth(); |
| 12 | + if (!session.userId) return redirect("/sign-in"); |
| 13 | + redirect("/drive"); |
| 14 | + }} |
| 15 | + > |
| 16 | + <Button |
| 17 | + size="lg" |
| 18 | + className="cursor-pointer rounded-full bg-white px-8 py-6 text-lg font-semibold text-black transition-all duration-200 hover:scale-105 hover:bg-gray-100" |
| 19 | + type="submit" |
| 20 | + > |
| 21 | + Get Started |
| 22 | + </Button> |
| 23 | + </form> |
148 | 24 | ); |
149 | 25 | } |
0 commit comments