Skip to content

Production-ready animations, transitions, backgrounds, and scenes for Remotion

feat: use the docs frame as the container on every page

kapishdima0bc92d983634
diff --git a/app/(home)/components/page-shell.tsx b/app/(home)/components/page-shell.tsx
index 49cd032a..956ea82f 100644
--- a/app/(home)/components/page-shell.tsx
+++ b/app/(home)/components/page-shell.tsx
@@ -1,4 +1,5 @@
import type { ReactNode } from "react";
+import { DOCS_LAYOUT, docsLayoutVars } from "@/lib/docs-layout";
import { cn } from "@/lib/utils";
export function PageShell({
@@ -10,6 +11,7 @@ export function PageShell({
}) {
return (
<div
+ style={docsLayoutVars(DOCS_LAYOUT)}
className={cn(
"page-shell relative flex min-h-screen flex-col font-sans text-foreground antialiased",
className,
diff --git a/app/(home)/components/site-header.tsx b/app/(home)/components/site-header.tsx
index 898e9e33..3435ede9 100644
--- a/app/(home)/components/site-header.tsx
+++ b/app/(home)/components/site-header.tsx
@@ -41,7 +41,7 @@ export function SiteHeader({
className="relative z-40 overflow-x-clip"
style={headerLayoutVars(HEADER_LAYOUT)}
>
- <LandingMenu className="group/header relative mx-auto flex w-full max-w-content items-center justify-between gap-4 px-4 xl:gap-2 py-3 md:px-10 lg:pt-(--hdr-top) lg:pb-0 xl:px-0">
+ <LandingMenu className="group/header relative mx-auto flex w-full max-w-(--docs-frame) items-center justify-between gap-4 px-4 xl:gap-2 py-3 md:px-10 lg:pt-(--hdr-top) lg:pb-0 xl:px-(--docs-gutter)">
<HeaderPill />
<div
className={cn(
diff --git a/app/docs/layout.tsx b/app/docs/layout.tsx
index 345175e4..192296bd 100644
--- a/app/docs/layout.tsx
+++ b/app/docs/layout.tsx
@@ -45,15 +45,14 @@ export default function Layout({ children }: { children: ReactNode }) {
className="contents"
style={docsLayoutVars(DOCS_LAYOUT)}
>
- {/* The docs grid is wider than the landing column: at `xl` the
- shared header stretches to the docs frame (`lib/docs-layout.ts`), and sits
- 20px from the top like the docs artboards (28px on the landing). */}
- <div className="lg:[&>header>div]:pt-5 xl:[&>header>div]:max-w-(--docs-frame) xl:[&>header>div]:px-(--docs-gutter)">
+ {/* The header sits 20px from the top like the docs artboards (28px
+ on the landing). */}
+ <div className="lg:[&>header>div]:pt-5">
<SiteHeader mobileAction={<HeaderSearch />} />
</div>
<DocsShell models={models}>{children}</DocsShell>
- {/* Same frame for the footer, with the docs' hairline on top. */}
- <div className="border-hairline lg:border-t lg:pt-7 lg:[&>footer]:pb-8 xl:[&_.landing-container]:max-w-(--docs-frame) xl:[&_.landing-container]:px-(--docs-gutter)">
+ {/* The footer gets the docs' hairline on top. */}
+ <div className="border-hairline lg:border-t lg:pt-7 lg:[&>footer]:pb-8">
<SiteFooter />
</div>
</div>
diff --git a/app/globals.css b/app/globals.css
index 84d1512d..284749be 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -343,9 +343,8 @@
@apply mx-auto w-full max-w-6xl px-4 sm:px-6 min-[1440px]:max-w-5xl;
}
-/* Landing container: 1240px content inside the 100px desktop gutter. */
.landing-container {
- @apply mx-auto w-full max-w-content px-5 md:px-10 xl:px-0;
+ @apply mx-auto w-full max-w-(--docs-frame) px-5 md:px-10 xl:px-(--docs-gutter);
}
.control-surface {