{% endif %}
{% match recipe.metadata %}
{% when Some with (metadata) %}
{% match metadata.description %}
{% when Some with (description) %}
{{ description }}
{% when None %}
{% endmatch %}
{% match metadata.servings %}
{% when Some with (servings) %}
👥 {{ servings }} {{ tr.t("recipe-servings-label") }}
{% when None %}
{% endmatch %}
{% match metadata.time %}
{% when Some with (time) %}
⏱️ {{ time }}
{% when None %}
{% endmatch %}
{% match metadata.difficulty %}
{% when Some with (difficulty) %}
📊 {{ difficulty }}
{% when None %}
{% endmatch %}
{% match metadata.course %}
{% when Some with (course) %}
🍽️ {{ course }}
{% when None %}
{% endmatch %}
{% match metadata.prep_time %}
{% when Some with (prep_time) %}
⏱️ {{ tr.t("meta-prep-time") }}: {{ prep_time }}
{% when None %}
{% endmatch %}
{% match metadata.cook_time %}
{% when Some with (cook_time) %}
🔥 {{ tr.t("meta-cook-time") }}: {{ cook_time }}
{% when None %}
{% endmatch %}
{% match metadata.cuisine %}
{% when Some with (cuisine) %}
🌍 {{ cuisine }}
{% when None %}
{% endmatch %}
{% match metadata.diet %}
{% when Some with (diet) %}
🥗 {{ diet }}
{% when None %}
{% endmatch %}
{% match metadata.author %}
{% when Some with (author) %}
👤 {{ author }}
{% when None %}
{% endmatch %}
{% match metadata.source %}
{% when Some with (source) %}
📖 {{ source }}
{% when None %}
{% endmatch %}
{% match metadata.source_url %}
{% when Some with (source_url) %}
🔗 {{ source_url|hostname }}
{% when None %}
{% endmatch %}
{% for (key, value) in metadata.custom %}
{{ key }}: {{ value }}
{% endfor %}
{% when None %}
{% endmatch %}
🥘 {{ tr.t("recipe-ingredients") }}
{% if sections.len() > 1 %}
{% for section in sections %}
{% if section.ingredients.len() > 0 %}
{% match section.name %}
{% when Some with (name) %}
{{ name }}
{% when None %}
{% if !loop.first %}
{{ tr.t("recipe-main-section") }}
{% endif %}
{% endmatch %}
{% for ingredient in section.ingredients %}
{% match ingredient.reference_path %}
{% when Some with (path) %}
{{ ingredient.name }}
{% when None %}
{{ ingredient.name }}
{% endmatch %}
{% match ingredient.note %}
{% when Some with (note) %}
({{ note }})
{% when None %}
{% endmatch %}
{% match ingredient.quantity %}
{% when Some with (quantity) %}{{ quantity }}{% when None %}{% endmatch %}
{% match ingredient.unit %}
{% when Some with (unit) %} {{ unit }}{% when None %}{% endmatch %}
{% endfor %}
{% endif %}
{% endfor %}
{% else %}
{% for ingredient in ingredients %}
{% match ingredient.reference_path %}
{% when Some with (path) %}
{{ ingredient.name }}
{% when None %}
{{ ingredient.name }}
{% endmatch %}
{% match ingredient.note %}
{% when Some with (note) %}
({{ note }})
{% when None %}
{% endmatch %}
{% match ingredient.quantity %}
{% when Some with (quantity) %}{{ quantity }}{% when None %}{% endmatch %}
{% match ingredient.unit %}
{% when Some with (unit) %} {{ unit }}{% when None %}{% endmatch %}
{% endfor %}
{% endif %}
{% if cookware.len() > 0 %}
🍳 {{ tr.t("recipe-cookware") }}
{% for item in cookware %}
{{ item.name }}
{% endfor %}
{% endif %}
{% for section in sections %}
{% match section.name %}
{% when Some with (name) %}
{{ name }}
{% when None %}
{% endmatch %}
{% for item in section.items %}
{% match item %}
{% when crate::server::templates::RecipeSectionItem::Step with (step) %}
{% match step.image_path %}
{% when Some with (img) %}
{% when None %}
{% endmatch %}
{{ section.step_offset + step.number }}
{% for step_item in step.items %}
{% match step_item %}
{% when crate::server::templates::StepItem::Text with (text) %}{{ text }}{% when crate::server::templates::StepItem::Ingredient with { name, reference_path } %}{% match reference_path %}{% when Some with (path) %}{{ name }}{% when None %}{{ name }}{% endmatch %}{% when crate::server::templates::StepItem::Cookware with (name) %}{{ name }}{% when crate::server::templates::StepItem::Timer with (name) %}⏱️ {{ name }}{% when crate::server::templates::StepItem::Quantity with (qty) %}{{ qty }}{% when crate::server::templates::StepItem::LineBreak %} {% endmatch %}{% endfor %}
{% if step.ingredients.len() > 0 %}
{% for ing in step.ingredients %}
{{ ing.name }}{% match ing.quantity %}{% when Some with (q) %}: {{ q }}{% when None %}{% endmatch %}{% match ing.unit %}{% when Some with (u) %} {{ u }}{% when None %}{% endmatch %}{% match ing.note %}{% when Some with (note) %} ({{ note }}){% when None %}{% endmatch %}{% if !loop.last %},{% endif %}
{% endfor %}
{% endif %}
{% when crate::server::templates::RecipeSectionItem::Note with (note) %}