fix: adjust modal layout, improve image ratio, remove price fields, update next.config

This commit is contained in:
2026-06-10 03:41:22 +03:00
parent e55074cf31
commit a09200ce63
7 changed files with 54 additions and 65 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"
+8 -11
View File
@@ -83,14 +83,14 @@ export default async function Home({ params }: { params: Promise<{ lang: string
const activities = await prisma.activity.findMany({ where: { lang }, orderBy: { order: "asc" } }); const activities = await prisma.activity.findMany({ where: { lang }, orderBy: { order: "asc" } });
const events = await prisma.event.findMany({ where: { lang }, orderBy: { date: "asc" } }); const events = await prisma.event.findMany({ where: { lang }, orderBy: { date: "asc" } });
const dbFeatures = await prisma.feature.findMany({ where: { lang }, orderBy: { order: "asc" } }); const dbFeatures = await prisma.feature.findMany({ where: { lang }, orderBy: { order: "asc" } });
const aboutDb = await prisma.aboutSection.findUnique({ where: { lang } }); const aboutDb = await prisma.aboutSection.findUnique({ where: { lang } });
const aboutData = aboutDb || { const aboutData = aboutDb || {
badge: lang === "en" ? "Our Story" : "Hikayemiz", badge: lang === "en" ? "Our Story" : "Hikayemiz",
titleLine1: lang === "en" ? "In the" : "Doğanın", titleLine1: lang === "en" ? "In the" : "Doğanın",
titleLine2: lang === "en" ? "Heart of Nature" : "Kalbinde", titleLine2: lang === "en" ? "Heart of Nature" : "Kalbinde",
titleHighlight: lang === "en" ? "A Special Escape" : "Özel Bir Kaçış", titleHighlight: lang === "en" ? "A Special Escape" : "Özel Bir Kaçış",
description1: lang === "en" description1: lang === "en"
? "Located right on the banks of the Azmak River flowing into the crystal waters of the Gulf of Gokova, we are in a unique location where the wind never ceases." ? "Located right on the banks of the Azmak River flowing into the crystal waters of the Gulf of Gokova, we are in a unique location where the wind never ceases."
: "Gökova Körfezi'nin kristal sularına dökülen Azmak Nehri'nin hemen kıyısında, rüzgarın hiç eksik olmadığı eşsiz bir konumda yer alıyoruz.", : "Gökova Körfezi'nin kristal sularına dökülen Azmak Nehri'nin hemen kıyısında, rüzgarın hiç eksik olmadığı eşsiz bir konumda yer alıyoruz.",
description2: lang === "en" description2: lang === "en"
@@ -353,12 +353,12 @@ export default async function Home({ params }: { params: Promise<{ lang: string
<div className="grid grid-cols-1 md:grid-cols-3 gap-4"> <div className="grid grid-cols-1 md:grid-cols-3 gap-4">
{activities.length > 0 ? ( {activities.length > 0 ? (
activities.map((act, i) => ( activities.map((act, i) => (
<ScrollReveal <ScrollReveal
key={act.id} key={act.id}
className={i === 0 || i === 3 ? "md:col-span-2" : ""} className={activities.length === 1 ? "md:col-span-3" : 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}
@@ -376,12 +376,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>
+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 && (
+23 -29
View File
@@ -9,16 +9,16 @@ 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();
@@ -46,22 +46,21 @@ export default function Navbar() {
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
/> />
@@ -75,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>
); );
@@ -103,13 +100,12 @@ export default function Navbar() {
{/* Lang Toggle */} {/* Lang Toggle */}
<Link <Link
href={getToggleHref()} href={getToggleHref()}
className={`flex items-center gap-1.5 text-[11px] font-bold tracking-[0.12em] uppercase transition-colors hover:text-accent ${ className={`flex items-center gap-1.5 text-[11px] font-bold tracking-[0.12em] uppercase transition-colors hover:text-accent ${scrolled
scrolled
? "text-dark" ? "text-dark"
: isHome : isHome
? "text-white" ? "text-white"
: "text-dark" : "text-dark"
}`} }`}
> >
<Globe size={14} /> <Globe size={14} />
<span>{currentLang === "tr" ? "EN" : "TR"}</span> <span>{currentLang === "tr" ? "EN" : "TR"}</span>
@@ -119,9 +115,8 @@ export default function Navbar() {
{/* 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} />}
@@ -150,9 +145,8 @@ 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>
+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: '/**',
},
], ],
}, },
}; };