125 lines
5.8 KiB
TypeScript
125 lines
5.8 KiB
TypeScript
import { Marcellus } from 'next/font/google';
|
||
import '@/app/globals.css';
|
||
import Link from 'next/link';
|
||
import { Users, LayoutDashboard, LogOut } from 'lucide-react';
|
||
|
||
const marcellus = Marcellus({
|
||
subsets: ['latin'],
|
||
variable: '--font-marcellus',
|
||
weight: ['400'],
|
||
});
|
||
|
||
export const metadata = {
|
||
title: 'Kozmos Admin',
|
||
description: 'Kozmos Beach & More - Yönetim Paneli',
|
||
};
|
||
|
||
export default function AdminLayout({
|
||
children,
|
||
}: {
|
||
children: React.ReactNode;
|
||
}) {
|
||
return (
|
||
<html lang="tr" className={`${marcellus.variable}`}>
|
||
<body className="bg-gray-50 text-gray-900 font-body antialiased flex min-h-screen">
|
||
|
||
{/* Sidebar */}
|
||
<aside className="w-64 bg-charcoal text-cream flex flex-col shadow-2xl">
|
||
{/* Header */}
|
||
<div className="p-6 border-b border-gray-700 flex items-center justify-center">
|
||
<img src="/logo.png" alt="Kozmos Logo" className="h-12 brightness-0 invert opacity-90 object-contain" />
|
||
</div>
|
||
|
||
<nav className="flex-1 p-4 space-y-2">
|
||
<Link
|
||
href="/admin"
|
||
className="flex items-center gap-3 px-4 py-3 rounded-lg hover:bg-gray-800 transition-colors"
|
||
>
|
||
<LayoutDashboard className="w-5 h-5" />
|
||
<span>Dashboard</span>
|
||
</Link>
|
||
|
||
<Link
|
||
href="/admin/admins"
|
||
className="flex items-center gap-3 px-4 py-3 rounded-lg hover:bg-gray-800 transition-colors"
|
||
>
|
||
<Users className="w-5 h-5" />
|
||
<span>Admin Yönetimi</span>
|
||
</Link>
|
||
|
||
<Link
|
||
href="/admin/events"
|
||
className="flex items-center gap-3 px-4 py-3 rounded-lg hover:bg-gray-800 transition-colors"
|
||
>
|
||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>
|
||
<span>Etkinlik Yönetimi</span>
|
||
</Link>
|
||
|
||
<Link
|
||
href="/admin/about"
|
||
className="flex items-center gap-3 px-4 py-3 rounded-lg hover:bg-gray-800 transition-colors"
|
||
>
|
||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>
|
||
<span>Hakkımızda Yönetimi</span>
|
||
</Link>
|
||
|
||
<Link
|
||
href="/admin/beach"
|
||
className="flex items-center gap-3 px-4 py-3 rounded-lg hover:bg-gray-800 transition-colors"
|
||
>
|
||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><circle cx="12" cy="12" r="10"></circle><path d="M12 2v20"></path><path d="M2 12h20"></path></svg>
|
||
<span>Plaj Yönetimi</span>
|
||
</Link>
|
||
|
||
<Link
|
||
href="/admin/gallery"
|
||
className="flex items-center gap-3 px-4 py-3 rounded-lg hover:bg-gray-800 transition-colors"
|
||
>
|
||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline></svg>
|
||
<span>Galeri Yönetimi</span>
|
||
</Link>
|
||
|
||
<Link
|
||
href="/admin/contact"
|
||
className="flex items-center gap-3 px-4 py-3 rounded-lg hover:bg-gray-800 transition-colors"
|
||
>
|
||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg>
|
||
<span>İletişim & Konum</span>
|
||
</Link>
|
||
</nav>
|
||
|
||
<div className="p-4 border-t border-gray-700 space-y-2">
|
||
<a
|
||
href="/"
|
||
className="flex items-center gap-3 px-4 py-3 rounded-lg hover:bg-gray-800 transition-colors text-gray-400 hover:text-white"
|
||
>
|
||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>
|
||
<span>Siteye Git</span>
|
||
</a>
|
||
|
||
<form action={async () => {
|
||
"use server";
|
||
const { logout } = await import("@/app/actions/auth");
|
||
await logout();
|
||
}}>
|
||
<button
|
||
type="submit"
|
||
className="w-full flex items-center gap-3 px-4 py-3 rounded-lg hover:bg-red-900/50 transition-colors text-red-400 hover:text-red-300"
|
||
>
|
||
<LogOut className="w-5 h-5" />
|
||
<span>Çıkış Yap</span>
|
||
</button>
|
||
</form>
|
||
</div>
|
||
</aside>
|
||
|
||
{/* Main Content */}
|
||
<main className="flex-1 overflow-y-auto">
|
||
{children}
|
||
</main>
|
||
|
||
</body>
|
||
</html>
|
||
);
|
||
}
|