aboutsummaryrefslogtreecommitdiff
path: root/src/routes/tools/+page.svelte
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-12-25 00:46:05 -0800
committerFuwn <[email protected]>2023-12-25 00:46:05 -0800
commit486c01a572f50c6db925ca74600ba5d4984752df (patch)
tree96fac5e1aa3f221e141a74ada0864044bc70c5ac /src/routes/tools/+page.svelte
parentfeat(html): update title (diff)
downloaddue.moe-486c01a572f50c6db925ca74600ba5d4984752df.tar.xz
due.moe-486c01a572f50c6db925ca74600ba5d4984752df.zip
feat(routes): route-specific head title
Diffstat (limited to 'src/routes/tools/+page.svelte')
-rw-r--r--src/routes/tools/+page.svelte33
1 files changed, 20 insertions, 13 deletions
diff --git a/src/routes/tools/+page.svelte b/src/routes/tools/+page.svelte
index 8a500d41..a6a33aa4 100644
--- a/src/routes/tools/+page.svelte
+++ b/src/routes/tools/+page.svelte
@@ -7,6 +7,7 @@
import { page } from '$app/stores';
import SequelSpy from '$lib/Tools/SequelSpy.svelte';
import { closest } from '$lib/Error/path';
+ import HeadTitle from '$lib/HeadTitle.svelte';
export let data;
@@ -14,7 +15,7 @@
let tool =
browser && urlParameters?.size !== 0 ? urlParameters?.get('tool') || 'default' : 'default';
const tools: { [key: string]: string } = {
- default: 'Default',
+ default: 'Tools',
todays_character_birthdays: "Today's Character Birthdays",
activity_history: 'Activity History',
wrapped: 'Wrapped',
@@ -43,6 +44,8 @@
</blockquote>
{#if !Object.keys(tools).includes(tool)}
+ <HeadTitle route="Tools" path="/tools" />
+
<p>Tool not found.</p>
<blockquote>
@@ -53,16 +56,20 @@
{suggestion === '...' ? '...' : tools[suggestion]}</a
>"?
</blockquote>
-{:else if tool === 'default'}
- Select a tool to continue.
-{:else if tool === 'activity_history'}
- <ActivityHistory user={data.user} />
-{:else if tool === 'wrapped'}
- <Wrapped user={data.user} />
-{:else if tool === 'episode_discussion_collector'}
- <EpisodeDiscussionCollector />
-{:else if tool === 'todays_character_birthdays'}
- <CharacterBirthdays />
-{:else if tool === 'sequel_spy'}
- <SequelSpy user={data.user} />
+{:else}
+ <HeadTitle route={tools[tool]} path={`/tools?tool=${tool}`} />
+
+ {#if tool === 'default'}
+ Select a tool to continue.
+ {:else if tool === 'activity_history'}
+ <ActivityHistory user={data.user} />
+ {:else if tool === 'wrapped'}
+ <Wrapped user={data.user} />
+ {:else if tool === 'episode_discussion_collector'}
+ <EpisodeDiscussionCollector />
+ {:else if tool === 'todays_character_birthdays'}
+ <CharacterBirthdays />
+ {:else if tool === 'sequel_spy'}
+ <SequelSpy user={data.user} />
+ {/if}
{/if}