@@ -14,9 +14,7 @@ import { toolbarPinnedAtom } from "./atoms.ts";
1414export function App ( ) {
1515 return (
1616 < main className = "flex flex-col items-center" >
17- < a href = "#" className = "font-fancy m-8 text-center text-5xl md:text-6xl" >
18- < h1 > Ma'at</ h1 >
19- </ a >
17+ < Header />
2018 < ErrorBoundary FallbackComponent = { Fallback } >
2119 < Suspense fallback = { < Loading /> } >
2220 < ToolbarContainer />
@@ -47,19 +45,31 @@ function Fallback({ error }: FallbackProps) {
4745 ) ;
4846}
4947
50- function ToolbarContainer ( ) {
48+ function Header ( ) {
5149 const toolbarPinned = useAtomValue ( toolbarPinnedAtom ) ;
5250 return (
53- < div
51+ < a
52+ href = "#"
5453 className = { clsx (
55- "flex w-full flex-col items -center" ,
56- toolbarPinned && "scroll-state sticky top-0 z-10 " ,
54+ "font-fancy z-11 w-full p-8 text -center text-5xl md:text-6xl " ,
55+ toolbarPinned && "bg-base-100 " ,
5756 ) }
57+ >
58+ < h1 > Ma'at</ h1 >
59+ </ a >
60+ ) ;
61+ }
62+
63+ function ToolbarContainer ( ) {
64+ const toolbarPinned = useAtomValue ( toolbarPinnedAtom ) ;
65+ return (
66+ < div
67+ className = { clsx ( "flex w-full flex-col items-center" , toolbarPinned && "sticky top-0 z-10" ) }
5868 >
5969 < nav
6070 className = { clsx (
61- "border-base-300 bg-base-100 toolbar-card mx-4 flex flex-col items-center rounded-(--radius-box) border p-4 transition " ,
62- "stuck-top: border-t-base-100 stuck-top: border-x-base-100 stuck-top: w-full stuck-top: rounded-none stuck-top: px-8 stuck-top:shadow-lg ",
71+ "border-base-300 bg-base-100 toolbar-card mx-4 flex flex-col items-center rounded-(--radius-box) border p-4" ,
72+ toolbarPinned && " border-t-base-100 border-x-base-100 w-full rounded-none px-8",
6373 ) }
6474 >
6575 < Toolbar />
0 commit comments