Skip to content

Commit

Permalink
Update navigation and quiz URLs to ensure consistent trailing slashes…
Browse files Browse the repository at this point in the history
… for improved routing and SEO. This change includes updates to navigation items, quiz stats links, and quiz question URLs across multiple components.
  • Loading branch information
Malte2036 committed Jan 22, 2025
1 parent fe40b01 commit 249cd9e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/lib/shared/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const navigationItems: NavigationCategory[] = [
items: [
{
name: 'Bekleidungsrechner',
href: '/clothing',
href: '/clothing/',
event: 'Open Clothing Calculator',
icon: VestIcon
},
Expand Down
6 changes: 3 additions & 3 deletions src/routes/(main)/quiz/[type]/listing/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
.map((question, index) => ({
'@type': 'ListItem',
position: index + 1,
url: `https://thw-tools.de/quiz/${data.questionType}/${question.number}`
url: `https://thw-tools.de/quiz/${data.questionType}/${question.number}/`
})),
about: {
'@type': 'Thing',
Expand Down Expand Up @@ -88,7 +88,7 @@
<h1 class="text-3xl font-bold mb-4">{getQuizTypeName(data.questionType)}</h1>
<p class="text-xl text-gray-700 mb-2">{getDescriptionForQuestionType(data.questionType)}</p>
<a
href={`/quiz/${questionType}/1`}
href={`/quiz/${questionType}/1/`}
class="text-lg text-thw-600 font-medium"
data-umami-event={`Start ${questionType.toUpperCase()} Quiz`}
>Klicke auf eine Frage, um zu starten</a
Expand All @@ -108,7 +108,7 @@
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 gap-2">
{#each data.allQuestions.sort((a, b) => a.number - b.number) as question}
<LinkButton
url={`/quiz/${data.questionType}/${question.number}`}
url={`/quiz/${data.questionType}/${question.number}/`}
secondary
dataUmamiEvent={`Open ${data.questionType.toUpperCase()} Quiz Question ${question.number}`}
>
Expand Down
6 changes: 3 additions & 3 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@
</div>

<!-- svelte-ignore a11y-missing-content -->
<a href="/quiz/stats" class="hidden" />
<a href="/quiz/stats/" class="hidden" />
<!-- svelte-ignore a11y-missing-content -->
<a href="/faq" class="hidden" />
{#each ['ga', 'agt', 'cbrn'] as questionType}
<!-- svelte-ignore a11y-missing-content -->
<a href={`/quiz/${questionType}`} class="hidden" />
<a href={`/quiz/${questionType}/`} class="hidden" />
<!-- svelte-ignore a11y-missing-content -->
<a href={`/quiz/${questionType}/listing`} class="hidden" />
<a href={`/quiz/${questionType}/listing/`} class="hidden" />
{/each}

0 comments on commit 249cd9e

Please sign in to comment.