b8405ced07
Adds the public viewing surface in the UI — shareable, no-login pages backed by the redaction-safe /api/v1/public API: - /p/[treeId]: tree name + searchable people directory (living people show as "Living person"; counts; links to person pages). - /p/[treeId]/persons/[personId]: person detail — events, alternate names, and parents/partners/children as links to other public person pages. - app/p/layout.tsx: slim public header (logo + Sign in), no app sidebar. - robots.ts: allow /p/, disallow the authenticated app sections. - Trees list: a "Public page ↗" link on every non-private tree so the owner can grab the shareable URL. Client-rendered (same-origin fetch via Caddy). Follow-up (needs a frontend SSR→backend base URL + a compose/env deploy step, so not auto-applied by Watchtower): true server-rendering for SEO, a dynamic sitemap of public trees, and per-page noindex for unlisted/site_members. tsc clean; next build passes (both routes dynamic). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Justin Paul <justin@jpaul.me>
22 lines
890 B
TypeScript
22 lines
890 B
TypeScript
import Link from "next/link";
|
|
|
|
// Public viewing surface — no auth, no app sidebar. A slim header only.
|
|
export default function PublicLayout({ children }: { children: React.ReactNode }) {
|
|
return (
|
|
<div className="min-h-screen">
|
|
<header className="border-b border-[var(--border)]">
|
|
<div className="mx-auto flex max-w-5xl items-center justify-between px-4 py-3">
|
|
<Link href="/" aria-label="Provenance — home" className="flex items-center">
|
|
{/* eslint-disable-next-line @next/next/no-img-element */}
|
|
<img src="/provenance-logo-plain.svg" alt="Provenance" className="h-6 w-auto" />
|
|
</Link>
|
|
<Link href="/login" className="text-sm text-bronze hover:underline">
|
|
Sign in
|
|
</Link>
|
|
</div>
|
|
</header>
|
|
<main className="mx-auto max-w-5xl px-4 py-8">{children}</main>
|
|
</div>
|
|
);
|
|
}
|