From e6e1baf8081a6fed0c770727ed2593a4a567ff32 Mon Sep 17 00:00:00 2001 From: robin Date: Sat, 16 Sep 2023 10:04:38 +0000 Subject: [PATCH] homepage nav --- frontend/src/lib/components/Footer.svelte | 3 +++ frontend/src/lib/components/Menu/Menu.svelte | 21 ++++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/frontend/src/lib/components/Footer.svelte b/frontend/src/lib/components/Footer.svelte index 2f134bb..d4709d1 100644 --- a/frontend/src/lib/components/Footer.svelte +++ b/frontend/src/lib/components/Footer.svelte @@ -4,6 +4,7 @@ let nextpage = $navigation?.pages[0] $: nextpage = $navigation?.pages[0] function getNextPage(pages) { + console.log(pages, "pages") if (location.pathname == "/" || location.pathname == "") return let currPage = pages.find( @@ -26,6 +27,7 @@ } else { blackBg = false } + getNextPage($navigation.pages) if (location.pathname.split("/").filter((s) => s).length >= 2) { @@ -37,6 +39,7 @@ let showNext = true $: { if ($rerender) { + if (location.pathname != "/") { getNextPage($navigation.pages) } diff --git a/frontend/src/lib/components/Menu/Menu.svelte b/frontend/src/lib/components/Menu/Menu.svelte index e71cb79..29265ea 100644 --- a/frontend/src/lib/components/Menu/Menu.svelte +++ b/frontend/src/lib/components/Menu/Menu.svelte @@ -14,16 +14,17 @@
{#each $navigation.pages as page} - + {#if Object.values($pages)?.find((o) => o.id == page.page)?.path !== "/"} + {/if} {/each}