Compare commits

..
3 Commits
7 changed files with 91 additions and 68 deletions
+1 -3
View File
@@ -61,9 +61,7 @@ export default async function AktivitelerPage({ params }: { params: Promise<{ la
<p className="text-gray-500 text-[14px] leading-relaxed mb-6 flex-grow">{act.description}</p> <p className="text-gray-500 text-[14px] leading-relaxed mb-6 flex-grow">{act.description}</p>
<div className="flex justify-between items-center pt-6 border-t border-sand"> <div className="flex justify-between items-center pt-6 border-t border-sand">
<div> <div className="flex-1"></div>
<span className="text-2xl font-bold text-dark">{act.price}</span>
</div>
<Link <Link
href={`/${lang}/iletisim`} href={`/${lang}/iletisim`}
className="inline-flex items-center gap-2 text-accent font-bold text-[12px] tracking-wider uppercase hover:text-primary transition-colors group/link" className="inline-flex items-center gap-2 text-accent font-bold text-[12px] tracking-wider uppercase hover:text-primary transition-colors group/link"
+12 -15
View File
@@ -386,7 +386,7 @@ export default async function Home({ params }: { params: Promise<{ lang: string
className={i === 0 || i === 3 ? "md:col-span-2" : ""} className={i === 0 || i === 3 ? "md:col-span-2" : ""}
delay={i * 50} delay={i * 50}
> >
<Link href="/aktiviteler" className={`group relative block rounded-3xl overflow-hidden ${i < 2 ? "h-[400px]" : "h-[280px]"}`}> <Link href="/aktiviteler" className={`group relative block rounded-3xl overflow-hidden ${activities.length === 1 ? "aspect-[4/3] md:aspect-video" : i < 2 ? "h-[400px]" : "h-[280px]"}`}>
<Image <Image
src={act.image} src={act.image}
alt={act.title} alt={act.title}
@@ -404,12 +404,9 @@ export default async function Home({ params }: { params: Promise<{ lang: string
{act.description} {act.description}
</p> </p>
)} )}
{i !== 0 && (
<span className="text-white/60 text-xs">{act.price}</span>
)}
{i === 0 && ( {i === 0 && (
<span className="inline-flex items-center gap-2 text-white text-sm font-semibold"> <span className="inline-flex items-center gap-2 text-white text-sm font-semibold hover:text-accent transition-colors">
{act.price} <ArrowRight className="w-3.5 h-3.5" /> <ArrowRight className="w-3.5 h-3.5" />
</span> </span>
)} )}
</div> </div>
@@ -508,19 +505,19 @@ export default async function Home({ params }: { params: Promise<{ lang: string
</span> </span>
<h2 className="font-serif text-5xl font-bold text-dark">Instagram</h2> <h2 className="font-serif text-5xl font-bold text-dark">Instagram</h2>
</ScrollReveal> </ScrollReveal>
<ScrollReveal stagger className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-4 gap-6"> <ScrollReveal stagger className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-4 gap-6">
{instagramPosts.map((post: any) => ( {instagramPosts.map((post: any) => (
<a <a
key={post.id} key={post.id}
href={`https://instagram.com/p/${post.code}`} href={`https://instagram.com/p/${post.code}`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
className="group block relative rounded-2xl overflow-hidden aspect-[4/5] border border-sand" className="group block relative rounded-2xl overflow-hidden aspect-[4/5] border border-sand"
> >
{/* eslint-disable-next-line @next/next/no-img-element */} {/* eslint-disable-next-line @next/next/no-img-element */}
<img <img
src={post.image_versions2?.candidates[0]?.url} src={post.image_versions2?.candidates[0]?.url}
alt={post.caption?.text?.substring(0, 100) || "Instagram post"} alt={post.caption?.text?.substring(0, 100) || "Instagram post"}
className="w-full h-full object-cover group-hover:scale-105 transition-transform duration-700" className="w-full h-full object-cover group-hover:scale-105 transition-transform duration-700"
/> />
@@ -533,9 +530,9 @@ export default async function Home({ params }: { params: Promise<{ lang: string
</a> </a>
))} ))}
</ScrollReveal> </ScrollReveal>
<div className="text-center mt-12"> <div className="text-center mt-12">
<a <a
href="https://instagram.com/kitebeachakyaka" href="https://instagram.com/kitebeachakyaka"
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
+2 -2
View File
@@ -93,7 +93,7 @@ export async function addActivity(prevState: any, formData: FormData) {
lang: formData.get("lang") as string, lang: formData.get("lang") as string,
title: formData.get("title") as string, title: formData.get("title") as string,
description: formData.get("description") as string, description: formData.get("description") as string,
price: formData.get("price") as string, price: (formData.get("price") as string) || "",
image: formData.get("image") as string, image: formData.get("image") as string,
badge: formData.get("badge") as string || null, badge: formData.get("badge") as string || null,
order: parseInt(formData.get("order") as string || "0", 10), order: parseInt(formData.get("order") as string || "0", 10),
@@ -118,7 +118,7 @@ export async function updateActivity(prevState: any, formData: FormData) {
lang: formData.get("lang") as string, lang: formData.get("lang") as string,
title: formData.get("title") as string, title: formData.get("title") as string,
description: formData.get("description") as string, description: formData.get("description") as string,
price: formData.get("price") as string, price: (formData.get("price") as string) || "",
image: formData.get("image") as string, image: formData.get("image") as string,
badge: formData.get("badge") as string || null, badge: formData.get("badge") as string || null,
order: parseInt(formData.get("order") as string || "0", 10), order: parseInt(formData.get("order") as string || "0", 10),
+5 -17
View File
@@ -92,7 +92,7 @@ export default function ActivitiesClient({ activities }: { activities: Activity[
<tr> <tr>
<th className="px-8 py-5">Başlık</th> <th className="px-8 py-5">Başlık</th>
<th className="px-8 py-5">Dil</th> <th className="px-8 py-5">Dil</th>
<th className="px-8 py-5">Fiyat</th>
<th className="px-8 py-5 text-right">İşlemler</th> <th className="px-8 py-5 text-right">İşlemler</th>
</tr> </tr>
</thead> </thead>
@@ -103,7 +103,7 @@ export default function ActivitiesClient({ activities }: { activities: Activity[
<td className="px-8 py-5"> <td className="px-8 py-5">
<span className="bg-gray-100 text-gray-600 px-3 py-1 rounded-full text-[10px] uppercase font-black tracking-widest border border-gray-200">{act.lang}</span> <span className="bg-gray-100 text-gray-600 px-3 py-1 rounded-full text-[10px] uppercase font-black tracking-widest border border-gray-200">{act.lang}</span>
</td> </td>
<td className="px-8 py-5 font-medium">{act.price}</td>
<td className="px-8 py-5 text-right"> <td className="px-8 py-5 text-right">
<div className="flex items-center justify-end gap-2 opacity-0 group-hover:opacity-100 transition-opacity"> <div className="flex items-center justify-end gap-2 opacity-0 group-hover:opacity-100 transition-opacity">
<button <button
@@ -132,10 +132,10 @@ export default function ActivitiesClient({ activities }: { activities: Activity[
{/* Modal */} {/* Modal */}
{isModalOpen && ( {isModalOpen && (
<div className="fixed inset-0 z-50 flex items-center justify-center p-4"> <div className="fixed inset-0 z-50 flex items-start justify-center p-4 pt-10 md:pt-16">
<div className="absolute inset-0 bg-dark/60 backdrop-blur-sm" onClick={closeModal} /> <div className="absolute inset-0 bg-dark/60 backdrop-blur-sm" onClick={closeModal} />
<div className="bg-white rounded-3xl shadow-2xl w-full max-w-2xl relative z-10 animate-fade-up overflow-hidden max-h-[90vh] flex flex-col"> <div className="bg-white rounded-3xl shadow-2xl w-full max-w-2xl relative z-10 animate-fade-up overflow-hidden max-h-[85vh] flex flex-col">
<div className="flex justify-between items-center p-6 md:p-8 border-b border-gray-100 bg-gray-50/50"> <div className="flex justify-between items-center p-6 md:p-8 border-b border-gray-100 bg-gray-50/50">
<h2 className="text-2xl font-bold font-serif text-dark"> <h2 className="text-2xl font-bold font-serif text-dark">
{editingActivity ? "Aktivite Düzenle" : "Yeni Aktivite Ekle"} {editingActivity ? "Aktivite Düzenle" : "Yeni Aktivite Ekle"}
@@ -145,7 +145,7 @@ export default function ActivitiesClient({ activities }: { activities: Activity[
</button> </button>
</div> </div>
<div className="p-6 md:p-8 overflow-y-auto"> <div className="p-6 md:p-8 overflow-y-auto flex-1 min-h-0">
<form action={handleSubmit} className="space-y-6"> <form action={handleSubmit} className="space-y-6">
{error && ( {error && (
@@ -189,18 +189,6 @@ export default function ActivitiesClient({ activities }: { activities: Activity[
/> />
</div> </div>
<div>
<label className="block text-xs font-bold text-gray-500 tracking-wider uppercase mb-2">Fiyat (Metin)</label>
<input
type="text"
name="price"
defaultValue={editingActivity?.price || ""}
required
className="w-full px-5 py-3.5 bg-gray-50 border border-gray-200 text-dark rounded-xl focus:ring-4 focus:ring-primary/20 focus:border-primary outline-none transition-all hover:border-gray-300"
placeholder="Örn: ₺2.000/Saat"
/>
</div>
<div> <div>
<label className="block text-xs font-bold text-gray-500 tracking-wider uppercase mb-2">Rozet (Opsiyonel)</label> <label className="block text-xs font-bold text-gray-500 tracking-wider uppercase mb-2">Rozet (Opsiyonel)</label>
<input <input
+3 -3
View File
@@ -132,10 +132,10 @@ export default function EventsClient({ events }: { events: Event[] }) {
{/* Modal */} {/* Modal */}
{isModalOpen && ( {isModalOpen && (
<div className="fixed inset-0 z-50 flex items-center justify-center p-4"> <div className="fixed inset-0 z-50 flex items-start justify-center p-4 pt-10 md:pt-16">
<div className="absolute inset-0 bg-dark/60 backdrop-blur-sm" onClick={closeModal} /> <div className="absolute inset-0 bg-dark/60 backdrop-blur-sm" onClick={closeModal} />
<div className="bg-white rounded-3xl shadow-2xl w-full max-w-2xl relative z-10 animate-fade-up overflow-hidden max-h-[90vh] flex flex-col"> <div className="bg-white rounded-3xl shadow-2xl w-full max-w-2xl relative z-10 animate-fade-up overflow-hidden max-h-[85vh] flex flex-col">
<div className="flex justify-between items-center p-6 md:p-8 border-b border-gray-100 bg-gray-50/50"> <div className="flex justify-between items-center p-6 md:p-8 border-b border-gray-100 bg-gray-50/50">
<h2 className="text-2xl font-bold font-serif text-dark"> <h2 className="text-2xl font-bold font-serif text-dark">
{editingEvent ? "Etkinlik Düzenle" : "Yeni Etkinlik Ekle"} {editingEvent ? "Etkinlik Düzenle" : "Yeni Etkinlik Ekle"}
@@ -145,7 +145,7 @@ export default function EventsClient({ events }: { events: Event[] }) {
</button> </button>
</div> </div>
<div className="p-6 md:p-8 overflow-y-auto"> <div className="p-6 md:p-8 overflow-y-auto flex-1 min-h-0">
<form action={handleSubmit} className="space-y-6"> <form action={handleSubmit} className="space-y-6">
{error && ( {error && (
+56 -28
View File
@@ -5,20 +5,20 @@ import Link from "next/link";
import Image from "next/image"; import Image from "next/image";
import { usePathname } from "next/navigation"; import { usePathname } from "next/navigation";
import { motion, AnimatePresence } from "framer-motion"; import { motion, AnimatePresence } from "framer-motion";
import { Menu, X } from "lucide-react"; import { Menu, X, Globe } from "lucide-react";
const navLinks = [ const navLinks = [
// { name: "Odalar", href: "/odalar" }, // { name: "Odalar", href: "/odalar" },
{ name: "Aktiviteler",href: "/aktiviteler"}, { name: "Aktiviteler", href: "/aktiviteler" },
{ name: "Restoran", href: "/restoran" }, { name: "Restoran", href: "/restoran" },
{ name: "Etkinlikler",href: "/etkinlikler"}, { name: "Etkinlikler", href: "/etkinlikler" },
{ name: "Galeri", href: "/galeri" },
{ name: "Hakkımızda", href: "/hakkimizda" }, { name: "Hakkımızda", href: "/hakkimizda" },
{ name: "İletişim", href: "/iletisim" }, { name: "İletişim", href: "/iletisim" },
]; ];
export default function Navbar() { export default function Navbar() {
const [isOpen, setIsOpen] = useState(false); const [isOpen, setIsOpen] = useState(false);
const [scrolled, setScrolled] = useState(false); const [scrolled, setScrolled] = useState(false);
const pathname = usePathname(); const pathname = usePathname();
@@ -30,26 +30,37 @@ export default function Navbar() {
useEffect(() => { setIsOpen(false); }, [pathname]); useEffect(() => { setIsOpen(false); }, [pathname]);
const isHome = pathname === "/"; const isHome = pathname === "/" || pathname === "/tr" || pathname === "/en";
const currentLang = pathname.startsWith("/en") ? "en" : "tr";
const toggleLang = currentLang === "en" ? "tr" : "en";
const getToggleHref = () => {
if (pathname === "/") return `/${toggleLang}`;
if (pathname.startsWith("/tr/")) return pathname.replace("/tr/", `/${toggleLang}/`);
if (pathname === "/tr") return `/${toggleLang}`;
if (pathname.startsWith("/en/")) return pathname.replace("/en/", `/${toggleLang}/`);
if (pathname === "/en") return `/${toggleLang}`;
return `/${toggleLang}${pathname}`;
};
return ( return (
<nav <nav
className={`fixed top-0 left-0 right-0 z-50 transition-all duration-500 ${ className={`fixed top-0 left-0 right-0 z-50 transition-all duration-500 ${scrolled
scrolled
? "bg-white/95 backdrop-blur-md shadow-sm py-4" ? "bg-white/95 backdrop-blur-md shadow-sm py-4"
: "bg-transparent py-6" : "bg-transparent py-6"
}`} }`}
> >
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="flex justify-between items-center"> <div className="flex justify-between items-center">
{/* Logo */} {/* Logo */}
<Link href="/" className="flex-shrink-0 flex items-center group"> <Link href="/" className="flex-shrink-0 flex items-center group">
<Image <Image
src="/logo.png" src="/logo.png"
alt="Kite Beach Logo" alt="Kite Beach Logo"
width={140} width={140}
height={48} height={48}
className={`object-contain transition-all duration-300 ${!scrolled && isHome ? 'brightness-0 invert' : ''}`} className={`object-contain transition-all duration-300 ${!scrolled && isHome ? 'brightness-0 invert' : ''}`}
priority priority
/> />
@@ -63,19 +74,17 @@ export default function Navbar() {
<Link <Link
key={link.name} key={link.name}
href={link.href} href={link.href}
className={`text-[13px] font-medium transition-colors relative group ${ className={`text-[13px] font-medium transition-colors relative group ${scrolled
scrolled
? active ? "text-primary" : "text-foreground hover:text-primary" ? active ? "text-primary" : "text-foreground hover:text-primary"
: isHome : isHome
? active ? "text-accent" : "text-white/85 hover:text-white" ? active ? "text-accent" : "text-white/85 hover:text-white"
: active ? "text-primary" : "text-foreground hover:text-primary" : active ? "text-primary" : "text-foreground hover:text-primary"
}`} }`}
> >
{link.name} {link.name}
<span <span
className={`absolute -bottom-0.5 left-0 h-px bg-current transition-all duration-300 ${ className={`absolute -bottom-0.5 left-0 h-px bg-current transition-all duration-300 ${active ? "w-full" : "w-0 group-hover:w-full"
active ? "w-full" : "w-0 group-hover:w-full" }`}
}`}
/> />
</Link> </Link>
); );
@@ -87,14 +96,27 @@ export default function Navbar() {
> >
Rezervasyon Rezervasyon
</Link> </Link>
{/* Lang Toggle */}
<Link
href={getToggleHref()}
className={`flex items-center gap-1.5 text-[11px] font-bold tracking-[0.12em] uppercase transition-colors hover:text-accent ${scrolled
? "text-dark"
: isHome
? "text-white"
: "text-dark"
}`}
>
<Globe size={14} />
<span>{currentLang === "tr" ? "EN" : "TR"}</span>
</Link>
</div> </div>
{/* Mobile toggle */} {/* Mobile toggle */}
<button <button
onClick={() => setIsOpen(!isOpen)} onClick={() => setIsOpen(!isOpen)}
className={`flex md:hidden p-1 transition-colors ${ className={`flex md:hidden p-1 transition-colors ${scrolled ? "text-dark" : isHome ? "text-white" : "text-dark"
scrolled ? "text-dark" : isHome ? "text-white" : "text-dark" }`}
}`}
aria-label="Menü" aria-label="Menü"
> >
{isOpen ? <X size={26} /> : <Menu size={26} />} {isOpen ? <X size={26} /> : <Menu size={26} />}
@@ -123,14 +145,20 @@ export default function Navbar() {
> >
<Link <Link
href={link.href} href={link.href}
className={`block py-3 text-base font-medium border-b border-sand/60 transition-colors ${ className={`block py-3 text-base font-medium border-b border-sand/60 transition-colors ${pathname === link.href ? "text-primary" : "text-dark hover:text-primary"
pathname === link.href ? "text-primary" : "text-dark hover:text-primary" }`}
}`}
> >
{link.name} {link.name}
</Link> </Link>
</motion.div> </motion.div>
))} ))}
<Link
href={getToggleHref()}
className="mt-2 flex items-center justify-center gap-2 text-sm font-bold uppercase text-dark border border-sand py-3 rounded-full hover:bg-sand/20 transition-colors"
>
<Globe size={16} />
{currentLang === "tr" ? "English" : "Türkçe"}
</Link>
<Link <Link
href="/iletisim" href="/iletisim"
className="mt-4 block w-full text-center bg-accent text-white px-6 py-3.5 rounded-full text-sm font-bold uppercase tracking-wider" className="mt-4 block w-full text-center bg-accent text-white px-6 py-3.5 rounded-full text-sm font-bold uppercase tracking-wider"
+12
View File
@@ -16,6 +16,18 @@ const nextConfig: NextConfig = {
port: '', port: '',
pathname: '/**', pathname: '/**',
}, },
{
protocol: 'https',
hostname: '**.fbcdn.net',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: '**.cdninstagram.com',
port: '',
pathname: '/**',
},
], ],
}, },
}; };