-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs - Layout and responsive navigation (#270)
Co-authored-by: Barnaby Bishop <barneyb@gmail.com>
- Loading branch information
1 parent
9b7deda
commit 5d229ad
Showing
30 changed files
with
7,548 additions
and
7,970 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
docs/src/app/docs/[slug]/page.tsx → docs/src/app/(public)/docs/[slug]/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import '../../../styles/global.css'; | ||
import { SideNav } from '../../../components/navigation/side-nav'; | ||
import { NavGroup } from '../../../components/navigation/nav-group'; | ||
import { NavItem } from '../../../components/navigation/nav-item'; | ||
import { DocsFooter } from '../../../components/footer'; | ||
import { TableOfContents } from '../../../components/navigation/toc'; | ||
import { getNavigationMap } from '../../../utils/reader'; | ||
|
||
export const metadata = { | ||
title: 'Keystatic - Docs', | ||
description: 'Documentation for Keystatic.', | ||
}; | ||
|
||
export default async function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
const navigationMap = await getNavigationMap(); | ||
|
||
return ( | ||
<div className="max-w-7xl min-h-screen mx-auto"> | ||
<SideNav> | ||
{navigationMap?.map(({ groupName, items }) => ( | ||
<NavGroup key={groupName} title={groupName}> | ||
{items.map(({ label, href, title }) => ( | ||
<NavItem | ||
key={href} | ||
label={label} | ||
href={href} | ||
title={title} | ||
level="sub" | ||
/> | ||
))} | ||
</NavGroup> | ||
))} | ||
</SideNav> | ||
|
||
{/** CONTENT */} | ||
<div className="px-6 flex-1 lg:pl-60 lg:pt-24"> | ||
<div className="py-10 lg:pl-12"> | ||
<main className="flex gap-8"> | ||
{/** INNER CONTENT */} | ||
<div className="flex-1">{children}</div> | ||
|
||
{/** TOCs */} | ||
<TableOfContents /> | ||
</main> | ||
|
||
<DocsFooter /> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
20 changes: 2 additions & 18 deletions
20
docs/src/app/docs/page.tsx → docs/src/app/(public)/docs/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import Hero from '../../components/hero'; | ||
import Intro from '../../components/intro'; | ||
import Templates from '../../components/templates'; | ||
import MailingList from '../../components/mailing-list'; | ||
import CallToAction from '../../components/call-to-action'; | ||
import Footer from '../../components/footer'; | ||
|
||
export default function Homepage() { | ||
return ( | ||
<> | ||
<main> | ||
<Hero /> | ||
<Intro /> | ||
<Templates /> | ||
<MailingList /> | ||
<CallToAction /> | ||
</main> | ||
<Footer /> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import PrivacyPolicy from '../../../components/privacy-policy'; | ||
import Footer from '../../../components/footer'; | ||
|
||
export default function PrivacyPolicyPage() { | ||
return ( | ||
<> | ||
<main> | ||
<PrivacyPolicy /> | ||
</main> | ||
<Footer /> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
5d229ad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
keystatic-site – ./docs
keystatic-site.vercel.app
keystatic-site-thinkmill-labs.vercel.app
keystatic-site-git-docs-thinkmill-labs.vercel.app