Skip to content

Commit 7b9f329

Browse files
committed
More based paths
1 parent bef5cdd commit 7b9f329

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/lib/Navbar/navbar.svelte

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import Menu from "$lib/Menu/Menu.svelte";
33
import MenuItem from "$lib/Menu/MenuItem.svelte";
44
import { isActive } from "$lib";
5+
import { base } from "$app/paths";
56
67
let { pageName = "" } = $props();
78
@@ -21,7 +22,7 @@
2122

2223
<ul id="navbar">
2324
<li class="navbar-item {isActive('BreadBird Games', pageNames)}" id="logo">
24-
<a href="/"><img src="/Logo.png" alt="home" /></a>
25+
<a href="/"><img src="{base}/Logo.png" alt="home" /></a>
2526
</li>
2627
<!-- margin left auto to move to the right, also moves all children after to the right -->
2728
<li style="margin-left: auto;">
@@ -30,7 +31,7 @@
3031

3132
{#each Object.entries(modules) as [_path, module]}
3233
<MenuItem
33-
path="/games/{_path
34+
path="{base}/games/{_path
3435
.replace('../../routes/games/', '')
3536
.replace('/+page.svelte', '')}"
3637
title={
@@ -45,7 +46,7 @@
4546
</Menu>
4647
</li>
4748
<li class="navbar-item {isActive('About', pageNames)}">
48-
<a href="/about"><span id="about">About Us!</span></a>
49+
<a href="{base}/about"><span id="about">About Us!</span></a>
4950
</li>
5051
</ul>
5152

0 commit comments

Comments
 (0)