Adjust template
This commit is contained in:
parent
2a648f89d7
commit
0b41a90ae6
1 changed files with 98 additions and 50 deletions
|
@ -55,6 +55,7 @@
|
|||
{%- if ing.ingredient is defined and ing.ingredient != "" -%}
|
||||
{%- if ing.amounts is defined and ing.amounts != "" and ing.amounts.blocks is defined and ing.amounts.blocks != "" -%}
|
||||
{%- if ing.amounts.blocks != [] -%}
|
||||
{%- set ingredient_counter = loop.index -%}
|
||||
{%- for amt in ing.amounts.blocks -%}
|
||||
{%- if loop.index == prt_loop -%}
|
||||
{%- if amt.amount is defined and amt.amount != "" and amt.amount != 0 and amt.amount != '0' -%}
|
||||
|
@ -66,52 +67,15 @@
|
|||
>{{ ing.ingredient }}: {{ amt.amount }} {{ amt.unit | default('each') }}</span>
|
||||
{%- if ing.processing is defined and ing.processing != "" and ing.processing.blocks is defined and ing.processing.blocks != "" -%}
|
||||
{%- if ing.processing.blocks != [] -%}
|
||||
{{- '\n ' -}} <ul>
|
||||
{{- '\n ' -}} <li>
|
||||
{{- '\n ' -}}
|
||||
<span class="processing">Verarbeitungshinweis
|
||||
{%- for tmp_prc in ing.processing.blocks -%}
|
||||
{%- if loop.index == 2 -%}
|
||||
{{- 'e' -}}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
:</span>
|
||||
{{- '\n ' -}}
|
||||
<ul>
|
||||
{%- for prc in ing.processing.blocks -%}
|
||||
{{- '\n ' -}} <li>
|
||||
{{- '\n ' -}}
|
||||
<span class="ingredientprocessing">{{ prc.process }}</span>
|
||||
{{- '\n ' -}} </li>
|
||||
{%- endfor -%}
|
||||
{{- '\n ' -}} </ul>
|
||||
{{- '\n ' -}} </li>
|
||||
{{- '\n ' -}} </ul>
|
||||
{{- ' | ' -}}
|
||||
<a href="#processing_{{- ingredient_counter | string -}}"_ class="processing">Verarbeitungshinweis #{{- ingredient_counter | string -}}</a>
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- if ing.notes is defined and ing.notes != "" and ing.notes.blocks is defined and ing.notes.blocks != "" -%}
|
||||
{%- if ing.notes.blocks != [] -%}
|
||||
{{- '\n ' -}} <ul>
|
||||
{{- '\n ' -}} <li>
|
||||
{{- ' | ' -}}
|
||||
<a href="#note_{{- ingredient_counter | string -}}" class="ingredientnotes">Notiz #{{- ingredient_counter | string -}}</a>
|
||||
{{- '\n ' -}}
|
||||
<span class="ingredientnotes">Notiz
|
||||
{%- for tmp_nde in ing.notes.blocks -%}
|
||||
{%- if loop.index == 2 -%}
|
||||
{{- 'en' -}}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
:</span>
|
||||
{{- '\n ' -}}
|
||||
<ul>
|
||||
{%- for nde in ing.notes.blocks -%}
|
||||
{{- '\n ' -}} <li>
|
||||
{{- '\n ' -}}
|
||||
<span class="ingredientnotes">{{ nde.note }}</span>
|
||||
{{- '\n ' -}} </li>
|
||||
{%- endfor -%}
|
||||
{{- '\n ' -}} </ul>
|
||||
{{- '\n ' -}} </li>
|
||||
{{- '\n ' -}} </ul>
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- if ing.substitutions is defined and ing.substitutions != "" -%}
|
||||
|
@ -215,6 +179,90 @@
|
|||
{{- '\n ' -}} <span>Keine Zutaten definiert</span>
|
||||
{{- '\n ' -}} </ul>
|
||||
{%- endif -%}
|
||||
|
||||
|
||||
|
||||
|
||||
{%- if child.ingredients is defined and child.ingredients != "" %}
|
||||
{%- if child.ingredients.blocks != [] -%}
|
||||
{{- '\n ' -}} <ul>
|
||||
{%- for ing1 in child.ingredients.blocks %}
|
||||
{%- if ing1.ingredient is defined and ing1.ingredient != "" -%}
|
||||
{%- if ing1.amounts is defined and ing1.amounts != "" and ing1.amounts.blocks is defined and ing1.amounts.blocks != "" -%}
|
||||
{%- if ing1.amounts.blocks != [] -%}
|
||||
{%- set ingredient_counter = loop.index -%}
|
||||
{%- for amt in ing1.amounts.blocks -%}
|
||||
{%- if loop.index == prt_loop -%}
|
||||
{%- if amt.amount is defined and amt.amount != "" and amt.amount != 0 and amt.amount != '0' -%}
|
||||
{%- if ing1.processing is defined and ing1.processing != "" and ing1.processing.blocks is defined and ing1.processing.blocks != "" -%}
|
||||
{%- if ing1.processing.blocks != [] -%}
|
||||
{{- '\n ' -}} <li>
|
||||
{{- '\n ' -}}
|
||||
<span id="processing_{{- ingredient_counter | string -}}" class="processing">Verarbeitungshinweis
|
||||
{%- for tmp_prc in ing1.processing.blocks -%}
|
||||
{%- if loop.index == 2 -%}
|
||||
{{- 'e' -}}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{{- ' #' -}}
|
||||
{{- ingredient_counter | string -}}:</span>
|
||||
{{- '\n ' -}}
|
||||
<ul>
|
||||
{%- for prc in ing1.processing.blocks -%}
|
||||
{{- '\n ' -}} <li>
|
||||
{{- '\n ' -}}
|
||||
<span class="ingredientprocessing">{{ prc.process }}</span>
|
||||
{{- '\n ' -}} </li>
|
||||
{%- endfor -%}
|
||||
{{- '\n ' -}} </ul>
|
||||
{{- '\n ' -}} </li>
|
||||
{{- '\n ' -}} </ul>
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- if ing1.notes is defined and ing1.notes != "" and ing1.notes.blocks is defined and ing1.notes.blocks != "" -%}
|
||||
{%- if ing1.notes.blocks != [] -%}
|
||||
{{- '\n ' -}} <ul>
|
||||
{{- '\n ' -}} <li>
|
||||
{{- '\n ' -}}
|
||||
<span id="note_{{- ingredient_counter | string -}}" class="ingredientnotes">Notiz
|
||||
{%- for tmp_nde in ing1.notes.blocks -%}
|
||||
{%- if loop.index == 2 -%}
|
||||
{{- 'en' -}}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{{- ' #' -}} {{- ingredient_counter | string -}}:</span>
|
||||
{{- '\n ' -}}
|
||||
<ul>
|
||||
{%- for nde in ing1.notes.blocks -%}
|
||||
{{- '\n ' -}} <li>
|
||||
{{- '\n ' -}}
|
||||
<span class="ingredientnotes">{{ nde.note }}</span>
|
||||
{{- '\n ' -}} </li>
|
||||
{%- endfor -%}
|
||||
{{- '\n ' -}} </ul>
|
||||
{{- '\n ' -}} </li>
|
||||
{{- '\n ' -}} </ul>
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{{- '\n ' -}} </li>
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{{- '\n ' -}} </ul>
|
||||
{%- else -%}
|
||||
{{- '\n ' -}} <ul>
|
||||
{{- '\n ' -}} <span>Keine Zutaten definiert</span>
|
||||
{{- '\n ' -}} </ul>
|
||||
{%- endif -%}
|
||||
{%- else -%}
|
||||
{{- '\n ' -}} <ul>
|
||||
{{- '\n ' -}} <span>Keine Zutaten definiert</span>
|
||||
{{- '\n ' -}} </ul>
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
|
Loading…
Reference in a new issue