Skip to content

Commit adc6ad7

Browse files
author
Adam Plesnik
committed
Use CenterLayout
1 parent 82eae5c commit adc6ad7

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

docs/src/layouts/Page.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@ import { ScrollRestoration } from 'react-router-dom'
33
import PageBackground from '../components/PageBackground'
44
import Footer from '../partials/Footer'
55
import Nav from '../partials/Nav'
6+
import CenterLayout from './CenterLayout'
67

78
function Page({ children }: PropsWithChildren<PageProps>) {
89
return (
910
<div className="flex flex-col items-center justify-center">
1011
<PageBackground />
1112
<Nav />
12-
<div className="relative z-10 w-full max-w-screen-lg p-8 md:p-16 lg:p-20">
13+
<CenterLayout className="pt-12">
1314
<div className="w-full">{children}</div>
1415
<Footer />
15-
</div>
16+
</CenterLayout>
17+
1618
<ScrollRestoration />
1719
</div>
1820
)

docs/src/partials/Nav.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
import { Github } from "lucide-react";
2-
import DarkModeSwitch from "../components/DarkModeSwitch.tsx";
3-
import HeaderNavAnchor from "../components/HeaderNavAnchor.tsx";
1+
import { Github } from 'lucide-react'
2+
import DarkModeSwitch from '../components/DarkModeSwitch.tsx'
3+
import HeaderNavAnchor from '../components/HeaderNavAnchor.tsx'
4+
import CenterLayout from '../layouts/CenterLayout.tsx'
45

56
const Nav = () => {
67
return (
78
<div className="sticky top-0 z-20 flex w-full items-stretch justify-center border-b border-b-slate-200/50 bg-white/20 text-zinc-800 shadow-lg backdrop-blur-sm dark:border-b-slate-600/50 dark:bg-slate-800/60 dark:text-zinc-300">
8-
<div className="flex w-full max-w-screen-lg items-stretch gap-2 px-8 py-2 md:px-16 lg:px-20">
9+
<CenterLayout className="flex items-stretch gap-2 py-2 sm:py-3">
910
<HeaderNavAnchor to="/">How To</HeaderNavAnchor>
1011
<HeaderNavAnchor to="/docs">Docs</HeaderNavAnchor>
1112
<HeaderNavAnchor to="/tech">Tech</HeaderNavAnchor>
@@ -18,9 +19,9 @@ const Nav = () => {
1819
>
1920
<Github className="group-hover:animate-bounce-bottom" />
2021
</a>
21-
</div>
22+
</CenterLayout>
2223
</div>
23-
);
24-
};
24+
)
25+
}
2526

26-
export default Nav;
27+
export default Nav

0 commit comments

Comments
 (0)