[ 'home' => 'Home', 'latest' => 'Latest', 'basics' => 'Basics', 'eyebrow' => 'Seasonal · Unfussy · Ridiculously tasty.', 'search_placeholder' => 'Search for pasta, brunch, sauce...', 'search_button' => 'Search', 'tag_clear' => 'Clear', 'featured' => 'Featured', 'latest_drops' => 'Latest drops', 'count_suffix_default' => ' recipes ready to cook.', 'count_suffix_filtered' => ' recipes matching your filter.', 'kitchen_basics' => 'Kitchen basics', 'basics_sub' => 'Quick wins that upgrade everything else.', 'servings' => 'servings', 'cook_it' => 'Cook it', 'coming_features' => 'Coming soon', 'coming_features_sub'=> 'Features I\'m shipping next.', 'discover_title' => 'Find your next easy favorite.', 'discover_text' => 'Search, filter by tag, and jump into a recipe.', 'browse_tags' => 'Browse tags', 'quick_start_title' => 'Quick start', 'library_title' => 'Recipe library', 'library_text' => 'Every recipe, searchable and filterable.', 'stats_recipes' => 'live recipes', 'stats_average' => 'avg. total time', 'stats_tags' => 'browseable tags', 'empty_title' => 'No recipes found', 'empty_text' => 'Try another search term or clear the active tag.', 'view_recipe' => 'View recipe', 'stage_eyebrow' => 'Our Recipes', 'stage_title_1' => 'Handcrafted', 'stage_title_2' => 'dishes.', 'stage_scroll' => 'scroll', 'stage_of' => 'of', ], 'de' => [ 'home' => 'Start', 'latest' => 'Neueste', 'basics' => 'Basics', 'eyebrow' => 'Saisonal · Unkompliziert · Richtig lecker.', 'search_placeholder' => 'Suche nach Pasta, Brunch, Sauce...', 'search_button' => 'Suchen', 'tag_clear' => 'Zurücksetzen', 'featured' => 'Highlight', 'latest_drops' => 'Frisch dazugekommen', 'count_suffix_default' => ' Rezepte bereit zum Kochen.', 'count_suffix_filtered' => ' Rezepte passend zum Filter.', 'kitchen_basics' => 'Küchenbasics', 'basics_sub' => 'Kleine Tricks, die alles besser machen.', 'servings' => 'Portionen', 'cook_it' => 'Nachkochen', 'coming_features' => 'Demnächst', 'coming_features_sub'=> 'Features, an denen ich gerade baue.', 'discover_title' => 'Finde schnell dein nächstes Lieblingsrezept.', 'discover_text' => 'Suchen, nach Tag filtern und ins Rezept springen.', 'browse_tags' => 'Tags entdecken', 'quick_start_title' => 'Schnell starten', 'library_title' => 'Rezeptübersicht', 'library_text' => 'Alle Rezepte, durchsuchbar und filterbar.', 'stats_recipes' => 'Rezepte online', 'stats_average' => 'Ø Gesamtzeit', 'stats_tags' => 'durchsuchbare Tags', 'empty_title' => 'Keine Rezepte gefunden', 'empty_text' => 'Probiere einen anderen Suchbegriff oder entferne den aktiven Tag.', 'view_recipe' => 'Rezept ansehen', 'stage_eyebrow' => 'Unsere Rezepte', 'stage_title_1' => 'Handgefertigte', 'stage_title_2' => 'Gerichte.', 'stage_scroll' => 'scrollen', 'stage_of' => 'von', ], ]; $t = $copy[$lang]; // Data $localizedAll = localize_recipes($allRecipes, $lang); $recipes = filter_recipes($allRecipes, $q ?: null, $tag ?: null, $lang); $recipes = array_values(array_filter($recipes, fn($r) => empty($r['coming_soon']))); $comingSoon = array_values(array_filter($localizedAll, fn($r) => !empty($r['coming_soon']))); $placeholderTitle = $lang === 'de' ? 'Bald verfügbar' : 'Coming soon'; $comingSoonDisplay = array_pad($comingSoon, 5, [ 'hero' => '/assets/placeholder.svg', 'title' => $placeholderTitle, ]); $featured = null; foreach ($allRecipes as $recipe) { if (!empty($recipe['featured']) && empty($recipe['coming_soon'])) { $featured = $recipe; break; } } $featured = $featured ?? ($allRecipes[0] ?? null); $featured = $featured ? localize_recipe($featured, $lang) : null; // Build tag cloud $allTags = []; foreach ($localizedAll as $recipe) { foreach ($recipe['tags'] ?? [] as $tTag) { $allTags[] = $tTag; } } $allTags = array_values(array_unique($allTags)); // Stage recipes (only fully published, non-coming-soon) $stageRecipes = array_values(array_filter($localizedAll, fn($r) => empty($r['coming_soon']) && !empty($r['title']))); $comingFeatures = $lang === 'de' ? [ 'Nährwerte & Rezepte Vorschlag individuell angepasst auf Ernährungsziel', 'Einkaufsliste ans Handy senden', 'Step-by-Step Rezepte Assistent mit Videos', ] : [ 'Nutrition info & recipe suggestions tailored to your goals', 'Send your grocery list straight to your phone', 'Step-by-step recipe assistant with videos', ]; // Meta $pageTitle = $lang === 'de' ? 'FlixCooks | Moderner Foodblog für schnelle Alltagsküche' : 'FlixCooks | Modern food blog for busy home cooks'; $description = $lang === 'de' ? 'Frische, schnelle Rezepte mit klaren Schritten und großem Geschmack.' : 'Fresh, fast recipes with clear steps, smart prep notes, and big flavor.'; $langSwitchLabel = $lang === 'de' ? 'DE' : 'EN'; $langSwitchHref = lang_url($lang === 'de' ? 'en' : 'de'); $navHome = $t['home']; $navLatest = $t['latest']; $navBasics = $t['basics']; $recipeCount = count($recipes); $totalMinutes = array_sum(array_map(fn($r) => (int)($r['total_time'] ?? 0), $recipes)); $averageMinutes = $recipeCount > 0 ? (int)ceil($totalMinutes / $recipeCount) : 0; $activeTag = $tag !== '' ? $tag : null; $tagCount = count($allTags); // Small helpers for URLs $langQuery = ['lang' => $lang]; $recipeUrl = fn(array $recipe) => '/recipe.php?' . http_build_query(['slug' => $recipe['slug']] + $langQuery); $tagUrl = fn(string $tagValue) => '/index.php?' . http_build_query(['tag' => $tagValue] + $langQuery); include __DIR__ . '/partials/head.php'; ?>

Besser kochen unter der Woche. Glänzen am Wochenende. Cook better weeknights. Brighter weekends.


$sr): ?>
<?php echo e($sr['title']); ?>

160 ? '…' : ''; ?>

<?php echo e($cs['title'] ?? 'Coming soon'); ?>

#

<?php echo e($recipe['title']); ?>

🙂
#

$r['slug'], 'title' => $r['title'], 'hero' => $r['hero'], 'difficulty' => $r['difficulty'], 'total_time' => (int)($r['total_time'] ?? 0), 'url' => '/recipe.php?slug=' . urlencode($r['slug']) . '&lang=' . $lang, 'tags' => $r['tags'] ?? [], 'category' => $r['category'] ?? '' ]; }, $localizedAll))); ?>