{% extends 'base.html.twig' %} {% block title %}{{ recipe.title }}{% endblock %} {% block body %}
{# ── HERO ── #}
{% set cover = recipe.coverPhoto %} {% if cover %} {{ cover.altText }} {% else %}
🍽️
{% endif %}

{{ recipe.title }}

{% if app.user == recipe.author %} {% endif %}
{% if recipe.difficulty == 'easy' %}Facile{% elseif recipe.difficulty == 'medium' %}Moyen{% else %}Difficile{% endif %} {{ recipe.totalTime }} min {{ recipe.servings }} personnes {% for category in recipe.categories %} {% if category.icon %}{% endif %} {{ category.name }} {% endfor %}
{# ── GALERIE PHOTOS ── #} {% if recipe.photos|length > 1 %}
{% for photo in recipe.photos %} {{ photo.altText }} {% endfor %}
{% endif %} {# ── DESCRIPTION ── #} {% if recipe.description %}

{{ recipe.description }}

{% endif %} {# ── STATS TEMPS ── #}
Préparation
{{ recipe.prepTime }} min
Cuisson
{{ recipe.cookTime }} min
Total
{{ recipe.totalTime }} min
{# ── INGRÉDIENTS ── #}
Ingrédients
    {% for ingredient in recipe.ingredients %}
  • {% if ingredient.quantity %} {{ ingredient.quantity % 1 == 0 ? ingredient.quantity|number_format(0) : ingredient.quantity|number_format(2, ',', ' ') }} {{ ingredient.unit }} {% endif %} {{ ingredient.name }} {% if ingredient.note %} {{ ingredient.note }} {% endif %}
  • {% endfor %}
{# ── ÉTAPES ── #}
Préparation
{% for step in recipe.steps %}
{{ step.stepNumber }}

{{ step.instruction }}

{% if step.photos is not empty %}
{% for photo in step.photos %} {{ photo.altText }} {% endfor %}
{% endif %}
{% if step.duration %} {{ step.duration }} min {% endif %} {% if step.note %} {{ step.note }} {% endif %} {% if step.subRecipe %} {% endif %}
{% endfor %}
{# ── SOURCE ── #} {% if recipe.sourceUrl or recipe.sourceLabel %}
Source : {% if recipe.sourceUrl %} {{ recipe.sourceLabel ?: recipe.sourceUrl }} {% else %} {{ recipe.sourceLabel }} {% endif %}
{% endif %} Retour à mes recettes
{# ── MODALE PHOTO ÉTAPE ── #} {# ── OFFCANVAS SOUS-RECETTES ── #} {% set subRecipes = [] %} {% for step in recipe.steps %} {% if step.subRecipe and step.subRecipe.id not in subRecipes %} {% set subRecipes = subRecipes|merge([step.subRecipe.id]) %}
{{ step.subRecipe.title }}
{% set cover = step.subRecipe.coverPhoto %} {% if cover %} {% endif %}
{% if step.subRecipe.difficulty == 'easy' %}Facile{% elseif step.subRecipe.difficulty == 'medium' %}Moyen{% else %}Difficile{% endif %} {{ step.subRecipe.totalTime }} min {{ step.subRecipe.servings }} pers.
{% if step.subRecipe.description %}

{{ step.subRecipe.description }}

{% endif %} {% if step.subRecipe.ingredients is not empty %}
Ingrédients
{% endif %} {% if step.subRecipe.steps is not empty %}
Préparation
{% for s in step.subRecipe.steps %}
{{ s.stepNumber }}
{{ s.instruction }} {% if s.duration %}
{{ s.duration }} min
{% endif %} {% if s.note %}
{{ s.note }}
{% endif %}
{% endfor %} {% endif %}
Ouvrir la recette complète
{% endif %} {% endfor %} {% endblock %} {% block javascripts %} {% endblock %}