<script lang="ts">
	import type { PageData } from "./$types";
	import PostCard from "$lib/components/PostCard.svelte";

	let { data }: { data: PageData } = $props();
</script>

<svelte:head>
	<title>wenekar sucks at programming</title>
	<meta
		name="description"
		content="A personal blog built with SvelteKit and MDsveX"
	/>
</svelte:head>

<section>
	{#if data.posts.length === 0}
		<p>No posts.</p>
	{:else}
		{#each data.posts as post}
			<PostCard {post} />
		{/each}
	{/if}
</section>
