d49c9aa225
Admin & site: - @tailwindcss/typography ekle → editör ve yayın içeriği prose stilleriyle düzgün render - Favicon: logo.png'den kare app/icon.png + apple-icon.png, varsayılan favicon.ico kaldırıldı - SEO keyword: seo_settings.default_keywords + seo_pages.keywords + buildMetadata birleştirme - Menü düzeni admin'den yönetilebilir (site_settings.nav_items, /admin/menu, header & mobile-menu refactor) SEO: - app/sitemap.ts (statik + blog/hizmet/çözüm/proje/sektör dinamik) - app/robots.ts (sitemap ref + /admin,/api disallow) - app/llms.txt/route.ts (AI/LLM rehberi) - BlogPosting/Service/FAQ/Article JSON-LD wire (json-ld bileşenleri bağlandı) - buildMetadata: blog/proje OG görseli + type article + keywords birleştirme düzeltmesi - blog tags → keyword
91 lines
2.8 KiB
TypeScript
91 lines
2.8 KiB
TypeScript
"use client";
|
||
|
||
import Image from "next/image";
|
||
import Link from "next/link";
|
||
import { usePathname } from "next/navigation";
|
||
import {
|
||
LayoutDashboard,
|
||
Settings,
|
||
Newspaper,
|
||
Layers,
|
||
Boxes,
|
||
Briefcase,
|
||
MessageSquareQuote,
|
||
Search,
|
||
Inbox,
|
||
Image as ImageIcon,
|
||
Users as UsersIcon,
|
||
Building2,
|
||
ListOrdered,
|
||
type LucideIcon,
|
||
} from "lucide-react";
|
||
|
||
type Item = { href: string; label: string; icon: LucideIcon };
|
||
|
||
const items: Item[] = [
|
||
{ href: "/admin", label: "Pano", icon: LayoutDashboard },
|
||
{ href: "/admin/site", label: "Site Ayarları", icon: Settings },
|
||
{ href: "/admin/menu", label: "Menü Düzeni", icon: ListOrdered },
|
||
{ href: "/admin/blog", label: "Blog", icon: Newspaper },
|
||
{ href: "/admin/hizmetler", label: "Hizmetler", icon: Layers },
|
||
{ href: "/admin/cozumler", label: "Çözümler", icon: Boxes },
|
||
{ href: "/admin/projeler", label: "Projeler", icon: Briefcase },
|
||
{ href: "/admin/sektorler", label: "Sektörler", icon: Building2 },
|
||
{ href: "/admin/ekip", label: "Ekip", icon: UsersIcon },
|
||
{ href: "/admin/referanslar", label: "Referanslar", icon: MessageSquareQuote },
|
||
{ href: "/admin/seo", label: "SEO", icon: Search },
|
||
{ href: "/admin/iletisim", label: "Mesajlar", icon: Inbox },
|
||
{ href: "/admin/medya", label: "Medya", icon: ImageIcon },
|
||
];
|
||
|
||
export function AdminSidebar() {
|
||
const pathname = usePathname();
|
||
|
||
return (
|
||
<aside className="hidden w-64 shrink-0 border-r border-[var(--border)] bg-white md:flex md:flex-col">
|
||
<Link
|
||
href="/admin"
|
||
className="flex items-center gap-3 border-b border-[var(--border)] px-5 py-4"
|
||
>
|
||
<Image src="/logo.png" alt="Kovak Yazılım" width={36} height={36} />
|
||
<div>
|
||
<p className="text-sm font-semibold text-[var(--navy)]">Kovak Yazılım</p>
|
||
<p className="text-xs text-[var(--muted)]">Yönetim Paneli</p>
|
||
</div>
|
||
</Link>
|
||
|
||
<nav className="flex-1 space-y-1 p-3">
|
||
{items.map((it) => {
|
||
const active =
|
||
it.href === "/admin"
|
||
? pathname === "/admin"
|
||
: pathname.startsWith(it.href);
|
||
const Icon = it.icon;
|
||
return (
|
||
<Link
|
||
key={it.href}
|
||
href={it.href}
|
||
className={`flex items-center gap-3 rounded-lg px-3 py-2 text-sm transition ${
|
||
active
|
||
? "bg-[var(--navy)] text-white"
|
||
: "text-[var(--muted)] hover:bg-[var(--navy-50)] hover:text-[var(--navy)]"
|
||
}`}
|
||
>
|
||
<Icon className="size-4" />
|
||
{it.label}
|
||
</Link>
|
||
);
|
||
})}
|
||
</nav>
|
||
|
||
<Link
|
||
href="/"
|
||
target="_blank"
|
||
className="border-t border-[var(--border)] px-5 py-3 text-xs text-[var(--muted)] hover:text-[var(--navy)]"
|
||
>
|
||
↗ Siteyi görüntüle
|
||
</Link>
|
||
</aside>
|
||
);
|
||
}
|