{% import "macros/list.html" as list %} {% extends "blocks/base.html" %} {% block variables -%} {% set base_url = ".." %} {%- endblock variables %} {% block title %}{{ recipe.title }}{% endblock title %} {% block main -%} {%- set lang = lang.recipe -%}
{{ lf -}}
{{ lf -}}

{{ recipe.title }}

{{ lf -}}
{{ lf }} {%- if image_path is string -%}
{{ lf -}} {{ recipe.title }}{{ lf -}}
{{ lf }} {%- endif -%}
{{ lf -}}

{{ lf -}} {{ lf }} {%- include "includes/person.html" -%} {{ lf -}} {{ lf }} {%- set yield = recipe.metadata.yield -%} {{ lf -}} {{ lf -}} {{ yield.value }}{{ lf -}} +{{ lf -}} {{ lf -}} {%- if yield.unit is string -%} {{ yield.unit }} {%- else -%} {{ lang.metadata_servings }} {%- endif -%} {{ lf -}} {{ lf -}}

{{ lf }} {%- set duration = recipe.metadata.duration %} {%- if duration is object -%}

{{ lf -}} {{ lf }} {%- include "includes/clock.html" -%} {{ lf -}} {{ lf }} {%- set minutes = duration.hours * 60 + duration.minutes %} {%- if minutes < 120 -%} {{ minutes }}{{ lf -}} {{- minutes | pluralize( singular = lang.metadata_minute, plural = lang.metadata_minutes ) -}} {{ lf }} {%- else %} {%- set hours = minutes / 60 -%} {{ hours | round }}{{ lf -}} {{- hours | pluralize( singular = lang.metadata_hour, plural = lang.metadata_hours ) -}} {{ lf }} {%- endif -%} {{ lf -}}

{{ lf }} {%- endif -%}

{{ lf -}} {{ lf }} {%- include "includes/salt.html" -%} {{ lf -}} {{ lf }} {{ recipe.ingredients.count }}{{ lf -}} {{ lang.metadata_ingredients }}{{ lf -}} {{ lf -}}

{{ lf -}}
{{ lf -}}
{{ lf -}}

{{ lang.heading_ingredients }}

{{ lf -}} {{- list::list(tag = "ul", list = recipe.ingredients) -}}
{{ lf }} {%- if recipe.notes | length > 0 -%}
{{ lf -}}

{{ lang.heading_notes }}

{{ lf -}} {{ lf -}}
{{ lf }} {%- endif -%}
{{ lf -}}

{{ lang.heading_instructions }}

{{ lf -}} {{ list::list(tag = "ol", list = recipe.instructions) -}}
{{ lf }} {%- set source = recipe.metadata.source %} {%- if source is object -%}
{{ lf -}}

{%- if source.author is defined -%} {{ lang.metadata_author }}: {{ source.author }} {%- elif source.book is defined -%} {{ lang.metadata_source }}: {{ source.book }} {%- else -%} {{ lang.metadata_source }}: {{ source.link.name }} {%- endif -%}

{{ lf -}}
{{ lf }} {%- endif -%}
{% endblock main %}