|
1 | | -import React, { useState } from 'react'; |
2 | | -import { Shield, MessageSquare, Users, Zap, Copy, CheckCircle2, ExternalLink } from 'lucide-react'; |
| 1 | +import React from 'react'; |
| 2 | +import ParticleField from './landing/ParticleField'; |
| 3 | +import HeroSection from './landing/HeroSection'; |
| 4 | +import ActionSection from './landing/ActionSection'; |
| 5 | +import HowItWorksSection from './landing/HowItWorksSection'; |
| 6 | +import FeaturesSection from './landing/FeaturesSection'; |
3 | 7 |
|
4 | 8 | interface LandingProps { |
5 | 9 | onCreateRoom: () => void; |
6 | 10 | onJoinRoom: (roomId: string) => void; |
7 | 11 | } |
8 | 12 |
|
9 | 13 | export default function Landing({ onCreateRoom, onJoinRoom }: LandingProps) { |
10 | | - const [joinRoomId, setJoinRoomId] = useState(''); |
11 | | - const [isJoining, setIsJoining] = useState(false); |
12 | | - |
13 | | - const handleJoinRoom = () => { |
14 | | - if (joinRoomId.trim()) { |
15 | | - setIsJoining(true); |
16 | | - setTimeout(() => { |
17 | | - onJoinRoom(joinRoomId.trim()); |
18 | | - setIsJoining(false); |
19 | | - }, 1000); |
20 | | - } |
21 | | - }; |
22 | | - |
23 | | - const features = [ |
24 | | - { |
25 | | - icon: Shield, |
26 | | - title: 'End-to-End Encryption', |
27 | | - description: 'Military-grade encryption ensures your conversations remain private' |
28 | | - }, |
29 | | - { |
30 | | - icon: Zap, |
31 | | - title: 'Self-Destruct Messages', |
32 | | - description: 'Rooms automatically destroy when all participants leave' |
33 | | - }, |
34 | | - { |
35 | | - icon: Users, |
36 | | - title: 'Zero Knowledge', |
37 | | - description: 'No registration required, no data stored on servers' |
38 | | - }, |
39 | | - { |
40 | | - icon: MessageSquare, |
41 | | - title: 'Rich Communication', |
42 | | - description: 'Text, voice, video calls, and file sharing in one platform' |
43 | | - } |
44 | | - ]; |
45 | | - |
46 | 14 | return ( |
47 | | - <div className="min-h-screen bg-gradient-to-br from-slate-900 via-purple-900 to-slate-900"> |
48 | | - <div className="absolute inset-0 bg-black/20"></div> |
49 | | - |
50 | | - {/* Background Pattern */} |
51 | | - <div className="absolute inset-0 opacity-10"> |
52 | | - <div className="absolute inset-0" style={{ |
53 | | - backgroundImage: `radial-gradient(circle at 25% 25%, #3B82F6 0%, transparent 50%), |
54 | | - radial-gradient(circle at 75% 75%, #10B981 0%, transparent 50%)` |
55 | | - }}></div> |
| 15 | + <div className="min-h-screen bg-[#030d1a] text-white overflow-x-hidden"> |
| 16 | + <ParticleField /> |
| 17 | + |
| 18 | + <div className="absolute inset-0 pointer-events-none overflow-hidden"> |
| 19 | + <div className="absolute top-0 left-1/2 -translate-x-1/2 w-[800px] h-[600px] rounded-full bg-sky-500/5 blur-[120px]" /> |
| 20 | + <div className="absolute bottom-0 right-0 w-[500px] h-[500px] rounded-full bg-emerald-500/4 blur-[100px]" /> |
56 | 21 | </div> |
57 | 22 |
|
58 | | - <div className="relative z-10 container mx-auto px-4 py-12"> |
59 | | - {/* Header */} |
60 | | - <div className="text-center mb-16"> |
61 | | - <div className="flex items-center justify-center mb-6"> |
62 | | - <div className="p-3 bg-blue-500/20 rounded-full backdrop-blur-sm border border-blue-500/30"> |
63 | | - <Shield className="w-8 h-8 text-blue-400" /> |
64 | | - </div> |
65 | | - </div> |
66 | | - <h1 className="text-5xl lg:text-6xl font-bold text-white mb-6 leading-tight"> |
67 | | - SecureComm |
68 | | - <span className="bg-gradient-to-r from-blue-400 to-emerald-400 bg-clip-text text-transparent"> |
69 | | - {' '}Chat |
70 | | - </span> |
71 | | - </h1> |
72 | | - <p className="text-xl text-slate-300 max-w-2xl mx-auto leading-relaxed"> |
73 | | - End-to-end encrypted communication platform for sensitive conversations. |
74 | | - Create secure rooms, share safely, communicate privately. |
75 | | - </p> |
| 23 | + <div className="relative z-10"> |
| 24 | + <HeroSection /> |
| 25 | + |
| 26 | + <div className="w-full max-w-5xl mx-auto px-4"> |
| 27 | + <div className="h-px bg-gradient-to-r from-transparent via-sky-400/20 to-transparent" /> |
76 | 28 | </div> |
77 | 29 |
|
78 | | - {/* Action Cards */} |
79 | | - <div className="max-w-4xl mx-auto mb-20"> |
80 | | - <div className="grid md:grid-cols-2 gap-8"> |
81 | | - {/* Create Room Card */} |
82 | | - <div className="group"> |
83 | | - <div className="bg-white/10 backdrop-blur-md rounded-2xl p-8 border border-white/20 hover:border-blue-400/50 transition-all duration-300 hover:transform hover:scale-105"> |
84 | | - <div className="text-center"> |
85 | | - <div className="inline-flex items-center justify-center w-16 h-16 bg-blue-500/20 rounded-full mb-6 group-hover:bg-blue-500/30 transition-colors"> |
86 | | - <Users className="w-8 h-8 text-blue-400" /> |
87 | | - </div> |
88 | | - <h3 className="text-2xl font-semibold text-white mb-4">Create New Room</h3> |
89 | | - <p className="text-slate-300 mb-8"> |
90 | | - Start a secure conversation and invite others with a shareable link |
91 | | - </p> |
92 | | - <button |
93 | | - onClick={onCreateRoom} |
94 | | - className="w-full bg-gradient-to-r from-blue-500 to-blue-600 text-white py-4 px-8 rounded-xl font-semibold hover:from-blue-600 hover:to-blue-700 transition-all duration-200 flex items-center justify-center space-x-2 shadow-lg hover:shadow-blue-500/25" |
95 | | - > |
96 | | - <Users className="w-5 h-5" /> |
97 | | - <span>Create Secure Room</span> |
98 | | - </button> |
99 | | - </div> |
100 | | - </div> |
101 | | - </div> |
| 30 | + <ActionSection onCreateRoom={onCreateRoom} onJoinRoom={onJoinRoom} /> |
102 | 31 |
|
103 | | - {/* Join Room Card */} |
104 | | - <div className="group"> |
105 | | - <div className="bg-white/10 backdrop-blur-md rounded-2xl p-8 border border-white/20 hover:border-emerald-400/50 transition-all duration-300 hover:transform hover:scale-105"> |
106 | | - <div className="text-center"> |
107 | | - <div className="inline-flex items-center justify-center w-16 h-16 bg-emerald-500/20 rounded-full mb-6 group-hover:bg-emerald-500/30 transition-colors"> |
108 | | - <MessageSquare className="w-8 h-8 text-emerald-400" /> |
109 | | - </div> |
110 | | - <h3 className="text-2xl font-semibold text-white mb-4">Join Room</h3> |
111 | | - <p className="text-slate-300 mb-6"> |
112 | | - Enter a room ID to join an existing secure conversation |
113 | | - </p> |
114 | | - <div className="space-y-4"> |
115 | | - <input |
116 | | - type="text" |
117 | | - placeholder="Enter Room ID (e.g., ABC123XYZ)" |
118 | | - value={joinRoomId} |
119 | | - onChange={(e) => setJoinRoomId(e.target.value.toUpperCase())} |
120 | | - className="w-full bg-white/10 border border-white/20 rounded-xl px-4 py-3 text-white placeholder-slate-400 focus:outline-none focus:border-emerald-400 focus:ring-2 focus:ring-emerald-400/20 transition-all" |
121 | | - onKeyPress={(e) => e.key === 'Enter' && handleJoinRoom()} |
122 | | - maxLength={10} |
123 | | - /> |
124 | | - <button |
125 | | - onClick={handleJoinRoom} |
126 | | - disabled={!joinRoomId.trim() || isJoining} |
127 | | - className="w-full bg-gradient-to-r from-emerald-500 to-emerald-600 text-white py-4 px-8 rounded-xl font-semibold hover:from-emerald-600 hover:to-emerald-700 transition-all duration-200 flex items-center justify-center space-x-2 shadow-lg hover:shadow-emerald-500/25 disabled:opacity-50 disabled:cursor-not-allowed" |
128 | | - > |
129 | | - {isJoining ? ( |
130 | | - <div className="w-5 h-5 border-2 border-white/30 border-t-white rounded-full animate-spin" /> |
131 | | - ) : ( |
132 | | - <MessageSquare className="w-5 h-5" /> |
133 | | - )} |
134 | | - <span>{isJoining ? 'Joining...' : 'Join Room'}</span> |
135 | | - </button> |
136 | | - </div> |
137 | | - </div> |
138 | | - </div> |
139 | | - </div> |
140 | | - </div> |
| 32 | + <div className="w-full max-w-5xl mx-auto px-4"> |
| 33 | + <div className="h-px bg-gradient-to-r from-transparent via-white/5 to-transparent" /> |
141 | 34 | </div> |
142 | 35 |
|
143 | | - {/* How it Works Section */} |
144 | | - <div className="max-w-4xl mx-auto mb-20"> |
145 | | - <h2 className="text-3xl font-bold text-white text-center mb-12"> |
146 | | - How It Works |
147 | | - </h2> |
148 | | - <div className="grid md:grid-cols-3 gap-8"> |
149 | | - <div className="text-center"> |
150 | | - <div className="inline-flex items-center justify-center w-12 h-12 bg-blue-500/20 rounded-full mb-4"> |
151 | | - <span className="text-blue-400 font-bold">1</span> |
152 | | - </div> |
153 | | - <h3 className="text-lg font-semibold text-white mb-2">Create Room</h3> |
154 | | - <p className="text-slate-400 text-sm">Generate a secure room with unique ID</p> |
155 | | - </div> |
156 | | - <div className="text-center"> |
157 | | - <div className="inline-flex items-center justify-center w-12 h-12 bg-emerald-500/20 rounded-full mb-4"> |
158 | | - <span className="text-emerald-400 font-bold">2</span> |
159 | | - </div> |
160 | | - <h3 className="text-lg font-semibold text-white mb-2">Share Link</h3> |
161 | | - <p className="text-slate-400 text-sm">Send the room link to your contact</p> |
162 | | - </div> |
163 | | - <div className="text-center"> |
164 | | - <div className="inline-flex items-center justify-center w-12 h-12 bg-purple-500/20 rounded-full mb-4"> |
165 | | - <span className="text-purple-400 font-bold">3</span> |
166 | | - </div> |
167 | | - <h3 className="text-lg font-semibold text-white mb-2">Chat Securely</h3> |
168 | | - <p className="text-slate-400 text-sm">Communicate with end-to-end encryption</p> |
169 | | - </div> |
170 | | - </div> |
171 | | - </div> |
| 36 | + <HowItWorksSection /> |
172 | 37 |
|
173 | | - {/* Features Grid */} |
174 | | - <div className="max-w-6xl mx-auto"> |
175 | | - <h2 className="text-3xl font-bold text-white text-center mb-12"> |
176 | | - Military-Grade Security Features |
177 | | - </h2> |
178 | | - <div className="grid md:grid-cols-2 lg:grid-cols-4 gap-8"> |
179 | | - {features.map((feature, index) => ( |
180 | | - <div key={index} className="text-center group"> |
181 | | - <div className="bg-white/5 backdrop-blur-sm rounded-2xl p-6 border border-white/10 hover:border-white/20 transition-all duration-300 hover:transform hover:-translate-y-2"> |
182 | | - <div className="inline-flex items-center justify-center w-12 h-12 bg-gradient-to-br from-blue-500/20 to-emerald-500/20 rounded-xl mb-4 group-hover:scale-110 transition-transform"> |
183 | | - <feature.icon className="w-6 h-6 text-blue-400" /> |
184 | | - </div> |
185 | | - <h3 className="text-lg font-semibold text-white mb-3">{feature.title}</h3> |
186 | | - <p className="text-slate-400 text-sm leading-relaxed">{feature.description}</p> |
187 | | - </div> |
188 | | - </div> |
189 | | - ))} |
190 | | - </div> |
| 38 | + <div className="w-full max-w-5xl mx-auto px-4"> |
| 39 | + <div className="h-px bg-gradient-to-r from-transparent via-white/5 to-transparent" /> |
191 | 40 | </div> |
192 | 41 |
|
193 | | - {/* Footer */} |
194 | | - <div className="text-center mt-20 pt-8 border-t border-white/10"> |
195 | | - <p className="text-slate-400"> |
196 | | - No registration required • Zero data retention • Open source security |
| 42 | + <FeaturesSection /> |
| 43 | + |
| 44 | + <footer className="py-12 px-4 text-center border-t border-white/5"> |
| 45 | + <p className="text-slate-600 text-sm"> |
| 46 | + No registration • Zero data retention • Open source security |
197 | 47 | </p> |
198 | | - </div> |
| 48 | + </footer> |
199 | 49 | </div> |
200 | 50 | </div> |
201 | 51 | ); |
|
0 commit comments