diff options
Diffstat (limited to 'src/routes/tools')
| -rw-r--r-- | src/routes/tools/+page.svelte | 3 | ||||
| -rw-r--r-- | src/routes/tools/[tool]/+page.svelte | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/routes/tools/+page.svelte b/src/routes/tools/+page.svelte index f5cbe36a..edc18410 100644 --- a/src/routes/tools/+page.svelte +++ b/src/routes/tools/+page.svelte @@ -2,6 +2,7 @@ import HeadTitle from '$lib/Home/HeadTitle.svelte'; import Picker from '$lib/Tools/Picker.svelte'; import { tools } from '$lib/Tools/tools.js'; + import root from '$lib/Utility/root'; let tool = 'default'; </script> @@ -17,7 +18,7 @@ {#each Object.keys(tools) as t} {#if t !== 'default'} <li> - <a href={`/tools/${tools[t].id}`} on:click={() => (tool = t)}>{tools[t].name}</a> + <a href={root(`/tools/${tools[t].id}`)} on:click={() => (tool = t)}>{tools[t].name}</a> {#if tools[t].description} <blockquote>{tools[t].description}</blockquote> {/if} diff --git a/src/routes/tools/[tool]/+page.svelte b/src/routes/tools/[tool]/+page.svelte index adcd6442..945acbd4 100644 --- a/src/routes/tools/[tool]/+page.svelte +++ b/src/routes/tools/[tool]/+page.svelte @@ -13,13 +13,14 @@ import { goto } from '$app/navigation'; import Picker from '$lib/Tools/Picker.svelte'; import Likes from '$lib/Tools/Likes.svelte'; + import root from '$lib/Utility/root.js'; export let data; let tool = data.tool ?? 'default'; onMount(() => { - if (tool === 'default') goto('/tools'); + if (tool === 'default') goto(root('/tools')); }); $: suggestion = closest(tool, Object.keys(tools)); @@ -35,7 +36,7 @@ <blockquote style="margin: 0 0 0 1.5rem;"> Did you mean "<a - href={`/tools/${tools[suggestion].id}`} + href={root(`/tools/${tools[suggestion].id}`)} on:click={() => (tool = suggestion)} style={suggestion === '...' ? 'pointer-events: none; color: inherit;' : ''} > |