basic set-up; started work on projects page
This commit is contained in:
@@ -1,5 +1,29 @@
|
||||
<script lang="ts">
|
||||
import Header from "$lib/header.svelte";
|
||||
import BannerTitle from "$lib/banner-title.svelte";
|
||||
// import type { DevlogPost } from "./posts";
|
||||
import { posts } from "./posts";
|
||||
</script>
|
||||
|
||||
<Header />
|
||||
<Header />
|
||||
<BannerTitle title="Devlog Posts" />
|
||||
|
||||
<main>
|
||||
{#each posts as post}
|
||||
{@render devlogPost({ imgSrc: "", title: "{post.title}" })}
|
||||
<p>{post.date}</p>
|
||||
{/each}
|
||||
</main>
|
||||
|
||||
{#snippet devlogPost({
|
||||
imgSrc,
|
||||
title,
|
||||
}: {
|
||||
imgSrc: string;
|
||||
title: string;
|
||||
})}
|
||||
<div>
|
||||
<img src='{imgSrc}'>
|
||||
<p>{title}</p>
|
||||
</div>
|
||||
{/snippet}
|
||||
23
src/routes/projects/projectn5/devlog/posts.ts
Normal file
23
src/routes/projects/projectn5/devlog/posts.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
export interface DevlogPost {
|
||||
title: string;
|
||||
date: Date;
|
||||
imgSrc: string;
|
||||
};
|
||||
|
||||
export const posts: DevlogPost[] = [
|
||||
{
|
||||
title: "title",
|
||||
date: new Date("2025-01-01"),
|
||||
imgSrc: "",
|
||||
},
|
||||
{
|
||||
title: "titasdfle",
|
||||
date: new Date("2025-02-03"),
|
||||
imgSrc: "",
|
||||
},
|
||||
{
|
||||
title: "titl435345e",
|
||||
date: new Date("2025-01-01"),
|
||||
imgSrc: "",
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user