Initial commit: Setup Astro website with blog, projects, work experience and search functionality

This commit is contained in:
Spaghet committed 2025-08-13 00:29:17 -04:00
1 parent 8546ac140d
commit 1f1bf6e08b
85 files changed
+23712 -1

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
---
import { type CollectionEntry, getCollection } from "astro:content"
import PageLayout from "@layouts/PageLayout.astro"
import TopLayout from "@layouts/TopLayout.astro"
import BottomLayout from "@layouts/BottomLayout.astro"
import Search from "@components/Search"
import { SEARCH } from "@consts"
const posts = (await getCollection("blog"))
.filter(post => !post.data.draft)
const projects = (await getCollection("projects"))
.filter(post => !post.data.draft)
const data = [...posts, ...projects] as CollectionEntry<"blog">[]
---
<PageLayout title={SEARCH.TITLE} description={SEARCH.DESCRIPTION}>
<TopLayout>
<div class="animate page-heading">
{SEARCH.TITLE}
</div>
</TopLayout>
<BottomLayout>
<div class="animate">
<Search client:load data={data}/>
</div>
</BottomLayout>
</PageLayout>