From 3d470ccf73764174e8ca47da20423fa91ac92a23 Mon Sep 17 00:00:00 2001 From: Elias Almqvist Date: Thu, 27 Feb 2025 23:27:57 -0800 Subject: [PATCH] front page --- src/app/page.tsx | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 06cfbbd..c5e1da8 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -15,7 +15,7 @@ type PostMeta = { async function getRecentPosts(): Promise { const postsDirectory = path.join(process.cwd(), 'content/essays'); const files = await fs.readdir(postsDirectory); - + const posts = await Promise.all( files .filter(file => file.endsWith('.mdx')) @@ -23,7 +23,7 @@ async function getRecentPosts(): Promise { const fullPath = path.join(postsDirectory, file); const fileContents = await fs.readFile(fullPath, 'utf8'); const { data } = matter(fileContents); - + return { title: data.title, createdAt: data.createdAt, @@ -34,14 +34,14 @@ async function getRecentPosts(): Promise { return posts .sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()) - .slice(0, 2); // Get only the 2 most recent posts + .slice(0, 4); // Get only the 4 most recent posts } export default async function Home() { const recentPosts = await getRecentPosts(); return ( -
+
{/* Intro */}
@@ -50,13 +50,21 @@ export default async function Home() {
-

- CEO of{" "} - - Exa Laboratories (YC S24) - - . Building energy-efficient chips for AI training & inference. -

+
+

+ CEO of{" "} + + Exa Laboratories (YC S24) + + . Building energy-efficient chips for AI training & inference. +

+

+ I'm a dropout, autodidactic polymath, and this is my digital notebook. Everything here is written by me, and everything here is my own opinion or philosophical beliefs. They are not intended to be taken at face value, but rather as a medium for me to personally reflect on my own thoughts as a therapeutic exercise, or just for fun. +

+

+ Based in the Silicon Valley (San Francisco Bay Area), United States. Originally from Mölndal/Gothenburg, Sweden. +

+
{/* Recent Essays */} @@ -70,7 +78,7 @@ export default async function Home() {
    {recentPosts.map((post) => (
  • -