Styled everything and build the skeleton

This commit is contained in:
2026-06-07 15:20:01 +02:00
parent 826565c922
commit 87dab6e5a1
22 changed files with 1381 additions and 51 deletions
+10 -1
View File
@@ -2,11 +2,20 @@
import Base from "../layouts/Base.astro";
import Topbar from "../components/Topbar.astro";
import Sidebar from "../components/Sidebar.astro";
import { getCollection } from 'astro:content';
const posts = await getCollection('posts', ({ data }) => data.published === true);
posts.sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf());
---
<Base title="home">
<Topbar slot="topbar" />
<Sidebar slot="sidebar" />
<h1>hello world</h1>
{posts.map((post) => (
<div class="p-4 mb-3 rounded-lg bg-ctp-surface">
<a href={`/posts/${post.id}`} class="text-ctp-accent">{post.data.title}</a>
<p class="text-ctp-subtext text-xs">{post.data.date.toDateString()}</p>
</div>
))}
</Base>