Skip to content

Commit

Permalink
uase base path in links
Browse files Browse the repository at this point in the history
  • Loading branch information
vcoppe committed Jun 19, 2024
1 parent 3a8dd9a commit bf37789
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions website/src/lib/components/Menu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import { _, locale } from 'svelte-i18n';
import { languages } from '$lib/languages';
import { goto } from '$app/navigation';
import { base } from '$app/paths';
const {
distanceUnits,
Expand Down Expand Up @@ -262,7 +263,7 @@
bind:value={$locale}
onValueChange={(value) => {
if (value) {
goto('/' + (value === 'en' ? '' : value));
goto(base + '/' + (value === 'en' ? '' : value));
}
}}
>
Expand Down Expand Up @@ -306,8 +307,11 @@
</Menubar.Menu>
</Menubar.Root>
<div class="h-fit flex flex-row items-center ml-1 gap-1">
<Button variant="ghost" href="/about" target="_blank" class="cursor-default h-fit rounded-sm"
>{$_('menu.about')}</Button
<Button
variant="ghost"
href="{base}/about"
target="_blank"
class="cursor-default h-fit rounded-sm">{$_('menu.about')}</Button
>
<Button
variant="ghost"
Expand Down

0 comments on commit bf37789

Please sign in to comment.