Consolidate /rezepte and /recipes routes into single [recipeLang] structure to eliminate code duplication. All pages now use conditional API routing and reactive labels based on language parameter. - Merge duplicate route structures into /[recipeLang] with 404 for invalid slugs - Add English API endpoints for search, favorites, tags, and categories - Implement language dropdown in header with localStorage persistence - Convert all pages to use Svelte 5 runes (, , ) - Add German-only redirects (301) for add/edit pages - Make all view pages (list, detail, filters, search, favorites) fully bilingual - Remove floating language switcher in favor of header dropdown
28 lines
662 B
Svelte
28 lines
662 B
Svelte
<script lang="ts">
|
|
import type { PageData } from './$types';
|
|
import "$lib/css/nordtheme.css";
|
|
let { data }: { data: PageData } = $props();
|
|
import TagCloud from '$lib/components/TagCloud.svelte';
|
|
import TagBall from '$lib/components/TagBall.svelte';
|
|
|
|
const isEnglish = $derived(data.lang === 'en');
|
|
const labels = $derived({
|
|
title: isEnglish ? 'Categories' : 'Kategorien'
|
|
});
|
|
</script>
|
|
<style>
|
|
h1 {
|
|
text-align: center;
|
|
font-size: 3rem;
|
|
}
|
|
</style>
|
|
<h1>{labels.title}</h1>
|
|
<section>
|
|
<TagCloud>
|
|
{#each data.categories as tag}
|
|
<TagBall {tag} ref="/{data.recipeLang}/category">
|
|
</TagBall>
|
|
{/each}
|
|
</TagCloud>
|
|
</section>
|