diff --git a/src/lib/posts/NewsVerticalCard.svelte b/src/lib/posts/NewsVerticalCard.svelte
index 1b0e77e..b7e6acf 100644
--- a/src/lib/posts/NewsVerticalCard.svelte
+++ b/src/lib/posts/NewsVerticalCard.svelte
@@ -13,7 +13,7 @@
-
+
diff --git a/src/routes/+layout.server.ts b/src/routes/+layout.server.ts
index d8d824f..f30d800 100644
--- a/src/routes/+layout.server.ts
+++ b/src/routes/+layout.server.ts
@@ -3,25 +3,16 @@
* for all posts on the website.
*/
-import { posts } from './post/posts_data';
-
-// Basically the same as Post but might contain less infomation - save storage
-type Summary = {
- url : string,
- title : string,
- summary : string,
- creation_date : number,
- modification_date: number,
-};
+import { type Post, posts } from './posts/posts_data';
export function load() {
- let summaries : Summary[] = [];
+ let summaries : Post[] = [];
// Sort by newest news first
posts.sort((a, b) => b.creation_date - a.creation_date);
posts.map((post) => {
- let summary : Summary = {
+ let summary : Post = {
url: post.url,
title : post.title,
summary : post.summary,
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index bdf3082..2cb234c 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -1,5 +1,5 @@
+
+{#if data}
+ {data.post.title}
+{/if}
+
-
-
-
diff --git a/src/routes/post/+layout.ts b/src/routes/post/+layout.ts
new file mode 100644
index 0000000..cb8edfb
--- /dev/null
+++ b/src/routes/post/+layout.ts
@@ -0,0 +1,17 @@
+import { posts, type Post } from '../posts/posts_data';
+
+export interface BlogData {
+ summaries: Post[],
+ post: Post
+}
+
+export async function load({ url, parent }) : Promise {
+ const { summaries } = await parent();
+ const websiteUrl = url.pathname.split('/');
+ const windowUrl = websiteUrl.pop() || websiteUrl.pop(); // Handle trailing /
+
+ return {
+ summaries: summaries,
+ post: posts.filter((post) => post.url == windowUrl)[0],
+ };
+}
diff --git a/src/routes/post/folder-icons/+page.svelte b/src/routes/post/folder-icons/+page.svelte
index e69de29..4d08b3c 100644
--- a/src/routes/post/folder-icons/+page.svelte
+++ b/src/routes/post/folder-icons/+page.svelte
@@ -0,0 +1,2 @@
+Lorem ipsum dolor sit amet, officia excepteur ex fugiat reprehenderit enim labore culpa sint ad nisi Lorem pariatur mollit ex esse exercitation amet. Nisi anim cupidatat excepteur officia. Reprehenderit nostrud nostrud ipsum Lorem est aliquip amet voluptate voluptate dolor minim nulla est proident. Nostrud officia pariatur ut officia. Sit irure elit esse ea nulla sunt ex occaecat reprehenderit commodo officia dolor Lorem duis laboris cupidatat officia voluptate. Culpa proident adipisicing id nulla nisi laboris ex in Lorem sunt duis officia eiusmod. Aliqua reprehenderit commodo ex non excepteur duis sunt velit enim. Voluptate laboris sint cupidatat ullamco ut ea consectetur et est culpa et culpa duis.
+
diff --git a/src/routes/post/+page.svelte b/src/routes/posts/+page.svelte
similarity index 97%
rename from src/routes/post/+page.svelte
rename to src/routes/posts/+page.svelte
index 0508ba4..eccaa16 100644
--- a/src/routes/post/+page.svelte
+++ b/src/routes/posts/+page.svelte
@@ -24,7 +24,7 @@
{/if}
{#each matched_posts as summary}