From 63ac9eadd83b11b6c2dbcbca577fe6fd927c779e Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Fri, 13 Sep 2024 17:00:03 -0700 Subject: [PATCH] feat: Main page cover --- src/routes/+layout.svelte | 35 +++++++++------- src/routes/+page.svelte | 86 ++++++++++++++++++++++++++++++++++++++- src/routes/sitemap.ts | 5 +++ 3 files changed, 109 insertions(+), 17 deletions(-) create mode 100644 src/routes/sitemap.ts diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 9fb3626..dca3aaf 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,22 +1,27 @@ -
-
- {#each routes as item, i} - {#if i > 0} - - {/if} - {item.name} - {/each} + +{#if $page.url.pathname != "/"} +
+
+ {#each routes as item, i} + {#if i > 0} + + {/if} + {item.name} + {/each} +
-
+{/if} + + diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index a570836..30e00ad 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,2 +1,84 @@ -

Home Page

-

This is the home page

+ + +
+
+ +
+
+

This is a very long description

+
+
+ Bio + {#each routes as item} + {#if item.route !== "/"} + + {item.name} + {/if} + {/each} +
+
+
+
+
+

Home Page

+

This is the home page. You have scrolled {scrollPosition} / {scrollHeight}, progress: {progress}

+
+ + + + + diff --git a/src/routes/sitemap.ts b/src/routes/sitemap.ts new file mode 100644 index 0000000..a6becab --- /dev/null +++ b/src/routes/sitemap.ts @@ -0,0 +1,5 @@ +export const routes: { route: string, name: string }[] = [ + { route: "/", name: "Home" }, + { route: "/post", name: "Blog" }, + { route: "/about", name: "About" }, +];