Skip to content

Commit 776a721

Browse files
docs: switch to partial navigation (freshframework#1865)
1 parent 7737c60 commit 776a721

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

www/routes/docs/[...slug].tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Handlers, PageProps } from "$fresh/server.ts";
2-
import { asset, Head } from "$fresh/runtime.ts";
2+
import { asset, Head, Partial } from "$fresh/runtime.ts";
33
import DocsSidebar from "../../components/DocsSidebar.tsx";
44
import DocsTitle from "../../components/DocsTitle.tsx";
55
import Footer from "../../components/Footer.tsx";
@@ -155,7 +155,7 @@ export default function DocsPage(props: PageProps<Data>) {
155155
<meta property="og:image" content={ogImageUrl} />
156156
<meta name="view-transition" content="same-origin" />
157157
</Head>
158-
<div class="flex flex-col min-h-screen">
158+
<div class="flex flex-col min-h-screen" f-client-nav>
159159
<Header title="docs" active="/docs" />
160160
<Main page={props.data.page} />
161161
<Footer />
@@ -192,7 +192,9 @@ function Main(props: { page: Page }) {
192192
</div>
193193
<div class="mx-auto max-w-screen-xl flex gap-6 md:gap-8">
194194
<DesktopSidebar page={props.page} />
195-
<Content page={props.page} />
195+
<Partial name="docs-main">
196+
<Content page={props.page} />
197+
</Partial>
196198
</div>
197199
</div>
198200
);

0 commit comments

Comments
 (0)