Compare commits
3
Commits
69ea1a9f7a
...
f542efb324
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f542efb324 | ||
|
|
a09200ce63 | ||
|
|
e55074cf31 |
@@ -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"
|
||||
|
||||
+3
-6
@@ -386,7 +386,7 @@ export default async function Home({ params }: { params: Promise<{ lang: string
|
||||
className={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}
|
||||
@@ -404,12 +404,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 && (
|
||||
|
||||
+51
-23
@@ -5,20 +5,20 @@ import Link from "next/link";
|
||||
import Image from "next/image";
|
||||
import { usePathname } from "next/navigation";
|
||||
import { motion, AnimatePresence } from "framer-motion";
|
||||
import { Menu, X } from "lucide-react";
|
||||
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();
|
||||
|
||||
@@ -30,15 +30,26 @@ export default function Navbar() {
|
||||
|
||||
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 (
|
||||
<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">
|
||||
@@ -63,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>
|
||||
);
|
||||
@@ -87,14 +96,27 @@ export default function Navbar() {
|
||||
>
|
||||
Rezervasyon
|
||||
</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>
|
||||
|
||||
{/* 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} />}
|
||||
@@ -123,14 +145,20 @@ 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>
|
||||
</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
|
||||
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"
|
||||
|
||||
@@ -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