support or in ingredients - ingredient alternatives
This commit is contained in:
parent
87884d9ab3
commit
3d3f0b0012
2 changed files with 31 additions and 7 deletions
|
@ -1,9 +1,20 @@
|
|||
{% macro ingredientpart(ing) -%}
|
||||
{{ing.amount}} {{ing.unit.name}} {{ ing.name }}
|
||||
{%- endmacro %}
|
||||
{% macro ingredient(ing) -%}
|
||||
{{ingredientpart(ing)}}
|
||||
{% if ing.alternatives|length != 0 %}
|
||||
{% for alting in ing.alternatives %}
|
||||
or {{ingredientpart(alting)}}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{%- endmacro %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>{{recipe.title}}</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css">
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8">
|
||||
</head>
|
||||
<body>
|
||||
<a href="index.html">back</a>
|
||||
|
@ -12,7 +23,7 @@
|
|||
<h2>{{part.title}}</h2>
|
||||
<h3>Ingredients</h3>
|
||||
{% for ing in part.ingredients %}
|
||||
<li>{{ing.amount}} {{ing.unit.name}} {{ ing.name }}</li>
|
||||
<li>{{ingredient(ing)}}</li>
|
||||
{% endfor %}
|
||||
<h3>Steps</h3>
|
||||
{% for step in part.steps %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue