From 2ebaca1b8ff56963f72adba02750a4013332fc2e Mon Sep 17 00:00:00 2001 From: hybridherbst Date: Tue, 9 Apr 2024 21:46:52 +0200 Subject: [PATCH] cleanup for loading items --- web/src/routes/+layout.svelte | 24 +++++++++++++++++++++++- web/src/routes/[...path]/+page.server.ts | 2 +- web/src/routes/[...path]/+page.svelte | 4 +--- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/web/src/routes/+layout.svelte b/web/src/routes/+layout.svelte index e12f1a36..2062282a 100644 --- a/web/src/routes/+layout.svelte +++ b/web/src/routes/+layout.svelte @@ -1,2 +1,24 @@ - \ No newline at end of file + + +
+

Data from usd-wg/assets

+

+ Made by @hybridherbst + from Needle + and prefrontal cortex

+
+ + \ No newline at end of file diff --git a/web/src/routes/[...path]/+page.server.ts b/web/src/routes/[...path]/+page.server.ts index a876e027..645ce11f 100644 --- a/web/src/routes/[...path]/+page.server.ts +++ b/web/src/routes/[...path]/+page.server.ts @@ -57,7 +57,7 @@ export async function load({ params }) { const path = params.path; const currentDir = dirs?.find(child => child.path === path || child.path === path + "/"); - const currentItem = items?.find(item => item.path === path); + const currentItem = items?.find(item => item.path === path || item.path + "/" === path); // console.log("Loading page: " + path + ", currentDir: " + currentDir + ", currentItem: " + currentItem); diff --git a/web/src/routes/[...path]/+page.svelte b/web/src/routes/[...path]/+page.svelte index bc4c5359..a3ef0ad5 100644 --- a/web/src/routes/[...path]/+page.svelte +++ b/web/src/routes/[...path]/+page.svelte @@ -1,9 +1,7 @@