Skip to content

Commit

Permalink
#13 feat: aside
Browse files Browse the repository at this point in the history
  • Loading branch information
M1n01 committed Jan 18, 2025
1 parent 881269e commit f4c0edd
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/app/blog/[id]/Aside.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"use client";

import { AppShell } from "@mantine/core";

export default function BlogContentAside() {
return (
<AppShell.Aside>
<h1>BlogContentAside</h1>
</AppShell.Aside>
);
}
7 changes: 7 additions & 0 deletions src/app/blog/[id]/TableOfContents.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"use client";

import { TableOfContents } from "@mantine/core";

export const TableOfContent = ({ children }: { children: React.ReactNode }) => {
return <TableOfContents>{children}</TableOfContents>;
};
23 changes: 23 additions & 0 deletions src/app/blog/[id]/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"use client";

import { AppShell } from "@mantine/core";
import BlogContentAside from "./Aside";

export default function BlogContentLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<AppShell
aside={{
width: 300,
breakpoint: "md",
collapsed: { desktop: false, mobile: true },
}}
>
<BlogContentAside />
{children}
</AppShell>
);
}

0 comments on commit f4c0edd

Please sign in to comment.