add support for 'to taste' specifier as recommended by peebus =u=
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
f55dcebdb8
commit
65e22291ea
2 changed files with 2 additions and 2 deletions
|
@ -48,7 +48,7 @@ time: 240
|
|||
- `name` (string) - The displayed name of the recipe. Does not appear in the URL.
|
||||
- `author` (string, optional) - The author of the recipe.
|
||||
- `ingredients` (list) - Each entry in `ingredients` is an array consisting of up to four items:
|
||||
- amount (number or array) - The amount of this item to add, e.g. `2` for 2 cups of flour. If this in an array, it will be printed as `amount[0] to amount[1]`. For example, if you wanted to say "2 to 3 cups of peas", you would write `[[2, 3], peas, cups]`.
|
||||
- amount (number or array) - The amount of this item to add, e.g. `2` for 2 cups of flour. If this is `0`, the output will be e.g. "jalepeño chillis to taste" rather than "0 jalepeño chillis". If this in an array, it will be printed as `amount[0] to amount[1]`. For example, if you wanted to say "2 to 3 cups of peas", you would write `[[2, 3], peas, cups]`.
|
||||
- ingredient name (string) - The name of the ingredient, e.g. `flour` for 2 cups of flour.
|
||||
- unit terminology (string, optional) - The unit that amount refers to, e.g. `cups` for 2 cups of flour. If left blank or null, as in `[1, egg]`, the output will simply be "1 egg".
|
||||
- optional (boolean, optional) - Whether or not this ingredient is optional. The ingredient `[1, chocolate egg, null, true]` produces "1 chocolate egg" and marks is as optional. Defaults to `false`.
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
<{{tag}}>Ingredients</{{tag}}>
|
||||
<ul class='ingredients'>
|
||||
{% for item in page.ingredients -%}
|
||||
<li class='{% if item[3] %}optional{% endif %}'>{% if item[0][0] %}{{ item[0][0] }} to {{ item[0][1] }}{% else %}{{ item[0] }}{% endif %} {%- if item[2] %} {{ item[2] }} of {%- endif %} {{ item[1] }}</li>
|
||||
<li class='{% if item[3] %}optional{% endif %}'>{% if item[0] != 0 %}{% if item[0][0] %}{{ item[0][0] }} to {{ item[0][1] }}{% else %}{{ item[0] }}{% endif %}{% endif %} {%- if item[2] %} {{ item[2] }} of {%- endif %} {{ item[1] }}{% if item[0] == 0 %} to taste{% endif %}</li>
|
||||
{% endfor -%}
|
||||
</ul>
|
||||
|
|
Loading…
Reference in a new issue