Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: switch to partial navigation #1865

Merged
merged 1 commit into from Oct 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions www/routes/docs/[...slug].tsx
@@ -1,5 +1,5 @@
import { Handlers, PageProps } from "$fresh/server.ts";
import { asset, Head } from "$fresh/runtime.ts";
import { asset, Head, Partial } from "$fresh/runtime.ts";
import DocsSidebar from "../../components/DocsSidebar.tsx";
import DocsTitle from "../../components/DocsTitle.tsx";
import Footer from "../../components/Footer.tsx";
Expand Down Expand Up @@ -155,7 +155,7 @@ export default function DocsPage(props: PageProps<Data>) {
<meta property="og:image" content={ogImageUrl} />
<meta name="view-transition" content="same-origin" />
</Head>
<div class="flex flex-col min-h-screen">
<div class="flex flex-col min-h-screen" f-client-nav>
<Header title="docs" active="/docs" />
<Main page={props.data.page} />
<Footer />
Expand Down Expand Up @@ -192,7 +192,9 @@ function Main(props: { page: Page }) {
</div>
<div class="mx-auto max-w-screen-xl flex gap-6 md:gap-8">
<DesktopSidebar page={props.page} />
<Content page={props.page} />
<Partial name="docs-main">
<Content page={props.page} />
</Partial>
</div>
</div>
);
Expand Down