@extends('layouts.app') @section('title', $recipe->name) @inject('units', 'App\Services\UnitService') @php $cover = $recipe->image_url ?: $recipe->guide->cover_image_url; $metaDesc = \Illuminate\Support\Str::limit(strip_tags((string) ($recipe->summary ?: $recipe->description ?: '')), 155) ?: null; $yieldValue = $recipe->base_yield_value !== null ? rtrim(rtrim(number_format((float) $recipe->base_yield_value, 3, ',', '.'), '0'), ',') : null; @endphp @section('seo') {{-- Receta sombra (copia 1:1 de la guía): noindex + canonical a la ficha del fermento para no competir contra el propio pilar (receta.md §0/§2). --}} @if($esSombra && $recipe->guide) @else @endif @endsection @section('content')
{{-- Cabecera --}}
{{ $recipe->guide->name }}
{{ $recipe->name }}
⏱ {{ $recipe->guide->default_duration_days }} días @if($yieldValue)🫙 {{ $yieldValue }} {{ $recipe->base_yield_unit }}@endif 🧾 {{ $steps->count() }} pasos
@auth @if($canAccess) Empezar esta receta @else Disponible con Pro @endif @else Registrarse para empezar @endauth
@if($recipe->description)

{{ $recipe->description }}

@endif
{{-- Ingredientes base: la lista completa (generales + los de cada paso) para saber todo lo que hace falta antes de empezar, no ir descubriéndolo paso a paso. --}} @if($allIngredients->isNotEmpty())
Ingredientes @if($yieldValue) para {{ $yieldValue }} {{ $recipe->base_yield_unit }} @endif
Ten todo esto a mano antes de empezar. Cantidades base; se ajustan a lo que prepares al iniciar el lote.
    @foreach($allIngredients as $ing)
  • {{ $ing->ingredient?->name ?? $ing->name }} @if($ing->is_optional)(opcional)@endif @if($ing->quantity !== null){{ $units->format((float) $ing->quantity, $ing->unit ?? 'unit', $user) }}@endif
  • @endforeach
@if($stepIngredients->isNotEmpty())
Los que van en un paso concreto se repiten ahí abajo, junto a las instrucciones.
@endif
@endif {{-- Pasos --}}
Paso a paso
@foreach($steps as $step) @php $min = $step->min_day; $max = $step->max_day; $ingsForStep = $stepIngredients->get($step->id, collect()); $stepActions = collect($step->actions ?? []); @endphp
{{ $step->step_number }}
{{ $step->title }} @if($step->is_optional) opcional @endif
@if($min !== null)
Día {{ $min }}@if($max && $max != $min)–{{ $max }}@endif
@endif
{{ $step->description }}
@if($ingsForStep->isNotEmpty())
En este paso
    @foreach($ingsForStep as $ing)
  • {{ $ing->ingredient?->name ?? $ing->name }} @if($ing->quantity !== null){{ $units->format((float) $ing->quantity, $ing->unit ?? 'unit', $user) }}@endif
  • @endforeach
@endif @if($stepActions->count() > 0)
@foreach($stepActions as $action)
{{ $action['action_type'] }} {{ $action['description'] }}
@endforeach
@endif
@endforeach
{{-- CTA inferior --}}
@auth @if($canAccess) Empezar esta receta @else Disponible con Pro @endif @else Registrarse para empezar @endauth
@endsection