Expand templates
This commit is contained in:
parent
138bea089a
commit
ee82ebf6b4
10 changed files with 304 additions and 275 deletions
|
@ -4,8 +4,7 @@ author: L3D
|
||||||
---
|
---
|
||||||
body:
|
body:
|
||||||
|
|
||||||
klassischer Waffelteig
|
Der klassischer Waffelteig ist zu finden auf:
|
||||||
|
|
||||||
[rezept.yaml](rezept.yaml)
|
[rezept.yaml](rezept.yaml)
|
||||||
---
|
---
|
||||||
pub_date: 2021-07-19
|
pub_date: 2021-07-19
|
||||||
|
|
|
@ -33,5 +33,10 @@ type = boolean
|
||||||
label = Body
|
label = Body
|
||||||
type = markdown
|
type = markdown
|
||||||
|
|
||||||
|
[fields.weight]
|
||||||
|
label = Ranking
|
||||||
|
default = 128
|
||||||
|
type = integer
|
||||||
|
|
||||||
[children]
|
[children]
|
||||||
model = zutaten
|
model = zutaten
|
||||||
|
|
|
@ -20,7 +20,7 @@ type = markdown
|
||||||
|
|
||||||
[children]
|
[children]
|
||||||
model = rezept-post
|
model = rezept-post
|
||||||
order_by = -pub_date, title
|
order_by = -weight, title
|
||||||
|
|
||||||
[pagination]
|
[pagination]
|
||||||
enabled = true
|
enabled = true
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{- '\n ' -}} <hr class="{{ section_class }}">
|
{{- '\n ' -}} <hr class="{{ section_class }}">
|
||||||
{{- '\n ' -}} <p class="content__meta">
|
{{- '\n ' -}} <p class="content__meta">
|
||||||
{{- '\n ' -}} <i>geschrieben von {{ post.author }} am {{ post.pub_date }}</i>
|
{{- '\n ' -}} <i>Ein Waffelrezept von {{ post.author }}</i>
|
||||||
{{- '\n ' -}} </p>
|
{{- '\n ' -}} </p>
|
||||||
{{- '\n ' -}} </div>
|
{{- '\n ' -}} </div>
|
||||||
{{- '\n ' -}} </div>
|
{{- '\n ' -}} </div>
|
||||||
|
|
35
templates/zutaten/hinweise.html
Normal file
35
templates/zutaten/hinweise.html
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{#-
|
||||||
|
Hinweise zum Backen...
|
||||||
|
-#}
|
||||||
|
{%- if child.oven is defined and child.oven != "" and child.oven.blocks or
|
||||||
|
child.oven_type is defined and child.oven_type != "" or
|
||||||
|
child.oven_time is defined and child.oven_time != "" -%}
|
||||||
|
{{- '\n ' -}} <div class="content__box">
|
||||||
|
{{- '\n ' -}} <div class="content__inner_box">
|
||||||
|
{{- '\n ' -}} <h2>Backhinweise</h2>
|
||||||
|
{{- '\n ' -}} <ul>
|
||||||
|
{%- if child.oven is defined and child.oven != "" and child.oven.blocks is defined and child.oven.blocks != "" -%}
|
||||||
|
{% if child.oven.blocks is defined and child.oven.blocks != [] -%}
|
||||||
|
{%- for ovn in child.oven.blocks -%}
|
||||||
|
{%- if ovn.amount is defined and ovn.amount != "" -%}
|
||||||
|
{{- '\n ' -}} <li>
|
||||||
|
{{- '\n ' -}} <span>Ofentemperatur: {{ ovn.amount }} {{ ovn.unit | default('C') }}</span>
|
||||||
|
{{- '\n ' -}} </li>
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- if child.oven_type is defined and child.oven_type != "" -%}
|
||||||
|
{{- '\n ' -}} <li>
|
||||||
|
{{- '\n ' -}} <span>Ofentype: {{ child.oven_type }}</span>
|
||||||
|
{{- '\n ' -}} </li>
|
||||||
|
{%- endif -%}
|
||||||
|
{%- if child.oven_time is defined and child.oven_time != "" -%}
|
||||||
|
{{- '\n ' -}} <li>
|
||||||
|
{{- '\n ' -}} <span>Backzeit: {{ child.oven_time }}</span>
|
||||||
|
{{- '\n ' -}} </li>
|
||||||
|
{%- endif -%}
|
||||||
|
{{- '\n ' -}} </ul>
|
||||||
|
{{- '\n ' -}} </div>
|
||||||
|
{{- '\n ' -}} </div>
|
||||||
|
{%- endif -%}
|
|
@ -5,6 +5,11 @@
|
||||||
|
|
||||||
{%- for child in post.children -%}
|
{%- for child in post.children -%}
|
||||||
{%- if child._template == 'zutaten.yaml' -%}
|
{%- if child._template == 'zutaten.yaml' -%}
|
||||||
|
{#-
|
||||||
|
|
||||||
|
Zunächst werden die Zutaten des Rezept definiert...
|
||||||
|
|
||||||
|
-#}
|
||||||
{{- '\n ' -}} <div class="content__box">
|
{{- '\n ' -}} <div class="content__box">
|
||||||
{{- '\n ' -}} <div class="content__inner_box">
|
{{- '\n ' -}} <div class="content__inner_box">
|
||||||
{{- '\n ' -}}
|
{{- '\n ' -}}
|
||||||
|
@ -20,96 +25,28 @@
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- if child.servings is defined and child.servings != "" -%}
|
{%- if child.servings is defined and child.servings != "" -%}
|
||||||
{%- if child.servings.blocks != [] -%}
|
{%- if child.servings.blocks != [] -%}
|
||||||
|
|
||||||
{%- include "zutaten/zutaten.html" -%}
|
{%- include "zutaten/zutaten.html" -%}
|
||||||
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{{- '\n ' -}} </div>
|
{{- '\n ' -}} </div>
|
||||||
{{- '\n ' -}} </div>
|
{{- '\n ' -}} </div>
|
||||||
{%- endif -%}
|
|
||||||
{#-
|
{#-
|
||||||
|
|
||||||
Rezept Schritte...
|
Nachdem die Zutaten des Rezept nun angegeben sind,
|
||||||
|
folgt die Zubereitung der waffelfähigen Teigprodukte...
|
||||||
|
|
||||||
-#}
|
-#}
|
||||||
{%- if child.steps is defined and child.steps.blocks is defined and child.steps != "" -%}
|
{%- if child.steps is defined and child.steps.blocks is defined and child.steps != "" -%}
|
||||||
{%- if child.steps.blocks is defined and child.steps.blocks != "" and child.steps.blocks != [] -%}
|
{%- if child.steps.blocks is defined and child.steps.blocks != "" and child.steps.blocks != [] -%}
|
||||||
{{- '\n ' -}} <div class="content__box">
|
{%- include "zutaten/zubereitung.html" -%}
|
||||||
{{- '\n ' -}} <div class="content__inner_box">
|
|
||||||
{{- '\n ' -}} <h2>Zubereitung</h2>
|
|
||||||
{{- '\n ' -}} <ul>
|
|
||||||
{%- for stp in child.steps.blocks -%}
|
|
||||||
{%- if stp.step is defined and stp.step != "" -%}
|
|
||||||
{{- '\n ' -}} <li>
|
|
||||||
{{- '\n ' -}} <span>{{ stp.step }}</span>
|
|
||||||
{%- if stp.haccp_type is defined and stp.haccp_type != "" and stp.haccp_string is defined and stp.haccp_string != "" -%}
|
|
||||||
{{- '\n ' -}} <ul>
|
|
||||||
{{- '\n ' -}} <li>
|
|
||||||
{{- '\n ' -}}<span class="{{- stp.haccp_type|lower -}}">{{ stp.haccp_string }}</span>
|
|
||||||
{{- '\n ' -}} </li>
|
|
||||||
{{- '\n ' -}} </ul>
|
|
||||||
{%- endif %}
|
|
||||||
{%- if stp.notes is defined and stp.notes != "" and stp.notes.blocks is defined %}
|
|
||||||
{%- if stp.notes.blocks != [] -%}
|
|
||||||
{{- '\n ' -}} <ul>
|
|
||||||
{%- for nde in stp.notes.blocks -%}
|
|
||||||
{{- '\n ' -}} <li>
|
|
||||||
{{- '\n ' -}} <span>{{- nde.note -}}</span>
|
|
||||||
{{- '\n ' -}} </li>
|
|
||||||
{%- endfor -%}
|
|
||||||
{{- '\n ' -}} </ul>
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{{- '\n ' -}} </li>
|
|
||||||
{%- endif %}
|
|
||||||
{%- endfor -%}
|
|
||||||
{{- '\n ' -}} </ul>
|
|
||||||
{{- '\n ' -}} </div>
|
|
||||||
{{- '\n ' -}} </div>
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
{%- if child.oven is defined and child.oven != "" and child.oven.blocks or
|
{%- include "zutaten/hinweise.html" -%}
|
||||||
child.oven_type is defined and child.oven_type != "" or
|
|
||||||
child.oven_time is defined and child.oven_time != "" -%}
|
|
||||||
{{- '\n ' -}} <div class="content__box">
|
|
||||||
{{- '\n ' -}} <div class="content__inner_box">
|
|
||||||
{{- '\n ' -}} <h2>Backhinweise</h2>
|
|
||||||
{{- '\n ' -}} <ul>
|
|
||||||
{%- if child.oven is defined and child.oven != "" and child.oven.blocks is defined and child.oven.blocks != "" -%}
|
|
||||||
{% if child.oven.blocks is defined and child.oven.blocks != [] -%}
|
|
||||||
{%- for ovn in child.oven.blocks -%}
|
|
||||||
{%- if ovn.amount is defined and ovn.amount != "" -%}
|
|
||||||
{{- '\n ' -}} <li>
|
|
||||||
{{- '\n ' -}} <span>Ofentemperatur: {{ ovn.amount }} {{ ovn.unit | default('C') }}</span>
|
|
||||||
{{- '\n ' -}} </li>
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endfor -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- if child.oven_type is defined and child.oven_type != "" -%}
|
|
||||||
{{- '\n ' -}} <li>
|
|
||||||
{{- '\n ' -}} <span>Ofentype: {{ child.oven_type }}</span>
|
|
||||||
{{- '\n ' -}} </li>
|
|
||||||
{%- endif -%}
|
|
||||||
{%- if child.oven_time is defined and child.oven_time != "" -%}
|
|
||||||
{{- '\n ' -}} <li>
|
|
||||||
{{- '\n ' -}} <span>Backzeit: {{ child.oven_time }}</span>
|
|
||||||
{{- '\n ' -}} </li>
|
|
||||||
{%- endif -%}
|
|
||||||
{{- '\n ' -}} </ul>
|
|
||||||
{{- '\n ' -}} </div>
|
|
||||||
{{- '\n ' -}} </div>
|
|
||||||
{%- endif -%}
|
|
||||||
|
|
||||||
{#-
|
|
||||||
{%- if child.source_authors is defined and child.source_authors != "" -%}
|
|
||||||
{{ '\n \n source_authors:'}} "{{ child.source_authors }}"
|
|
||||||
{%- endif -%}
|
|
||||||
{%- if child.x_license is defined and child.x_license != "" -%}
|
|
||||||
{{ '\n X-License:' }} "{{ child.x_license }}"
|
|
||||||
{%- endif -%}
|
|
||||||
{{ '\n source_url:' }} "{{ '../'|url(external=true) }}"
|
|
||||||
-#}
|
|
||||||
{#- source: "https://open-recipe-format.readthedocs.io/en/latest/topics/tutorials/walkthrough.html" -#}
|
{#- source: "https://open-recipe-format.readthedocs.io/en/latest/topics/tutorials/walkthrough.html" -#}
|
||||||
|
|
||||||
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
|
|
35
templates/zutaten/zubereitung.html
Normal file
35
templates/zutaten/zubereitung.html
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{#-
|
||||||
|
Die Zubereitung des Rezept...
|
||||||
|
-#}
|
||||||
|
{{- '\n ' -}} <div class="content__box">
|
||||||
|
{{- '\n ' -}} <div class="content__inner_box">
|
||||||
|
{{- '\n ' -}} <h2>Zubereitung</h2>
|
||||||
|
{{- '\n ' -}} <ul>
|
||||||
|
{%- for stp in child.steps.blocks -%}
|
||||||
|
{%- if stp.step is defined and stp.step != "" -%}
|
||||||
|
{{- '\n ' -}} <li>
|
||||||
|
{{- '\n ' -}} <span>{{ stp.step }}</span>
|
||||||
|
{%- if stp.haccp_type is defined and stp.haccp_type != "" and stp.haccp_string is defined and stp.haccp_string != "" -%}
|
||||||
|
{{- '\n ' -}} <ul>
|
||||||
|
{{- '\n ' -}} <li>
|
||||||
|
{{- '\n ' -}}<span class="{{- stp.haccp_type|lower -}}">{{ stp.haccp_string }}</span>
|
||||||
|
{{- '\n ' -}} </li>
|
||||||
|
{{- '\n ' -}} </ul>
|
||||||
|
{%- endif %}
|
||||||
|
{%- if stp.notes is defined and stp.notes != "" and stp.notes.blocks is defined %}
|
||||||
|
{%- if stp.notes.blocks != [] -%}
|
||||||
|
{{- '\n ' -}} <ul>
|
||||||
|
{%- for nde in stp.notes.blocks -%}
|
||||||
|
{{- '\n ' -}} <li>
|
||||||
|
{{- '\n ' -}} <span>{{- nde.note -}}</span>
|
||||||
|
{{- '\n ' -}} </li>
|
||||||
|
{%- endfor -%}
|
||||||
|
{{- '\n ' -}} </ul>
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{{- '\n ' -}} </li>
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor -%}
|
||||||
|
{{- '\n ' -}} </ul>
|
||||||
|
{{- '\n ' -}} </div>
|
||||||
|
{{- '\n ' -}} </div>
|
117
templates/zutaten/zutat_menge.html
Normal file
117
templates/zutaten/zutat_menge.html
Normal file
|
@ -0,0 +1,117 @@
|
||||||
|
{%- 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' -%}
|
||||||
|
{{- '\n ' -}} <li>
|
||||||
|
{{- '\n ' -}} <span
|
||||||
|
{%- if ing.usda_num is defined and ing.usda_num != "" -%}
|
||||||
|
{{- ' id=' -}}"usda_{{- ing.usda_num -}}"
|
||||||
|
{%- endif -%}
|
||||||
|
>{{ 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 != [] -%}
|
||||||
|
{{- ' | ' -}}
|
||||||
|
<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 != [] -%}
|
||||||
|
{{- ' | ' -}}
|
||||||
|
<a href="#note_{{- ingredient_counter | string -}}" class="ingredientnotes">Notiz #{{- ingredient_counter | string -}}</a>
|
||||||
|
{{- '\n ' -}}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- if ing.substitutions is defined and ing.substitutions != "" -%}
|
||||||
|
{%- if ing.substitutions.blocks is defined and ing.substitutions.blocks != "" -%}
|
||||||
|
{%- if ing.substitutions.blocks != [] -%}
|
||||||
|
{{- '\n ' -}} <ul>
|
||||||
|
{{- '\n ' -}} <li>
|
||||||
|
{{- '\n ' -}} Ausweichmöglichkeit:
|
||||||
|
{{- '\n ' -}} <ul>
|
||||||
|
{%- for sst in ing.substitutions.blocks -%}
|
||||||
|
{%- if sst.amounts is defined and sst.amounts != "" and sst.amounts.blocks is defined and sst.amounts.blocks != "" -%}
|
||||||
|
{%- if sst.amounts.blocks != [] -%}
|
||||||
|
{%- for amt2 in sst.amounts.blocks -%}
|
||||||
|
{%- if loop.index == prt_loop -%}
|
||||||
|
{%- if amt2.amount is defined and amt2.amount != "" and amt2.amount != 0 and amt2.amount != '0' -%}
|
||||||
|
{{- '\n ' -}} <li>
|
||||||
|
{{- '\n ' -}} <span
|
||||||
|
{%- if sst.usda_num is defined and sst.usda_num != "" -%}
|
||||||
|
{{- ' id=' -}}"usda_{{- sst.usda_num -}}"
|
||||||
|
{%- endif -%}
|
||||||
|
>{{ sst.ingredient }}: {{ amt2.amount }} {{ amt2.unit | default('each') }}</span>
|
||||||
|
{%- if sst.processing is defined and sst.processing != "" and sst.processing.blocks is defined and sst.processing.blocks != "" -%}
|
||||||
|
{%- if sst.processing.blocks != [] -%}
|
||||||
|
{{- '\n ' -}} <ul>
|
||||||
|
{{- '\n ' -}} <li>
|
||||||
|
{{- '\n ' -}}
|
||||||
|
<span class="processing">Verarbeitungshinweis
|
||||||
|
{%- for tmp_prc2 in sst.processing.blocks -%}
|
||||||
|
{%- if loop.index == 2 -%}
|
||||||
|
{{- 'e' -}}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}
|
||||||
|
:</span>
|
||||||
|
{{- '\n ' -}}
|
||||||
|
<ul>
|
||||||
|
{%- for prc2 in sst.processing.blocks -%}
|
||||||
|
{{- '\n ' -}} <li>
|
||||||
|
{{- '\n ' -}}
|
||||||
|
<span class="ingredientprocessing">{{ prc2.process }}</span>
|
||||||
|
{{- '\n ' -}} </li>
|
||||||
|
{%- endfor -%}
|
||||||
|
{{- '\n ' -}} </ul>
|
||||||
|
{{- '\n ' -}} </li>
|
||||||
|
{{- '\n ' -}} </ul>
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- if sst.notes is defined and sst.notes != "" and sst.notes.blocks is defined and sst.notes.blocks != "" -%}
|
||||||
|
{%- if ing.notes.blocks != [] -%}
|
||||||
|
{{- '\n ' -}} <ul>
|
||||||
|
{{- '\n ' -}} <li>
|
||||||
|
{{- '\n ' -}}
|
||||||
|
<span class="ingredientnotes">Notiz
|
||||||
|
{%- for tmp_nde1 in sst.notes.blocks -%}
|
||||||
|
{%- if loop.index == 2 -%}
|
||||||
|
{{- 'en' -}}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}
|
||||||
|
:</span>
|
||||||
|
{{- '\n ' -}}
|
||||||
|
<ul>
|
||||||
|
{%- for nde2 in sst.notes.blocks -%}
|
||||||
|
{{- '\n ' -}} <li>
|
||||||
|
{{- '\n ' -}}
|
||||||
|
<span class="ingredientnotes">{{ nde2.note }}</span>
|
||||||
|
{{- '\n ' -}} </li>
|
||||||
|
{%- endfor -%}
|
||||||
|
{{- '\n ' -}} </ul>
|
||||||
|
{{- '\n ' -}} </li>
|
||||||
|
{{- '\n ' -}} </ul>
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{{- '\n ' -}} </li>
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}
|
||||||
|
{{- '\n ' -}} </ul>
|
||||||
|
{{- '\n ' -}} </li>
|
||||||
|
{{- '\n ' -}} </ul>
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{{- '\n ' -}} </li>
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}
|
||||||
|
|
66
templates/zutaten/zutat_notes.html
Normal file
66
templates/zutaten/zutat_notes.html
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
{%- 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 -%}
|
|
@ -1,134 +1,29 @@
|
||||||
|
{#-
|
||||||
|
Hier werden die Zutaten für das Rezept gerendert...
|
||||||
|
-#}
|
||||||
{%- for prt in child.servings.blocks -%}
|
{%- for prt in child.servings.blocks -%}
|
||||||
|
{#-
|
||||||
|
|
||||||
|
Zunächst schauen wir, für was für Mengen das Rezept definiert ist.
|
||||||
|
Für jede fefinierte Menge haben wir einen neuen Durchlauf in dem for loop
|
||||||
|
|
||||||
|
-#}
|
||||||
{{- '\n ' -}}
|
{{- '\n ' -}}
|
||||||
<h2>Portionsgröße: Für {{ prt.serving_number | default('1') }}
|
<h2>Portionsgröße: Für {{ prt.serving_number | default('1') }}
|
||||||
{{- ' ' -}}
|
{{- ' ' -}}
|
||||||
{%- if prt.serving_units is defined and prt.serving_units != "" -%}
|
{{- prt.serving_units| default('Stück') -}}
|
||||||
{{- prt.serving_units -}}
|
|
||||||
{%- else -%}
|
|
||||||
Stück
|
|
||||||
{%- endif -%}
|
|
||||||
</h2>
|
</h2>
|
||||||
{%- set prt_loop = loop.index -%}
|
{%- set prt_loop = loop.index -%}
|
||||||
|
{#-
|
||||||
|
in der prt_loop variable speichern wir in welchem loop index die zutat steht.
|
||||||
|
Damit greifen wir später auf den selben index zu.
|
||||||
|
-#}
|
||||||
{%- if child.ingredients is defined and child.ingredients != "" %}
|
{%- if child.ingredients is defined and child.ingredients != "" %}
|
||||||
{%- if child.ingredients.blocks != [] -%}
|
{%- if child.ingredients.blocks != [] -%}
|
||||||
{{- '\n ' -}} <ul>
|
{{- '\n ' -}} <ul>
|
||||||
{%- for ing in child.ingredients.blocks %}
|
|
||||||
{%- if ing.ingredient is defined and ing.ingredient != "" -%}
|
{%- include "zutaten/zutat_menge.html" -%}
|
||||||
{%- 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' -%}
|
|
||||||
{{- '\n ' -}} <li>
|
|
||||||
{{- '\n ' -}} <span
|
|
||||||
{%- if ing.usda_num is defined and ing.usda_num != "" -%}
|
|
||||||
{{- ' id=' -}}"usda_{{- ing.usda_num -}}"
|
|
||||||
{%- endif -%}
|
|
||||||
>{{ 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 != [] -%}
|
|
||||||
{{- ' | ' -}}
|
|
||||||
<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 != [] -%}
|
|
||||||
{{- ' | ' -}}
|
|
||||||
<a href="#note_{{- ingredient_counter | string -}}" class="ingredientnotes">Notiz #{{- ingredient_counter | string -}}</a>
|
|
||||||
{{- '\n ' -}}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- if ing.substitutions is defined and ing.substitutions != "" -%}
|
|
||||||
{%- if ing.substitutions.blocks is defined and ing.substitutions.blocks != "" -%}
|
|
||||||
{%- if ing.substitutions.blocks != [] -%}
|
|
||||||
{{- '\n ' -}} <ul>
|
|
||||||
{{- '\n ' -}} <li>
|
|
||||||
{{- '\n ' -}} Ausweichmöglichkeit:
|
|
||||||
{{- '\n ' -}} <ul>
|
|
||||||
{%- for sst in ing.substitutions.blocks -%}
|
|
||||||
{%- if sst.amounts is defined and sst.amounts != "" and sst.amounts.blocks is defined and sst.amounts.blocks != "" -%}
|
|
||||||
{%- if sst.amounts.blocks != [] -%}
|
|
||||||
{%- for amt2 in sst.amounts.blocks -%}
|
|
||||||
{%- if loop.index == prt_loop -%}
|
|
||||||
{%- if amt2.amount is defined and amt2.amount != "" and amt2.amount != 0 and amt2.amount != '0' -%}
|
|
||||||
{{- '\n ' -}} <li>
|
|
||||||
{{- '\n ' -}} <span
|
|
||||||
{%- if sst.usda_num is defined and sst.usda_num != "" -%}
|
|
||||||
{{- ' id=' -}}"usda_{{- sst.usda_num -}}"
|
|
||||||
{%- endif -%}
|
|
||||||
>{{ sst.ingredient }}: {{ amt2.amount }} {{ amt2.unit | default('each') }}</span>
|
|
||||||
{%- if sst.processing is defined and sst.processing != "" and sst.processing.blocks is defined and sst.processing.blocks != "" -%}
|
|
||||||
{%- if sst.processing.blocks != [] -%}
|
|
||||||
{{- '\n ' -}} <ul>
|
|
||||||
{{- '\n ' -}} <li>
|
|
||||||
{{- '\n ' -}}
|
|
||||||
<span class="processing">Verarbeitungshinweis
|
|
||||||
{%- for tmp_prc2 in sst.processing.blocks -%}
|
|
||||||
{%- if loop.index == 2 -%}
|
|
||||||
{{- 'e' -}}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endfor -%}
|
|
||||||
:</span>
|
|
||||||
{{- '\n ' -}}
|
|
||||||
<ul>
|
|
||||||
{%- for prc2 in sst.processing.blocks -%}
|
|
||||||
{{- '\n ' -}} <li>
|
|
||||||
{{- '\n ' -}}
|
|
||||||
<span class="ingredientprocessing">{{ prc2.process }}</span>
|
|
||||||
{{- '\n ' -}} </li>
|
|
||||||
{%- endfor -%}
|
|
||||||
{{- '\n ' -}} </ul>
|
|
||||||
{{- '\n ' -}} </li>
|
|
||||||
{{- '\n ' -}} </ul>
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- if sst.notes is defined and sst.notes != "" and sst.notes.blocks is defined and sst.notes.blocks != "" -%}
|
|
||||||
{%- if ing.notes.blocks != [] -%}
|
|
||||||
{{- '\n ' -}} <ul>
|
|
||||||
{{- '\n ' -}} <li>
|
|
||||||
{{- '\n ' -}}
|
|
||||||
<span class="ingredientnotes">Notiz
|
|
||||||
{%- for tmp_nde1 in sst.notes.blocks -%}
|
|
||||||
{%- if loop.index == 2 -%}
|
|
||||||
{{- 'en' -}}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endfor -%}
|
|
||||||
:</span>
|
|
||||||
{{- '\n ' -}}
|
|
||||||
<ul>
|
|
||||||
{%- for nde2 in sst.notes.blocks -%}
|
|
||||||
{{- '\n ' -}} <li>
|
|
||||||
{{- '\n ' -}}
|
|
||||||
<span class="ingredientnotes">{{ nde2.note }}</span>
|
|
||||||
{{- '\n ' -}} </li>
|
|
||||||
{%- endfor -%}
|
|
||||||
{{- '\n ' -}} </ul>
|
|
||||||
{{- '\n ' -}} </li>
|
|
||||||
{{- '\n ' -}} </ul>
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{{- '\n ' -}} </li>
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endfor -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endfor -%}
|
|
||||||
{{- '\n ' -}} </ul>
|
|
||||||
{{- '\n ' -}} </li>
|
|
||||||
{{- '\n ' -}} </ul>
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{{- '\n ' -}} </li>
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endfor -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endfor -%}
|
|
||||||
{{- '\n ' -}} </ul>
|
{{- '\n ' -}} </ul>
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{{- '\n ' -}} <ul>
|
{{- '\n ' -}} <ul>
|
||||||
|
@ -145,72 +40,12 @@
|
||||||
{%- if child.ingredients is defined and child.ingredients != "" %}
|
{%- if child.ingredients is defined and child.ingredients != "" %}
|
||||||
{%- if child.ingredients.blocks != [] -%}
|
{%- if child.ingredients.blocks != [] -%}
|
||||||
{{- '\n ' -}} <ul>
|
{{- '\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 != "" -%}
|
{%- include "zutaten/zutat_notes.html" -%}
|
||||||
{%- 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>
|
{{- '\n ' -}} </ul>
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{{- '\n ' -}} <ul>
|
{{- '\n ' -}} <ul>
|
||||||
|
|
Loading…
Reference in a new issue