added blog entry
This commit is contained in:
@@ -1,6 +1,20 @@
|
||||
<script lang="ts">
|
||||
import Banner2 from "$lib/banner2.svelte";
|
||||
import Content from "$lib/viewport/content.svelte";
|
||||
import Gallery, { type GalleryEntry } from "$lib/lists/gallery.svelte";
|
||||
import { posts, type BlogPostDetails } from "./posts";
|
||||
|
||||
let entries: GalleryEntry[] = posts.entries().map(mapEntries).toArray();
|
||||
|
||||
function mapEntries(m: [String, BlogPostDetails], index: number): GalleryEntry {
|
||||
return {
|
||||
title: `${m[1].title}`,
|
||||
subtitle: `#${posts.size - index} // ${m[1].date}, ${m[1].time}`,
|
||||
img: `/blog/${m[0]}/${m[1].banner}`,
|
||||
link: `/blog/${m[0]}/`,
|
||||
imgAlt: `Preview image for ${m[1].title}`,
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@@ -11,5 +25,5 @@
|
||||
<Banner2
|
||||
title="Blog" />
|
||||
|
||||
<p>content coming soon!</p>
|
||||
<Gallery entries={entries} reverseTextOrder />
|
||||
</Content>
|
||||
Reference in New Issue
Block a user