-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage.tsx
232 lines (218 loc) · 8.68 KB
/
page.tsx
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
"use client"
import { useState, useEffect } from "react"
import { motion, AnimatePresence } from "framer-motion"
import Link from "next/link"
import { Battery, Zap, Globe } from "lucide-react"
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
export default function Page() {
const [selectedCity, setSelectedCity] = useState("london")
// const [isMenuOpen, setIsMenuOpen] = useState(false)
const [scrolled, setScrolled] = useState(false)
useEffect(() => {
const handleScroll = () => {
setScrolled(window.scrollY > 50)
}
window.addEventListener("scroll", handleScroll)
return () => window.removeEventListener("scroll", handleScroll)
}, [])
const cities = {
london: {
video: "/videos/london.mp4",
name: "London",
stations: "2,345",
availability: "94%",
},
newyork: {
video: "/videos/newyork.mp4",
name: "New York",
stations: "3,122",
availability: "92%",
},
losangeles: {
video: "/videos/losangeles.mp4",
name: "Los Angeles",
stations: "2,788",
availability: "89%",
},
hongkong: {
video: "/videos/hongkong.mp4",
name: "Hong Kong",
stations: "1,955",
availability: "95%",
},
singapore: {
video: "/videos/singapore.mp4",
name: "Singapore",
stations: "1,677",
availability: "97%",
},
}
return (
<div className="relative min-h-screen bg-black text-white overflow-hidden">
<AnimatePresence mode="wait">
<motion.video
key={selectedCity}
initial={{ opacity: 0 }}
animate={{ opacity: 0.6 }}
exit={{ opacity: 0 }}
transition={{ duration: 1 }}
className="absolute top-0 left-0 w-full h-full object-cover"
autoPlay
muted
loop
playsInline
>
<source src={cities[selectedCity as keyof typeof cities].video} type="video/mp4" />
</motion.video>
</AnimatePresence>
{/* Gradient Overlay */}
<div className="absolute inset-0 bg-gradient-to-b from-black/40 via-black/20 to-black/60" />
<div className="relative z-10">
<nav
className={`fixed w-full transition-all duration-300 ${
scrolled ? "bg-black/80 backdrop-blur-md" : "bg-transparent"
}`}
>
<div className="max-w-7xl mx-auto px-6">
<div className="flex items-center justify-between h-16">
<Link
href="/"
className="text-xl font-bold tracking-tighter hover:text-primary transition-colors flex items-center gap-2"
>
<Zap className="w-6 h-6" />
Faraday Intelligent
</Link>
<div className="hidden md:flex items-center space-x-8">
<Link href="/" className="hover:text-primary transition-colors">
Home
</Link>
<Link href="/technology" className="hover:text-primary transition-colors">
Technology
</Link>
<Link href="/map" className="hover:text-primary transition-colors">
Map
</Link>
<Link href="/contact" className="hover:text-primary transition-colors">
Contact
</Link>
</div>
<Select defaultValue={selectedCity} onValueChange={setSelectedCity}>
<SelectTrigger className="w-[180px] bg-black/20 border-none text-white">
<SelectValue placeholder="Select city" />
</SelectTrigger>
<SelectContent>
<SelectItem value="london">London</SelectItem>
<SelectItem value="newyork">New York</SelectItem>
<SelectItem value="losangeles">Los Angeles</SelectItem>
<SelectItem value="hongkong">Hong Kong</SelectItem>
<SelectItem value="singapore">Singapore</SelectItem>
</SelectContent>
</Select>
</div>
</div>
</nav>
<main className="min-h-screen">
{/* Hero Section */}
<div className="pt-32 pb-20 px-6">
<div className="max-w-7xl mx-auto">
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ delay: 0.2 }}
className="max-w-3xl"
>
<h1 className="text-5xl md:text-7xl font-bold mb-6 leading-tight">
The Future of
<span className="text-primary block">Urban Charging</span>
</h1>
<p className="text-xl text-gray-300 mb-8">
Powering sustainable mobility with smart charging infrastructure across global cities.
</p>
<div className="flex flex-wrap gap-4">
<Link
href="/technology"
className="bg-primary hover:bg-primary/90 text-white px-8 py-3 rounded-full font-medium transition-colors"
>
Explore Technology
</Link>
<Link
href="/map"
className="bg-white/10 hover:bg-white/20 text-white px-8 py-3 rounded-full font-medium transition-colors"
>
Find Stations
</Link>
</div>
</motion.div>
</div>
</div>
{/* Stats Section */}
<div className="bg-black/40 backdrop-blur-md py-20 px-6">
<div className="max-w-7xl mx-auto">
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ delay: 0.4 }}
className="grid grid-cols-1 md:grid-cols-3 gap-8"
>
<div className="p-6 rounded-2xl bg-white/5 backdrop-blur-sm">
<Battery className="w-8 h-8 text-primary mb-4" />
<h3 className="text-2xl font-bold mb-2">{cities[selectedCity as keyof typeof cities].stations}</h3>
<p className="text-gray-400">Active Charging Stations</p>
</div>
<div className="p-6 rounded-2xl bg-white/5 backdrop-blur-sm">
<Zap className="w-8 h-8 text-primary mb-4" />
<h3 className="text-2xl font-bold mb-2">
{cities[selectedCity as keyof typeof cities].availability}
</h3>
<p className="text-gray-400">Network Availability</p>
</div>
<div className="p-6 rounded-2xl bg-white/5 backdrop-blur-sm">
<Globe className="w-8 h-8 text-primary mb-4" />
<h3 className="text-2xl font-bold mb-2">24/7</h3>
<p className="text-gray-400">Real-time Monitoring</p>
</div>
</motion.div>
</div>
</div>
{/* Features Grid */}
<div className="py-20 px-6">
<div className="max-w-7xl mx-auto">
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ delay: 0.6 }}
className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"
>
{[
{
title: "Smart Charging",
description: "AI-powered load balancing and optimization for efficient energy distribution.",
},
{
title: "Mobile Integration",
description: "Seamless app experience for finding, booking, and managing charging sessions.",
},
{
title: "Green Energy",
description: "100% renewable energy sources powering our charging network.",
},
].map((feature, index) => (
<motion.div
key={index}
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ delay: 0.8 + index * 0.1 }}
className="p-6 rounded-2xl bg-white/5 backdrop-blur-sm border border-white/10 hover:border-primary/50 transition-colors"
>
<h3 className="text-xl font-bold mb-3">{feature.title}</h3>
<p className="text-gray-400">{feature.description}</p>
</motion.div>
))}
</motion.div>
</div>
</div>
</main>
</div>
</div>
)
}