+
+ {#if post.image}
+
+ {/if}
+
+
+
+
{post.title}
+
+
+ {post.description}
+
+
+
+
+
+
+ {/key}
\ No newline at end of file
diff --git a/src/app/frontend/src/lib/config.ts b/src/app/frontend/src/lib/config.ts
new file mode 100644
index 0000000..f6628b1
--- /dev/null
+++ b/src/app/frontend/src/lib/config.ts
@@ -0,0 +1,4 @@
+import { dev } from "$app/environment"
+export const title = "Mailcom"
+export const description = "Donate your old mail to charity."
+export const url = dev ? "http://localhost:5173" : "https://mailcom.edu"
\ No newline at end of file
diff --git a/src/app/frontend/src/lib/utils.ts b/src/app/frontend/src/lib/utils.ts
new file mode 100644
index 0000000..18d0c32
--- /dev/null
+++ b/src/app/frontend/src/lib/utils.ts
@@ -0,0 +1,8 @@
+type DateStyle = Intl.DateTimeFormatOptions["dateStyle"]
+
+export function formatDate(date: string, dateStyle: DateStyle = "medium", locales = "en") {
+ // Safari is mad about dashes in the date
+ const dateToFormat = new Date(date.replaceAll("-", "/"))
+ const dateFormatter = new Intl.DateTimeFormat(locales, { dateStyle })
+ return dateFormatter.format(dateToFormat)
+}
\ No newline at end of file
diff --git a/src/app/frontend/src/posts/sample_post.md b/src/app/frontend/src/posts/sample_post.md
new file mode 100644
index 0000000..a67f866
--- /dev/null
+++ b/src/app/frontend/src/posts/sample_post.md
@@ -0,0 +1,19 @@
+---
+title: "Mailcom is kicking off!"
+description: "This is the kick-off post to start this blog."
+date: "2025-01-23"
+image: /images/logo.png
+categories:
+ - blog
+published: true
+---
+
+## Contents
+
+## Introduction
+
+This is Mailcom's first blog post!
+
+## What is new
+
+You may now reach Mailcom's website via the www.
\ No newline at end of file
diff --git a/src/app/frontend/src/routes/+layout.js b/src/app/frontend/src/routes/+layout.js
index c8cacf0..5c73c14 100644
--- a/src/app/frontend/src/routes/+layout.js
+++ b/src/app/frontend/src/routes/+layout.js
@@ -1 +1,9 @@
-export const prerender = true;
\ No newline at end of file
+export const prerender = true;
+
+export const load = ({ url }) => {
+ const { pathname } = url;
+
+ return {
+ pathname
+ };
+};
\ No newline at end of file
diff --git a/src/app/frontend/src/routes/+layout.svelte b/src/app/frontend/src/routes/+layout.svelte
index 6a18f38..ea43b1b 100644
--- a/src/app/frontend/src/routes/+layout.svelte
+++ b/src/app/frontend/src/routes/+layout.svelte
@@ -4,11 +4,14 @@
import { goto } from '$app/navigation';
import './global.css';
+ import { fade } from 'svelte/transition';
function gotoDonate() {
goto('/donation');
}
+ export let data: { pathname: string };
+