Ingredients can now be manually ordered
This commit is contained in:
parent
afd42ba1d0
commit
ca2227037f
11 changed files with 205 additions and 32 deletions
|
|
@ -34,11 +34,48 @@
|
|||
{% else %}
|
||||
{% endmatch %}
|
||||
|
||||
<span class="difficulty">
|
||||
{% match recipe.difficulty %}
|
||||
{% when common::ron_api::Difficulty::Unknown %}
|
||||
{% when common::ron_api::Difficulty::Easy %}
|
||||
{{ tr.t(Sentence::RecipeDifficultyEasy) }}
|
||||
{% when common::ron_api::Difficulty::Medium %}
|
||||
{{ tr.t(Sentence::RecipeDifficultyMedium) }}
|
||||
{% when common::ron_api::Difficulty::Hard %}
|
||||
{{ tr.t(Sentence::RecipeDifficultyHard) }}
|
||||
{% endmatch %}
|
||||
</span>
|
||||
|
||||
{% if !recipe.description.is_empty() %}
|
||||
<div class="recipe-description" >
|
||||
{{ recipe.description.clone() }}
|
||||
{{ recipe.description }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% for group in recipe.groups %}
|
||||
<div class="group">
|
||||
<h3>{{ group.name }}</h3>
|
||||
|
||||
<div class="steps">
|
||||
{% for step in group.steps %}
|
||||
<div class="ingredients">
|
||||
{% for ingredient in step.ingredients %}
|
||||
<div class="ingredient">
|
||||
{% if let Some(quantity) = ingredient.quantity_value %}
|
||||
{{ quantity +}}
|
||||
{{+ ingredient.quantity_unit }}
|
||||
{% endif +%}
|
||||
{{+ ingredient.name }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="step">
|
||||
{{ step.action }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue