Site için geliştirmeler yapıldı.
This commit is contained in:
0
app/(public)/.gitkeep
Normal file
0
app/(public)/.gitkeep
Normal file
183
app/(public)/contact/page.tsx
Normal file
183
app/(public)/contact/page.tsx
Normal file
@@ -0,0 +1,183 @@
|
||||
"use client"
|
||||
|
||||
import { useState } from "react"
|
||||
import { useForm } from "react-hook-form"
|
||||
import { zodResolver } from "@hookform/resolvers/zod"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Input } from "@/components/ui/input"
|
||||
import { Textarea } from "@/components/ui/textarea"
|
||||
import { Card, CardContent } from "@/components/ui/card"
|
||||
import { Mail, MapPin, Phone, Loader2, CheckCircle } from "lucide-react"
|
||||
import { contactFormSchema, ContactFormValues } from "@/lib/schemas"
|
||||
import { submitContactForm } from "@/lib/actions/contact"
|
||||
import { toast } from "sonner"
|
||||
|
||||
export default function ContactPage() {
|
||||
const [isSubmitting, setIsSubmitting] = useState(false)
|
||||
const [isSuccess, setIsSuccess] = useState(false)
|
||||
|
||||
const form = useForm<ContactFormValues>({
|
||||
resolver: zodResolver(contactFormSchema),
|
||||
defaultValues: {
|
||||
name: "",
|
||||
surname: "",
|
||||
email: "",
|
||||
phone: "",
|
||||
subject: "",
|
||||
message: "",
|
||||
},
|
||||
})
|
||||
|
||||
async function onSubmit(data: ContactFormValues) {
|
||||
setIsSubmitting(true)
|
||||
try {
|
||||
const response = await submitContactForm(data)
|
||||
if (response.success) {
|
||||
setIsSuccess(true)
|
||||
form.reset()
|
||||
toast.success("Mesajınız başarıyla gönderildi.")
|
||||
} else {
|
||||
toast.error("Hata: " + response.error)
|
||||
}
|
||||
} catch (error) {
|
||||
toast.error("Bir hata oluştu.")
|
||||
} finally {
|
||||
setIsSubmitting(false)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="container py-12 md:py-24">
|
||||
<div className="text-center mb-12">
|
||||
<h1 className="text-4xl font-bold tracking-tight mb-4 font-outfit">İletişime Geçin</h1>
|
||||
<p className="text-muted-foreground max-w-xl mx-auto">
|
||||
Sorularınız, teklif talepleriniz veya teknik destek için bize ulaşın.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="grid md:grid-cols-2 gap-12 max-w-5xl mx-auto">
|
||||
<div className="space-y-8">
|
||||
<div className="space-y-6">
|
||||
<h2 className="text-2xl font-semibold">İletişim Bilgileri</h2>
|
||||
<div className="flex items-start space-x-4">
|
||||
<MapPin className="w-6 h-6 text-primary mt-1" />
|
||||
<div>
|
||||
<p className="font-medium">Merkez Ofis & Showroom</p>
|
||||
<p className="text-slate-600 dark:text-slate-400">
|
||||
Organize Sanayi Bölgesi, 12. Cadde No: 45<br />
|
||||
Başakşehir, İstanbul
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-center space-x-4">
|
||||
<Phone className="w-6 h-6 text-primary" />
|
||||
<div>
|
||||
<p className="font-medium">Telefon</p>
|
||||
<p className="text-slate-600 dark:text-slate-400">+90 (212) 555 00 00</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-center space-x-4">
|
||||
<Mail className="w-6 h-6 text-primary" />
|
||||
<div>
|
||||
<p className="font-medium">E-posta</p>
|
||||
<p className="text-slate-600 dark:text-slate-400">info@parakasa.com</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="aspect-video bg-slate-100 rounded-lg overflow-hidden relative">
|
||||
<div className="absolute inset-0 flex items-center justify-center text-muted-foreground">
|
||||
Harita (Google Maps Embed)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Card>
|
||||
<CardContent className="p-6 sm:p-8">
|
||||
{isSuccess ? (
|
||||
<div className="flex flex-col items-center justify-center h-full min-h-[400px] text-center space-y-4">
|
||||
<CheckCircle className="w-16 h-16 text-green-500" />
|
||||
<h3 className="text-2xl font-bold">Mesajınız Alındı!</h3>
|
||||
<p className="text-muted-foreground">
|
||||
En kısa sürede size dönüş yapacağız.
|
||||
</p>
|
||||
<Button onClick={() => setIsSuccess(false)} variant="outline">
|
||||
Yeni Mesaj Gönder
|
||||
</Button>
|
||||
</div>
|
||||
) : (
|
||||
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-4">
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<div className="space-y-2">
|
||||
<label htmlFor="name" className="text-sm font-medium">Adınız</label>
|
||||
<Input id="name" {...form.register("name")} placeholder="Adınız" />
|
||||
{form.formState.errors.name && <p className="text-xs text-red-500">{form.formState.errors.name.message}</p>}
|
||||
</div>
|
||||
<div className="space-y-2 w-[210px]">
|
||||
<label htmlFor="surname" className="text-sm font-medium">Soyadınız</label>
|
||||
<Input id="surname" {...form.register("surname")} placeholder="Soyadınız" />
|
||||
{form.formState.errors.surname && <p className="text-xs text-red-500">{form.formState.errors.surname.message}</p>}
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<div className="space-y-2">
|
||||
<label htmlFor="email" className="text-sm font-medium">E-posta</label>
|
||||
<Input id="email" type="email" {...form.register("email")} placeholder="ornek@sirket.com" />
|
||||
{form.formState.errors.email && <p className="text-xs text-red-500">{form.formState.errors.email.message}</p>}
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<label htmlFor="phone" className="text-sm font-medium">Telefon</label>
|
||||
<div className="relative w-[210px]">
|
||||
<div className="absolute left-3 top-2 text-muted-foreground text-sm flex items-center gap-2 font-medium z-10 select-none pointer-events-none">
|
||||
<span>🇹🇷</span>
|
||||
<span>+90</span>
|
||||
<div className="w-px h-4 bg-border" />
|
||||
</div>
|
||||
<Input
|
||||
id="phone"
|
||||
type="tel"
|
||||
className="pl-20 font-mono"
|
||||
placeholder="(5XX) XXX XX XX"
|
||||
maxLength={15}
|
||||
{...form.register("phone", {
|
||||
onChange: (e) => {
|
||||
let value = e.target.value.replace(/\D/g, ''); // Remove non-digits
|
||||
if (value.startsWith('90')) value = value.slice(2); // Remove leading 90 if user types it
|
||||
|
||||
// Format: (5XX) XXX XX XX
|
||||
let formattedValue = '';
|
||||
if (value.length > 0) formattedValue += '(' + value.substring(0, 3);
|
||||
if (value.length > 3) formattedValue += ') ' + value.substring(3, 6);
|
||||
if (value.length > 6) formattedValue += ' ' + value.substring(6, 8);
|
||||
if (value.length > 8) formattedValue += ' ' + value.substring(8, 10);
|
||||
|
||||
e.target.value = formattedValue;
|
||||
return e;
|
||||
}
|
||||
})}
|
||||
/>
|
||||
</div>
|
||||
{form.formState.errors.phone && <p className="text-xs text-red-500">{form.formState.errors.phone.message}</p>}
|
||||
</div>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<label htmlFor="subject" className="text-sm font-medium">Konu</label>
|
||||
<Input id="subject" {...form.register("subject")} placeholder="Konu" />
|
||||
{form.formState.errors.subject && <p className="text-xs text-red-500">{form.formState.errors.subject.message}</p>}
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<label htmlFor="message" className="text-sm font-medium">Mesajınız</label>
|
||||
<Textarea id="message" {...form.register("message")} placeholder="Size nasıl yardımcı olabiliriz?" className="min-h-[120px]" />
|
||||
{form.formState.errors.message && <p className="text-xs text-red-500">{form.formState.errors.message.message}</p>}
|
||||
</div>
|
||||
<Button size="lg" className="w-full" disabled={isSubmitting}>
|
||||
{isSubmitting && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
|
||||
Mesaj Gönder
|
||||
</Button>
|
||||
</form>
|
||||
)}
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
58
app/(public)/corporate/page.tsx
Normal file
58
app/(public)/corporate/page.tsx
Normal file
@@ -0,0 +1,58 @@
|
||||
|
||||
import Image from "next/image"
|
||||
|
||||
export default function CorporatePage() {
|
||||
return (
|
||||
<div className="container py-12 md:py-24">
|
||||
<div className="max-w-4xl mx-auto space-y-12">
|
||||
<section className="space-y-6 text-center">
|
||||
<h1 className="text-4xl md:text-5xl font-bold tracking-tight font-outfit">Hakkımızda</h1>
|
||||
<p className="text-xl text-muted-foreground">
|
||||
1995'ten beri güvenliğinizi en değerli hazinemiz olarak görüyoruz.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section className="grid md:grid-cols-2 gap-12 items-center">
|
||||
<div className="aspect-square relative bg-slate-200 rounded-lg overflow-hidden">
|
||||
{/* Placeholder Image */}
|
||||
<div className="absolute inset-0 flex items-center justify-center text-muted-foreground">
|
||||
Şirket Görseli
|
||||
</div>
|
||||
</div>
|
||||
<div className="space-y-6">
|
||||
<h2 className="text-3xl font-bold">Misyonumuz</h2>
|
||||
<p className="text-slate-600 dark:text-slate-300 leading-relaxed">
|
||||
ParaKasa olarak misyonumuz, müşterilerimizin maddi ve manevi değerlerini korumak için
|
||||
dünya standartlarında güvenlik çözümleri sunmaktır. Teknolojiyi zanaatkarlıkla birleştirerek,
|
||||
sadece bir metal kutu değil, huzur ve güven üretiyoruz.
|
||||
</p>
|
||||
<h2 className="text-3xl font-bold pt-4">Vizyonumuz</h2>
|
||||
<p className="text-slate-600 dark:text-slate-300 leading-relaxed">
|
||||
Türkiye'nin lider çelik kasa üreticisi olarak, global pazarda güvenilirlik ve kalite
|
||||
denince akla gelen ilk marka olmak. Yenilikçi Ar-Ge çalışmalarımızla güvenlik teknolojilerine
|
||||
yön vermek.
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="bg-slate-50 dark:bg-slate-900 p-8 rounded-2xl text-center space-y-4">
|
||||
<h3 className="text-2xl font-bold">Neden ParaKasa?</h3>
|
||||
<div className="grid sm:grid-cols-3 gap-6 pt-6">
|
||||
<div className="p-4">
|
||||
<div className="text-4xl font-bold text-primary mb-2">25+</div>
|
||||
<div className="text-sm font-medium">Yıllık Tecrübe</div>
|
||||
</div>
|
||||
<div className="p-4">
|
||||
<div className="text-4xl font-bold text-primary mb-2">10K+</div>
|
||||
<div className="text-sm font-medium">Mutlu Müşteri</div>
|
||||
</div>
|
||||
<div className="p-4">
|
||||
<div className="text-4xl font-bold text-primary mb-2">%100</div>
|
||||
<div className="text-sm font-medium">Yerli Üretim</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
20
app/(public)/layout.tsx
Normal file
20
app/(public)/layout.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
import { Navbar } from "@/components/layout/navbar";
|
||||
import { Footer } from "@/components/layout/footer";
|
||||
|
||||
export default function PublicLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<div className="flex flex-col min-h-screen">
|
||||
<div className="bg-yellow-400 text-yellow-900 text-center py-2 px-4 text-sm font-bold">
|
||||
⚠️ SİTE YAPIM AŞAMASINDADIR
|
||||
</div>
|
||||
<Navbar />
|
||||
<main className="flex-1">{children}</main>
|
||||
<Footer />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
99
app/(public)/login/page.tsx
Normal file
99
app/(public)/login/page.tsx
Normal file
@@ -0,0 +1,99 @@
|
||||
"use client"
|
||||
|
||||
import { useState } from "react"
|
||||
import { useRouter } from "next/navigation"
|
||||
import Link from "next/link"
|
||||
import { supabase } from "@/lib/supabase"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Input } from "@/components/ui/input"
|
||||
import { Label } from "@/components/ui/label"
|
||||
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
import { AlertCircle, Loader2 } from "lucide-react"
|
||||
|
||||
export default function LoginPage() {
|
||||
const router = useRouter()
|
||||
const [email, setEmail] = useState("")
|
||||
const [password, setPassword] = useState("")
|
||||
const [loading, setLoading] = useState(false)
|
||||
const [error, setError] = useState<string | null>(null)
|
||||
|
||||
const handleLogin = async (e: React.FormEvent) => {
|
||||
e.preventDefault()
|
||||
setLoading(true)
|
||||
setError(null)
|
||||
|
||||
try {
|
||||
const { error } = await supabase.auth.signInWithPassword({
|
||||
email,
|
||||
password,
|
||||
})
|
||||
|
||||
if (error) {
|
||||
setError(error.message)
|
||||
return
|
||||
}
|
||||
|
||||
router.push("/")
|
||||
router.refresh()
|
||||
} catch (err: any) {
|
||||
setError("Bir hata oluştu. Lütfen tekrar deneyin.")
|
||||
} finally {
|
||||
setLoading(false)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex items-center justify-center min-h-screen bg-slate-50 dark:bg-slate-950 px-4">
|
||||
<Card className="w-full max-w-md">
|
||||
<CardHeader className="space-y-1">
|
||||
<CardTitle className="text-2xl font-bold">Giriş Yap</CardTitle>
|
||||
<CardDescription>
|
||||
Hesabınıza erişmek için bilgilerinizi girin
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<form onSubmit={handleLogin} className="space-y-4">
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="email">Email</Label>
|
||||
<Input
|
||||
id="email"
|
||||
type="email"
|
||||
placeholder="ornek@sirket.com"
|
||||
value={email}
|
||||
onChange={(e) => setEmail(e.target.value)}
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="password">Şifre</Label>
|
||||
<Input
|
||||
id="password"
|
||||
type="password"
|
||||
value={password}
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
{error && (
|
||||
<div className="flex items-center space-x-2 text-sm text-red-600 bg-red-50 p-3 rounded-md">
|
||||
<AlertCircle className="h-4 w-4" />
|
||||
<span>{error}</span>
|
||||
</div>
|
||||
)}
|
||||
<Button className="w-full" type="submit" disabled={loading}>
|
||||
{loading && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
|
||||
Giriş Yap
|
||||
</Button>
|
||||
</form>
|
||||
</CardContent>
|
||||
<CardFooter className="flex flex-col gap-4 text-center text-sm text-muted-foreground">
|
||||
<div className="text-center">
|
||||
</div>
|
||||
<Link href="/" className="underline underline-offset-4 hover:text-primary">
|
||||
Ana Sayfaya Dön
|
||||
</Link>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
157
app/(public)/page.tsx
Normal file
157
app/(public)/page.tsx
Normal file
@@ -0,0 +1,157 @@
|
||||
import Link from "next/link"
|
||||
import Image from "next/image"
|
||||
import { ArrowRight, ShieldCheck, Lock, Award, History, LayoutDashboard, LogIn } from "lucide-react"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Card, CardContent } from "@/components/ui/card"
|
||||
import { createClient } from "@/lib/supabase-server"
|
||||
|
||||
export default async function Home() {
|
||||
const supabase = createClient()
|
||||
const { data: { user } } = await supabase.auth.getUser()
|
||||
|
||||
return (
|
||||
<div className="flex flex-col min-h-screen">
|
||||
{/* Hero Section */}
|
||||
<section className="relative w-full h-[80vh] flex items-center bg-black overflow-hidden">
|
||||
<div className="absolute inset-0 z-0">
|
||||
<Image
|
||||
src="/images/hero-safe.png"
|
||||
alt="Premium Çelik Kasa"
|
||||
fill
|
||||
className="object-cover opacity-60"
|
||||
priority
|
||||
/>
|
||||
<div className="absolute inset-0 bg-gradient-to-r from-black/90 via-black/50 to-transparent" />
|
||||
</div>
|
||||
|
||||
<div className="container relative z-10 px-4 md:px-6">
|
||||
<div className="max-w-2xl space-y-4">
|
||||
<h1 className="text-4xl md:text-6xl lg:text-7xl font-bold tracking-tighter text-white font-outfit">
|
||||
GÜVENLİK SINIR <br /> <span className="text-transparent bg-clip-text bg-gradient-to-r from-slate-200 to-slate-500">TANIMAZ</span>
|
||||
</h1>
|
||||
<p className="text-lg md:text-xl text-slate-300 max-w-[600px]">
|
||||
En değerli varlıklarınız için tasarlanmış yüksek güvenlikli çelik kasalar.
|
||||
Modern teknoloji ve zanaatkarlığın mükemmel uyumu.
|
||||
</p>
|
||||
<div className="flex flex-col sm:flex-row gap-4 mt-8">
|
||||
<Button size="lg" className="bg-slate-100 text-slate-900 hover:bg-slate-200 font-semibold text-lg px-8">
|
||||
<Link href="/products">Koleksiyonu İncele</Link>
|
||||
</Button>
|
||||
{user && (
|
||||
<Button size="lg" variant="outline" className="border-slate-400 text-slate-100 hover:bg-slate-800 hover:text-white font-semibold text-lg px-8">
|
||||
<Link href="/dashboard" className="flex items-center">
|
||||
<LayoutDashboard className="mr-2 h-5 w-5" />
|
||||
Panele Git
|
||||
</Link>
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Categories Section */}
|
||||
<section className="py-20 md:py-32 bg-slate-50 dark:bg-slate-950">
|
||||
<div className="container px-4 md:px-6">
|
||||
<div className="flex flex-col items-center justify-center space-y-4 text-center mb-16">
|
||||
<h2 className="text-3xl md:text-5xl font-bold tracking-tighter font-outfit">Ürün Kategorileri</h2>
|
||||
<p className="max-w-[700px] text-muted-foreground md:text-lg">
|
||||
İhtiyacınıza uygun güvenlik çözümünü seçin.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
|
||||
{/* Home Safes */}
|
||||
<Link href="/products?category=ev" className="group">
|
||||
<Card className="h-full overflow-hidden border-0 shadow-lg transition-all duration-300 group-hover:shadow-2xl group-hover:-translate-y-2 bg-white dark:bg-slate-900">
|
||||
<CardContent className="p-0 relative aspect-[4/5]">
|
||||
<div className="absolute inset-0 bg-slate-200 dark:bg-slate-800 animate-pulse" /> {/* Placeholder for image */}
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent flex flex-col justify-end p-6">
|
||||
<h3 className="text-2xl font-bold text-white mb-2">Ev Tipi Kasalar</h3>
|
||||
<div className="flex items-center text-slate-300 text-sm font-medium opacity-0 group-hover:opacity-100 transition-opacity transform translate-y-4 group-hover:translate-y-0">
|
||||
İncele <ArrowRight className="ml-2 h-4 w-4" />
|
||||
</div>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</Link>
|
||||
|
||||
{/* Office Safes */}
|
||||
<Link href="/products?category=ofis" className="group">
|
||||
<Card className="h-full overflow-hidden border-0 shadow-lg transition-all duration-300 group-hover:shadow-2xl group-hover:-translate-y-2 bg-white dark:bg-slate-900">
|
||||
<CardContent className="p-0 relative aspect-[4/5]">
|
||||
<div className="absolute inset-0 bg-slate-300 dark:bg-slate-700 animate-pulse" />
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent flex flex-col justify-end p-6">
|
||||
<h3 className="text-2xl font-bold text-white mb-2">Ofis Kasaları</h3>
|
||||
<div className="flex items-center text-slate-300 text-sm font-medium opacity-0 group-hover:opacity-100 transition-opacity transform translate-y-4 group-hover:translate-y-0">
|
||||
İncele <ArrowRight className="ml-2 h-4 w-4" />
|
||||
</div>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</Link>
|
||||
|
||||
{/* Hotel/Room Safes */}
|
||||
<Link href="/products?category=otel" className="group">
|
||||
<Card className="h-full overflow-hidden border-0 shadow-lg transition-all duration-300 group-hover:shadow-2xl group-hover:-translate-y-2 bg-white dark:bg-slate-900">
|
||||
<CardContent className="p-0 relative aspect-[4/5]">
|
||||
<div className="absolute inset-0 bg-slate-200 dark:bg-slate-800 animate-pulse" />
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent flex flex-col justify-end p-6">
|
||||
<h3 className="text-2xl font-bold text-white mb-2">Otel & Oda</h3>
|
||||
<div className="flex items-center text-slate-300 text-sm font-medium opacity-0 group-hover:opacity-100 transition-opacity transform translate-y-4 group-hover:translate-y-0">
|
||||
İncele <ArrowRight className="ml-2 h-4 w-4" />
|
||||
</div>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</Link>
|
||||
|
||||
{/* Gun/Special Safes */}
|
||||
<Link href="/products?category=ozel" className="group">
|
||||
<Card className="h-full overflow-hidden border-0 shadow-lg transition-all duration-300 group-hover:shadow-2xl group-hover:-translate-y-2 bg-white dark:bg-slate-900">
|
||||
<CardContent className="p-0 relative aspect-[4/5]">
|
||||
<div className="absolute inset-0 bg-slate-300 dark:bg-slate-700 animate-pulse" />
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent flex flex-col justify-end p-6">
|
||||
<h3 className="text-2xl font-bold text-white mb-2">Diğer Ürünler</h3>
|
||||
<div className="flex items-center text-slate-300 text-sm font-medium opacity-0 group-hover:opacity-100 transition-opacity transform translate-y-4 group-hover:translate-y-0">
|
||||
İncele <ArrowRight className="ml-2 h-4 w-4" />
|
||||
</div>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Trust/Features Section */}
|
||||
<section className="py-20 md:py-32 bg-white dark:bg-black">
|
||||
<div className="container px-4 md:px-6">
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-12 text-center">
|
||||
<div className="flex flex-col items-center space-y-4">
|
||||
<div className="p-4 bg-slate-100 dark:bg-slate-900 rounded-full">
|
||||
<ShieldCheck className="w-12 h-12 text-slate-900 dark:text-slate-100" />
|
||||
</div>
|
||||
<h3 className="text-xl font-bold">Sertifikalı Güvenlik</h3>
|
||||
<p className="text-muted-foreground">Uluslararası standartlarda yangına ve hırsızlığa karşı dayanıklılık sertifikaları.</p>
|
||||
</div>
|
||||
<div className="flex flex-col items-center space-y-4">
|
||||
<div className="p-4 bg-slate-100 dark:bg-slate-900 rounded-full">
|
||||
<Lock className="w-12 h-12 text-slate-900 dark:text-slate-100" />
|
||||
</div>
|
||||
<h3 className="text-xl font-bold">Gelişmiş Kilit Sistemleri</h3>
|
||||
<p className="text-muted-foreground">Biyometrik, elektronik şifreli ve anahtarlı hibrit kilit teknolojileri.</p>
|
||||
</div>
|
||||
<div className="flex flex-col items-center space-y-4">
|
||||
<div className="p-4 bg-slate-100 dark:bg-slate-900 rounded-full">
|
||||
<History className="w-12 h-12 text-slate-900 dark:text-slate-100" />
|
||||
</div>
|
||||
<h3 className="text-xl font-bold">Yılların Tecrübesi</h3>
|
||||
<p className="text-muted-foreground">Uzun yıllara dayanan sektör tecrübesi ve %100 müşteri memnuniyeti.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
80
app/(public)/products/page.tsx
Normal file
80
app/(public)/products/page.tsx
Normal file
@@ -0,0 +1,80 @@
|
||||
|
||||
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import Image from "next/image"
|
||||
|
||||
const products = [
|
||||
{
|
||||
id: 1,
|
||||
name: "Ev Tipi Çelik Kasa",
|
||||
image: "/images/safe-1.jpg",
|
||||
category: "Ev",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "Ofis Tipi Yanmaz Kasa",
|
||||
image: "/images/safe-2.jpg",
|
||||
category: "Ofis",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "Otel Odası Kasası",
|
||||
image: "/images/safe-3.jpg",
|
||||
category: "Otel",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: "Silah Kasası (Tüfek)",
|
||||
image: "/images/safe-4.jpg",
|
||||
category: "Özel",
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: "Kuyumcu Kasası",
|
||||
image: "/images/safe-5.jpg",
|
||||
category: "Ticari",
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: "Duvar İçi Gizli Kasa",
|
||||
image: "/images/safe-6.jpg",
|
||||
category: "Ev",
|
||||
},
|
||||
]
|
||||
|
||||
export default function ProductsPage() {
|
||||
return (
|
||||
<div className="container py-12 md:py-24">
|
||||
<div className="flex flex-col items-center mb-12 text-center">
|
||||
<h1 className="text-4xl font-bold tracking-tight mb-4 font-outfit">Ürün Koleksiyonumuz</h1>
|
||||
<p className="text-muted-foreground max-w-2xl">
|
||||
Güvenliğiniz için en son teknoloji ile üretilmiş, sertifikalı çelik kasa çözümlerimizi inceleyin.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
{products.map((product) => (
|
||||
<Card key={product.id} className="overflow-hidden border-0 shadow-md hover:shadow-xl transition-all duration-300">
|
||||
<div className="aspect-[4/5] relative bg-slate-100 dark:bg-slate-800">
|
||||
{/* Placeholder for real images */}
|
||||
<div className="absolute inset-0 flex items-center justify-center text-slate-400">
|
||||
<span className="text-sm">Görsel: {product.name}</span>
|
||||
</div>
|
||||
</div>
|
||||
<CardHeader className="p-4">
|
||||
<div className="flex justify-between items-start">
|
||||
<div>
|
||||
<span className="text-xs font-medium text-slate-500 uppercase tracking-wider">{product.category}</span>
|
||||
<CardTitle className="text-lg mt-1">{product.name}</CardTitle>
|
||||
</div>
|
||||
</div>
|
||||
</CardHeader>
|
||||
<CardFooter className="p-4 pt-0">
|
||||
<Button className="w-full">Detayları İncele</Button>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
133
app/(public)/signup/page.tsx
Normal file
133
app/(public)/signup/page.tsx
Normal file
@@ -0,0 +1,133 @@
|
||||
"use client"
|
||||
|
||||
import { useState } from "react"
|
||||
import { useRouter } from "next/navigation"
|
||||
import Link from "next/link"
|
||||
import { supabase } from "@/lib/supabase"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Input } from "@/components/ui/input"
|
||||
import { Label } from "@/components/ui/label"
|
||||
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
import { AlertCircle, Loader2, CheckCircle2 } from "lucide-react"
|
||||
|
||||
export default function SignUpPage() {
|
||||
const router = useRouter()
|
||||
const [email, setEmail] = useState("")
|
||||
const [password, setPassword] = useState("")
|
||||
const [loading, setLoading] = useState(false)
|
||||
const [error, setError] = useState<string | null>(null)
|
||||
const [success, setSuccess] = useState(false)
|
||||
|
||||
const handleSignUp = async (e: React.FormEvent) => {
|
||||
e.preventDefault()
|
||||
setLoading(true)
|
||||
setError(null)
|
||||
|
||||
try {
|
||||
const { data, error } = await supabase.auth.signUp({
|
||||
email,
|
||||
password,
|
||||
options: {
|
||||
emailRedirectTo: `${location.origin}/auth/callback`,
|
||||
},
|
||||
})
|
||||
|
||||
if (error) {
|
||||
setError(error.message)
|
||||
return
|
||||
}
|
||||
|
||||
if (data.user) {
|
||||
setSuccess(true)
|
||||
}
|
||||
} catch (err: any) {
|
||||
setError("Bir hata oluştu. Lütfen tekrar deneyin.")
|
||||
} finally {
|
||||
setLoading(false)
|
||||
}
|
||||
}
|
||||
|
||||
if (success) {
|
||||
return (
|
||||
<div className="flex items-center justify-center min-h-screen bg-slate-50 dark:bg-slate-950 px-4">
|
||||
<Card className="w-full max-w-md">
|
||||
<CardHeader className="space-y-1 text-center">
|
||||
<div className="flex justify-center mb-4">
|
||||
<CheckCircle2 className="h-12 w-12 text-green-500" />
|
||||
</div>
|
||||
<CardTitle className="text-2xl font-bold text-green-600">Başarılı!</CardTitle>
|
||||
<CardDescription className="text-base mt-2">
|
||||
Kayıt işleminiz başarıyla tamamlandı. Lütfen e-posta adresinizi kontrol ederek hesabınızı doğrulayın.
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardFooter className="flex justify-center pt-6">
|
||||
<Button asChild variant="outline">
|
||||
<Link href="/login">Giriş Yap</Link>
|
||||
</Button>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex items-center justify-center min-h-screen bg-slate-50 dark:bg-slate-950 px-4">
|
||||
<Card className="w-full max-w-md">
|
||||
<CardHeader className="space-y-1">
|
||||
<CardTitle className="text-2xl font-bold">Hesap Oluştur</CardTitle>
|
||||
<CardDescription>
|
||||
ParaKasa'ya katılmak için bilgilerinizi girin
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<form onSubmit={handleSignUp} className="space-y-4">
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="email">Email</Label>
|
||||
<Input
|
||||
id="email"
|
||||
type="email"
|
||||
placeholder="ornek@sirket.com"
|
||||
value={email}
|
||||
onChange={(e) => setEmail(e.target.value)}
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="password">Şifre</Label>
|
||||
<Input
|
||||
id="password"
|
||||
type="password"
|
||||
value={password}
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
required
|
||||
minLength={6}
|
||||
/>
|
||||
<p className="text-xs text-muted-foreground">En az 6 karakter olmalıdır.</p>
|
||||
</div>
|
||||
{error && (
|
||||
<div className="flex items-center space-x-2 text-sm text-red-600 bg-red-50 p-3 rounded-md">
|
||||
<AlertCircle className="h-4 w-4" />
|
||||
<span>{error}</span>
|
||||
</div>
|
||||
)}
|
||||
<Button className="w-full" type="submit" disabled={loading}>
|
||||
{loading && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
|
||||
Kayıt Ol
|
||||
</Button>
|
||||
</form>
|
||||
</CardContent>
|
||||
<CardFooter className="flex flex-col gap-4 text-center text-sm text-muted-foreground">
|
||||
<div className="text-center">
|
||||
Zaten hesabınız var mı?{" "}
|
||||
<Link href="/login" className="underline underline-offset-4 hover:text-primary">
|
||||
Giriş Yap
|
||||
</Link>
|
||||
</div>
|
||||
<Link href="/" className="underline underline-offset-4 hover:text-primary">
|
||||
Ana Sayfaya Dön
|
||||
</Link>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user