templates: better handling of recipes with parts, backlink

This commit is contained in:
Emi Vasilek 2023-11-01 23:52:41 +01:00
parent 4cc0656e88
commit ae02e6de77

View file

@ -6,16 +6,19 @@
<meta charset="utf-8">
</head>
<body>
<a href="index.html">back</a>
<h1>{{recipe.title}}</h1>
{% for part in recipe.parts %}
<h2>Ingredients</h2>
<h2>{{part.title}}</h2>
<h3>Ingredients</h3>
{% for ing in part.ingredients %}
<li>{{ing.amount}} {{ing.unit.name}} {{ ing.name }}</li>
{% endfor %}
<h2>Steps</h2>
<h3>Steps</h3>
{% for step in part.steps %}
<li>{{ step }}</li>
{% endfor %}
<hr>
{% endfor %}
</body>
</html>