From b59ded9c0db88ba7dc0bd1db2f44929b786e815e Mon Sep 17 00:00:00 2001 From: Elias Almqvist Date: Thu, 27 Feb 2025 22:57:45 -0800 Subject: [PATCH] fixes and changes --- src/app/[...dir]/page.tsx | 8 ++++---- src/app/{posts => essays}/page.tsx | 0 src/app/layout.tsx | 3 +-- src/components/layout/header.tsx | 10 +++++----- src/components/layout/nav.tsx | 8 ++++---- 5 files changed, 14 insertions(+), 15 deletions(-) rename src/app/{posts => essays}/page.tsx (100%) diff --git a/src/app/[...dir]/page.tsx b/src/app/[...dir]/page.tsx index 35b94d5..5d80d0d 100644 --- a/src/app/[...dir]/page.tsx +++ b/src/app/[...dir]/page.tsx @@ -22,13 +22,13 @@ async function getPost(slug: string[]): Promise { const postName = slug[1]; const postsDirectory = path.join(process.cwd(), 'content/essays'); - + try { const fullPath = path.join(postsDirectory, `${postName}.mdx`); const fileContents = await fs.readFile(fullPath, 'utf8'); - + const { data, content } = matter(fileContents); - + return { title: data.title, createdAt: data.createdAt, @@ -58,7 +58,7 @@ const Page = async ({ params }: { params: { dir: string[] } }) => { )} - {children} diff --git a/src/components/layout/header.tsx b/src/components/layout/header.tsx index 126a7f1..dede854 100644 --- a/src/components/layout/header.tsx +++ b/src/components/layout/header.tsx @@ -15,16 +15,16 @@ const Header = () => ( href="/" className="flex flex-row items-center gap-x-2 hover:opacity-80 transition-opacity" > - +

collected sayings of an insane sane person

-
- - +
+ {/* */} +
- + {/* */} ); export default Header; diff --git a/src/components/layout/nav.tsx b/src/components/layout/nav.tsx index b2043d6..7b6d8c1 100644 --- a/src/components/layout/nav.tsx +++ b/src/components/layout/nav.tsx @@ -69,16 +69,16 @@ const NavCommand: React.FC = ({ className, ...props }) => { { - router.push("/posts"); + router.push("/essays"); })} > - Posts + Essays ⌘P - + {/* { setTheme(theme === "light" ? "dark" : "light"); @@ -90,7 +90,7 @@ const NavCommand: React.FC = ({ className, ...props }) => { ⌘L - + */} {NavLinks.map((link) => (