refactor: unify recipe routes into [recipeLang] slug with full bilingual support

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
This commit is contained in:
2025-12-26 21:19:27 +01:00
parent 36a7fac39a
commit 6de3d76504
72 changed files with 417511 additions and 1097 deletions

View File

@@ -2,9 +2,10 @@
import '$lib/css/nordtheme.css';
import Recipes from '$lib/components/Recipes.svelte';
import Search from './Search.svelte';
let months = ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"]
export let months = ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"]
let month : number;
export let active_index;
export let routePrefix = '/rezepte';
</script>
<style>
@@ -37,7 +38,7 @@ a.month:hover,
<div class=months>
{#each months as month, i}
<a class:active={i == active_index} class=month href="/rezepte/season/{i+1}">{month}</a>
<a class:active={i == active_index} class=month href="{routePrefix}/season/{i+1}">{month}</a>
{/each}
</div>
<section>