diff options
| author | Fuwn <[email protected]> | 2023-12-25 00:46:05 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-12-25 00:46:05 -0800 |
| commit | 486c01a572f50c6db925ca74600ba5d4984752df (patch) | |
| tree | 96fac5e1aa3f221e141a74ada0864044bc70c5ac /src/routes/tools/+page.svelte | |
| parent | feat(html): update title (diff) | |
| download | due.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.svelte | 33 |
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} |