- Add docs pages (getting-started, changelog, keyboard-shortcuts) - Add blog, community, and legal pages (privacy, terms, EULA) - Add site header, footer, download button, and nav components - Add sitemap and robots.txt generation - Narrow main page container (max-w-2xl), fix footer positioning - Switch README feature list to colon style
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
"use client";
|
|
|
|
import Link from "next/link";
|
|
import { usePathname } from "next/navigation";
|
|
import { navItems } from "./docs-nav-items";
|
|
|
|
export function DocsPager() {
|
|
const pathname = usePathname();
|
|
const index = navItems.findIndex((item) => item.href === pathname);
|
|
const prev = index > 0 ? navItems[index - 1] : null;
|
|
const next = index < navItems.length - 1 ? navItems[index + 1] : null;
|
|
|
|
if (!prev && !next) return null;
|
|
|
|
return (
|
|
<nav className="flex items-center justify-between mt-12 pt-6 border-t border-border text-[14px]">
|
|
{prev ? (
|
|
<Link
|
|
href={prev.href}
|
|
className="flex items-center gap-1.5 text-muted hover:text-foreground transition-colors"
|
|
>
|
|
<span aria-hidden>←</span>
|
|
{prev.title}
|
|
</Link>
|
|
) : (
|
|
<span />
|
|
)}
|
|
{next ? (
|
|
<Link
|
|
href={next.href}
|
|
className="flex items-center gap-1.5 text-muted hover:text-foreground transition-colors"
|
|
>
|
|
{next.title}
|
|
<span aria-hidden>→</span>
|
|
</Link>
|
|
) : (
|
|
<span />
|
|
)}
|
|
</nav>
|
|
);
|
|
}
|