update homepage draft and other pages

This commit is contained in:
2026-08-29 11:38:16 +00:00
parent 6452331ee7
commit 97ff9852cd
38 changed files with 2185 additions and 111 deletions

View File

@@ -0,0 +1,28 @@
<script lang="ts">
import { enhance } from '$app/forms';
let { data } = $props();
let createNewArticlePopup = $state(false);
</script>
<div class="text-center py-8 gap-2 flex align-center justify-center">
<h1 class="text-2xl">Blog (Stan's yapping corner)</h1>
<button onclick={() => createNewArticlePopup = true} class="bg-gray-800 rounded px-4 py-2 text-white font-bold">Write new article</button>
</div>
{#each data.blogArticles as article}
<div class="flex">
<a href="/blog/${article.slug}">{article.title}</a>
<p>{article.createdAt?.toDateString()}</p>
</div>
{/each}
{#if createNewArticlePopup}
<form method="POST" use:enhance>
<div>
<h2>Create New Article</h2>
</div>
</form>
{/if}