| 1 | import Link from "next/link"; |
| 2 | import { buildPageMetadata } from "@/lib/page-meta"; |
| 3 | import { TOOLS_COPY } from "@/lib/content/tools"; |
| 4 | import type { LocalizedText } from "@/lib/content/vocabulary"; |
| 5 | import { pickText } from "@/lib/i18n/dictionaries"; |
| 6 | |
| 7 | export async function generateMetadata({ params }: { params: Promise<{ locale: string }> }) { |
| 8 | const { locale } = await params; |
| 9 | return buildPageMetadata({ |
| 10 | path: "/docs/tools", locale, |
| 11 | title: pickText(TOOLS_COPY.metaTitle, locale), |
| 12 | description: pickText(TOOLS_COPY.metaDescription, locale), |
| 13 | }); |
| 14 | } |
| 15 | |
| 16 | export default async function ToolsPage({ params }: { params: Promise<{ locale: string }> }) { |
| 17 | const { locale } = await params; |
| 18 | const t = (copy: LocalizedText) => pickText(copy, locale); |
| 19 | return ( |
| 20 | <section className="space-y-10"> |
| 21 | <section id="overview" className="scroll-mt-32"> |
| 22 | <h1 className="font-display text-3xl mb-1">{t(TOOLS_COPY.title)}</h1> |
| 23 | <p className="text-ink-soft mt-3 leading-relaxed">{t(TOOLS_COPY.lead)}</p> |
| 24 | <Link href="https://github.com/Hmbown/CodeWhale/blob/main/docs/TOOL_SURFACE.md" className="body-link"> |
| 25 | {t(TOOLS_COPY.reference)} |
| 26 | </Link> |
| 27 | <div className="hairline-t hairline-b mt-6"> |
| 28 | {TOOLS_COPY.rows.map((row) => ( |
| 29 | <div key={row.name} className="grid md:grid-cols-12 gap-0 hairline-t py-3 px-4 hover:bg-paper-deep transition-colors min-w-0"> |
| 30 | <div className="md:col-span-3 font-display text-sm font-semibold break-words">{row.name}</div> |
| 31 | <div className="md:col-span-9 font-mono text-[0.78rem] text-ink-soft leading-relaxed break-words min-w-0">{t(row.detail)}</div> |
| 32 | </div> |
| 33 | ))} |
| 34 | </div> |
| 35 | </section> |
| 36 | <section id="compatibility" className="scroll-mt-32"> |
| 37 | <h2 className="font-display text-2xl mb-1">{t(TOOLS_COPY.compatibilityTitle)}</h2> |
| 38 | <p className="text-ink-soft mt-3 leading-relaxed">{t(TOOLS_COPY.compatibility)}</p> |
| 39 | <Link href="https://github.com/Hmbown/CodeWhale/blob/main/docs/RUNTIME_SIMPLIFICATION_DESIGN.md" className="inline-block mt-3 font-mono text-xs uppercase tracking-wider text-indigo hover:underline"> |
| 40 | docs/RUNTIME_SIMPLIFICATION_DESIGN.md → |
| 41 | </Link> |
| 42 | </section> |
| 43 | </section> |
| 44 | ); |
| 45 | } |
| 46 |