fix: adjust modal layout, improve image ratio, remove price fields, update next.config
This commit is contained in:
@@ -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>
|
||||
|
||||
<div className="flex justify-between items-center pt-6 border-t border-sand">
|
||||
<div>
|
||||
<span className="text-2xl font-bold text-dark">{act.price}</span>
|
||||
</div>
|
||||
<div className="flex-1"></div>
|
||||
<Link
|
||||
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"
|
||||
|
||||
+8
-11
@@ -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 events = await prisma.event.findMany({ where: { lang }, orderBy: { date: "asc" } });
|
||||
const dbFeatures = await prisma.feature.findMany({ where: { lang }, orderBy: { order: "asc" } });
|
||||
|
||||
|
||||
const aboutDb = await prisma.aboutSection.findUnique({ where: { lang } });
|
||||
const aboutData = aboutDb || {
|
||||
badge: lang === "en" ? "Our Story" : "Hikayemiz",
|
||||
titleLine1: lang === "en" ? "In the" : "Doğanın",
|
||||
titleLine2: lang === "en" ? "Heart of Nature" : "Kalbinde",
|
||||
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."
|
||||
: "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"
|
||||
@@ -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">
|
||||
{activities.length > 0 ? (
|
||||
activities.map((act, i) => (
|
||||
<ScrollReveal
|
||||
key={act.id}
|
||||
className={i === 0 || i === 3 ? "md:col-span-2" : ""}
|
||||
<ScrollReveal
|
||||
key={act.id}
|
||||
className={activities.length === 1 ? "md:col-span-3" : i === 0 || i === 3 ? "md:col-span-2" : ""}
|
||||
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
|
||||
src={act.image}
|
||||
alt={act.title}
|
||||
@@ -376,12 +376,9 @@ export default async function Home({ params }: { params: Promise<{ lang: string
|
||||
{act.description}
|
||||
</p>
|
||||
)}
|
||||
{i !== 0 && (
|
||||
<span className="text-white/60 text-xs">{act.price}</span>
|
||||
)}
|
||||
{i === 0 && (
|
||||
<span className="inline-flex items-center gap-2 text-white text-sm font-semibold">
|
||||
{act.price} <ArrowRight className="w-3.5 h-3.5" />
|
||||
<span className="inline-flex items-center gap-2 text-white text-sm font-semibold hover:text-accent transition-colors">
|
||||
<ArrowRight className="w-3.5 h-3.5" />
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -93,7 +93,7 @@ export async function addActivity(prevState: any, formData: FormData) {
|
||||
lang: formData.get("lang") as string,
|
||||
title: formData.get("title") 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,
|
||||
badge: formData.get("badge") as string || null,
|
||||
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,
|
||||
title: formData.get("title") 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,
|
||||
badge: formData.get("badge") as string || null,
|
||||
order: parseInt(formData.get("order") as string || "0", 10),
|
||||
|
||||
@@ -92,7 +92,7 @@ export default function ActivitiesClient({ activities }: { activities: Activity[
|
||||
<tr>
|
||||
<th className="px-8 py-5">Başlık</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>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -103,7 +103,7 @@ export default function ActivitiesClient({ activities }: { activities: Activity[
|
||||
<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>
|
||||
</td>
|
||||
<td className="px-8 py-5 font-medium">{act.price}</td>
|
||||
|
||||
<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">
|
||||
<button
|
||||
@@ -132,10 +132,10 @@ export default function ActivitiesClient({ activities }: { activities: Activity[
|
||||
|
||||
{/* Modal */}
|
||||
{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="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">
|
||||
<h2 className="text-2xl font-bold font-serif text-dark">
|
||||
{editingActivity ? "Aktivite Düzenle" : "Yeni Aktivite Ekle"}
|
||||
@@ -145,7 +145,7 @@ export default function ActivitiesClient({ activities }: { activities: Activity[
|
||||
</button>
|
||||
</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">
|
||||
|
||||
{error && (
|
||||
@@ -189,18 +189,6 @@ export default function ActivitiesClient({ activities }: { activities: Activity[
|
||||
/>
|
||||
</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>
|
||||
<label className="block text-xs font-bold text-gray-500 tracking-wider uppercase mb-2">Rozet (Opsiyonel)</label>
|
||||
<input
|
||||
|
||||
@@ -132,10 +132,10 @@ export default function EventsClient({ events }: { events: Event[] }) {
|
||||
|
||||
{/* Modal */}
|
||||
{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="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">
|
||||
<h2 className="text-2xl font-bold font-serif text-dark">
|
||||
{editingEvent ? "Etkinlik Düzenle" : "Yeni Etkinlik Ekle"}
|
||||
@@ -145,7 +145,7 @@ export default function EventsClient({ events }: { events: Event[] }) {
|
||||
</button>
|
||||
</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">
|
||||
|
||||
{error && (
|
||||
|
||||
+23
-29
@@ -9,16 +9,16 @@ import { Menu, X, Globe } from "lucide-react";
|
||||
|
||||
const navLinks = [
|
||||
// { name: "Odalar", href: "/odalar" },
|
||||
{ name: "Aktiviteler",href: "/aktiviteler"},
|
||||
{ name: "Restoran", href: "/restoran" },
|
||||
{ name: "Etkinlikler",href: "/etkinlikler"},
|
||||
{ name: "Galeri", href: "/galeri" },
|
||||
{ name: "Aktiviteler", href: "/aktiviteler" },
|
||||
{ name: "Restoran", href: "/restoran" },
|
||||
{ name: "Etkinlikler", href: "/etkinlikler" },
|
||||
|
||||
{ name: "Hakkımızda", href: "/hakkimizda" },
|
||||
{ name: "İletişim", href: "/iletisim" },
|
||||
{ name: "İletişim", href: "/iletisim" },
|
||||
];
|
||||
|
||||
export default function Navbar() {
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const [scrolled, setScrolled] = useState(false);
|
||||
const pathname = usePathname();
|
||||
|
||||
@@ -46,22 +46,21 @@ export default function Navbar() {
|
||||
|
||||
return (
|
||||
<nav
|
||||
className={`fixed top-0 left-0 right-0 z-50 transition-all duration-500 ${
|
||||
scrolled
|
||||
className={`fixed top-0 left-0 right-0 z-50 transition-all duration-500 ${scrolled
|
||||
? "bg-white/95 backdrop-blur-md shadow-sm py-4"
|
||||
: "bg-transparent py-6"
|
||||
}`}
|
||||
}`}
|
||||
>
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div className="flex justify-between items-center">
|
||||
|
||||
{/* Logo */}
|
||||
<Link href="/" className="flex-shrink-0 flex items-center group">
|
||||
<Image
|
||||
src="/logo.png"
|
||||
alt="Kite Beach Logo"
|
||||
width={140}
|
||||
height={48}
|
||||
<Image
|
||||
src="/logo.png"
|
||||
alt="Kite Beach Logo"
|
||||
width={140}
|
||||
height={48}
|
||||
className={`object-contain transition-all duration-300 ${!scrolled && isHome ? 'brightness-0 invert' : ''}`}
|
||||
priority
|
||||
/>
|
||||
@@ -75,19 +74,17 @@ export default function Navbar() {
|
||||
<Link
|
||||
key={link.name}
|
||||
href={link.href}
|
||||
className={`text-[13px] font-medium transition-colors relative group ${
|
||||
scrolled
|
||||
className={`text-[13px] font-medium transition-colors relative group ${scrolled
|
||||
? active ? "text-primary" : "text-foreground hover:text-primary"
|
||||
: isHome
|
||||
? active ? "text-accent" : "text-white/85 hover:text-white"
|
||||
: active ? "text-primary" : "text-foreground hover:text-primary"
|
||||
}`}
|
||||
}`}
|
||||
>
|
||||
{link.name}
|
||||
<span
|
||||
className={`absolute -bottom-0.5 left-0 h-px bg-current transition-all duration-300 ${
|
||||
active ? "w-full" : "w-0 group-hover:w-full"
|
||||
}`}
|
||||
className={`absolute -bottom-0.5 left-0 h-px bg-current transition-all duration-300 ${active ? "w-full" : "w-0 group-hover:w-full"
|
||||
}`}
|
||||
/>
|
||||
</Link>
|
||||
);
|
||||
@@ -103,13 +100,12 @@ export default function Navbar() {
|
||||
{/* 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
|
||||
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>
|
||||
@@ -119,9 +115,8 @@ export default function Navbar() {
|
||||
{/* Mobile toggle */}
|
||||
<button
|
||||
onClick={() => setIsOpen(!isOpen)}
|
||||
className={`flex md:hidden p-1 transition-colors ${
|
||||
scrolled ? "text-dark" : isHome ? "text-white" : "text-dark"
|
||||
}`}
|
||||
className={`flex md:hidden p-1 transition-colors ${scrolled ? "text-dark" : isHome ? "text-white" : "text-dark"
|
||||
}`}
|
||||
aria-label="Menü"
|
||||
>
|
||||
{isOpen ? <X size={26} /> : <Menu size={26} />}
|
||||
@@ -150,9 +145,8 @@ export default function Navbar() {
|
||||
>
|
||||
<Link
|
||||
href={link.href}
|
||||
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"
|
||||
}`}
|
||||
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"
|
||||
}`}
|
||||
>
|
||||
{link.name}
|
||||
</Link>
|
||||
|
||||
@@ -16,6 +16,18 @@ const nextConfig: NextConfig = {
|
||||
port: '',
|
||||
pathname: '/**',
|
||||
},
|
||||
{
|
||||
protocol: 'https',
|
||||
hostname: '**.fbcdn.net',
|
||||
port: '',
|
||||
pathname: '/**',
|
||||
},
|
||||
{
|
||||
protocol: 'https',
|
||||
hostname: '**.cdninstagram.com',
|
||||
port: '',
|
||||
pathname: '/**',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user