diff --git a/docs/app/[...slug]/layout.tsx b/docs/app/[...slug]/layout.tsx index 9da640cec..bdd4db497 100644 --- a/docs/app/[...slug]/layout.tsx +++ b/docs/app/[...slug]/layout.tsx @@ -1,10 +1,18 @@ import { source } from '@/lib/source'; -import { DocsLayout } from 'fumadocs-ui/layouts/docs'; +import { DocsLayout } from 'fumadocs-ui/layouts/notebook'; import { baseOptions } from '@/lib/layout.shared'; +import { SectionSwitcher } from '@/components/shared/section-switcher'; +import { SidebarScrollKeeper } from '@/components/shared/sidebar-scroll-keeper'; export default function Layout({ children }: LayoutProps<'/[...slug]'>) { return ( - + }} + sidebar={{ tabs: false }} + > + {children} ); diff --git a/docs/app/[...slug]/page.tsx b/docs/app/[...slug]/page.tsx index a9d9aa78c..09337b8d1 100644 --- a/docs/app/[...slug]/page.tsx +++ b/docs/app/[...slug]/page.tsx @@ -1,5 +1,5 @@ import { getPageImage, getPageMarkdown, source } from '@/lib/source'; -import { DocsBody, DocsDescription, DocsPage, DocsTitle } from 'fumadocs-ui/layouts/docs/page'; +import { DocsBody, DocsDescription, DocsPage, DocsTitle } from 'fumadocs-ui/layouts/notebook/page'; import { notFound } from 'next/navigation'; import { getMDXComponents } from '@/mdx-components'; import type { Metadata } from 'next'; @@ -17,8 +17,8 @@ export default async function Page(props: PageProps<'/[...slug]'>) { return ( {page.data.title} - {page.data.description} -
+ {page.data.description} +
code { + background: var(--wd-code-bg); + color: var(--wd-code-fg); + border: 0; + border-radius: 5px; + padding: 0.12em 0.4em; + font-size: 0.86em; + font-weight: 500; +} + +/* Code blocks: a flat panel on a hairline. */ +#nd-page figure.shiki { + border-radius: 8px; + border-color: var(--wd-line); + background: var(--wd-soft); + box-shadow: none; +} +#nd-page figure.shiki > div:first-child:not(:only-child) { + border-color: var(--wd-line); + color: var(--wd-muted); +} + +/* Tables: hairlines and a quiet header. */ +#nd-page .prose table { + font-size: 14px; +} +#nd-page .prose th { + font-weight: 500; + font-size: 12.5px; + color: var(--wd-muted); + background: var(--wd-soft); +} +#nd-page .prose :where(table) { + border-color: var(--wd-line); +} + +/* Callouts: a flat slate panel; the icon carries the colour. */ +#nd-page [role='note'], +#nd-page .prose > div:has(> svg + div) { + border-radius: 8px; + box-shadow: none; +} + +/* Cards (Related guides and the like). */ +#nd-page a[data-card] { + border-radius: 8px; + border-color: var(--wd-line); + background: var(--color-fd-background); + transition: border-color 150ms ease, box-shadow 150ms ease; +} +#nd-page a[data-card]:hover { + background: var(--color-fd-background); + border-color: color-mix(in oklab, var(--wd-faint) 60%, transparent); + box-shadow: 0 10px 30px -18px rgba(15, 23, 42, 0.35); +} +#nd-page a[data-card] h3 { + font-weight: 500; + color: var(--wd-heading); +} + +/* Steps: an ink counter. */ +#nd-page .fd-step::before { + background: var(--wd-ink); + color: var(--wd-ink-fg); + font-weight: 500; +} + +/* Previous / next footer. */ +#nd-page footer a { + border-radius: 8px; + border-color: var(--wd-line); +} +#nd-page footer a:hover { + background: var(--wd-soft); +} + +/* The page actions under the title: small rounded ghost buttons. */ +#nd-page .wd-actions button, +#nd-page .wd-actions a { + height: 30px; + border-radius: 999px; + padding-inline: 12px; + font-size: 12.5px; + background: var(--color-fd-background); + border: 1px solid var(--wd-line); + color: var(--wd-heading); +} +#nd-page .wd-actions button:hover, +#nd-page .wd-actions a:hover { + background: var(--wd-soft); +} + +/* Dashboard screenshots: a plain frame on a hairline, no backdrop. */ +#nd-page .prose img { + border-radius: 8px; + border: 1px solid var(--wd-line); + box-shadow: 0 18px 40px -28px rgba(15, 23, 42, 0.35); + margin-block: 1.75em; +} + +/* Folded detail: a hairline row per section, its heading as the toggle. */ +#nd-page .wd-fold { + border-top: 1px solid var(--wd-line); +} +#nd-page .wd-fold:last-of-type { + border-bottom: 1px solid var(--wd-line); +} +#nd-page .wd-fold > summary { + display: flex; + align-items: center; + gap: 12px; + cursor: pointer; + list-style: none; + padding: 14px 2px; + color: var(--wd-muted); +} +#nd-page .wd-fold > summary::-webkit-details-marker { + display: none; +} +#nd-page .wd-fold > summary :is(h2, h3) { + margin: 0; + padding: 0; + border: 0; + font-size: 17px; + letter-spacing: -0.01em; +} +#nd-page .wd-fold > summary :is(h2, h3) a { + pointer-events: none; +} +#nd-page .wd-fold > summary:hover :is(h2, h3) { + color: var(--color-fd-primary); +} +#nd-page .wd-fold-body { + padding: 0 2px 20px; +} +#nd-page .wd-fold-body > :first-child { + margin-top: 0; +} +/* Short "good to know" lists at the top of a guide. */ +#nd-page .prose h2#good-to-know + ul { + margin-top: 0.5em; +} +/* A tall drawer screenshot reads at drawer size, not stretched across the column. */ +#nd-page .prose img[src$='mailbox-warmup.webp'] { + max-width: min(100%, 560px); +} + +/* The short version box on Learn pages: a plain list, no prose spacing. */ +.wd-short-body ul { + list-style: disc; + padding-left: 1.15em; +} +.wd-short-body li { + margin: 0.2em 0; +} +.wd-short-body li::marker { + color: var(--wd-faint); +} +.wd-short-body p { + margin: 0; +} +.wd-short-body code { + border-radius: 4px; + background: var(--wd-code-bg); + padding: 0.1em 0.35em; + font-size: 0.88em; +} diff --git a/docs/app/layout.tsx b/docs/app/layout.tsx index fb47ff03d..36e8d258a 100644 --- a/docs/app/layout.tsx +++ b/docs/app/layout.tsx @@ -1,6 +1,6 @@ -import { RootProvider } from 'fumadocs-ui/provider/next'; import './global.css'; import { Inter } from 'next/font/google'; +import { Provider } from '@/components/shared/provider'; import { KeyboardShortcutsProvider } from '@/components/shared/KeyboardShortcutsProvider'; import type { Metadata } from 'next'; @@ -21,13 +21,11 @@ export default function Layout({ children }: { children: React.ReactNode }) { return ( - {/* `type: 'static'` pairs with the staticGET search route so search runs - client-side from a prebuilt index (works on a static build). */} - + {children} - + ); diff --git a/docs/app/page.tsx b/docs/app/page.tsx index ff046e5d6..48b3fa5cb 100644 --- a/docs/app/page.tsx +++ b/docs/app/page.tsx @@ -1,27 +1,25 @@ import type { Metadata } from 'next'; +import { Redirect } from '@/components/shared/redirect'; -const TARGET = '/guides/mailboxes/'; +const TARGET = '/guides/'; export const metadata: Metadata = { title: 'Warmbly Documentation', robots: { index: false }, }; -// No docs landing page. The inline script navigates while the HTML is still -// parsing, so this page never paints; the meta refresh and the link are the -// no-JS fallbacks (both work on static hosts). +// The docs start on Getting started. The meta refresh works on any static host +// without JS; the client redirect covers navigation inside the app. export default function Home() { return ( <> -