improve HTML rendering
This commit is contained in:
parent
ee82ebf6b4
commit
0f7cf7892d
8 changed files with 121 additions and 113 deletions
|
@ -55,7 +55,7 @@ inner_box:
|
|||
##### flow_one_innerbox_section #####
|
||||
title: klassischer Waffelteig
|
||||
-----
|
||||
box_image: sweet_waffle.jpg
|
||||
box_image: waffle_apfelmus.jpg
|
||||
-----
|
||||
box_content:
|
||||
|
||||
|
@ -66,6 +66,8 @@ Aus Eiern, Butter, Zucker, Mehl, Milch, Vanille, Backpulver und optional ein wen
|
|||
box_link: klassische Waffel
|
||||
-----
|
||||
box_url: /rezept/klassisch/
|
||||
-----
|
||||
image_alt:
|
||||
##### flow_one_innerbox_section #####
|
||||
title: laktosefreier Waffelteig
|
||||
-----
|
||||
|
@ -80,6 +82,8 @@ Das gilt für alle Zutaten, auser den Eiern. Mit beispielsweise veganer Magarine
|
|||
box_link: laktosefrei
|
||||
-----
|
||||
box_url: /rezept/laktose/
|
||||
-----
|
||||
image_alt:
|
||||
##### flow_one_innerbox_section #####
|
||||
title: Waffel mit Akzent
|
||||
-----
|
||||
|
@ -94,6 +98,8 @@ Es gibt Zimt, Kardamom, Chilli, frische Kräuter und vieles mehr. Probiert es do
|
|||
box_link: verfeinerter Teig
|
||||
-----
|
||||
box_url: /rezept/gewuerz/
|
||||
-----
|
||||
image_alt:
|
||||
#### flow_seperator ####
|
||||
#### flow_boxes_section ####
|
||||
title: Sei teil der Waffel Community
|
||||
|
|
|
@ -10,3 +10,5 @@ Der klassischer Waffelteig ist zu finden auf:
|
|||
pub_date: 2021-07-19
|
||||
---
|
||||
orf: yes
|
||||
---
|
||||
weight: 1
|
||||
|
|
|
@ -41,10 +41,16 @@ processing:
|
|||
|
||||
##### flow_processing #####
|
||||
process: rohe Eier strikt räumlich getrennt von anderen Lebensmitteln verarbeiten
|
||||
-----
|
||||
short:
|
||||
##### flow_processing #####
|
||||
process: Ei vor dem Aufschlagen waschen und wenn möglich desinfizieren
|
||||
-----
|
||||
short:
|
||||
##### flow_processing #####
|
||||
process: alle Teile des Ei sind nach dem Aufschlagen so schnell wie möglich zu verarbeiten
|
||||
-----
|
||||
short:
|
||||
----
|
||||
notes:
|
||||
|
||||
|
@ -119,6 +125,8 @@ processing:
|
|||
|
||||
##### flow_processing #####
|
||||
process: weich oder zerlassen
|
||||
-----
|
||||
short: yes
|
||||
----
|
||||
notes:
|
||||
----
|
||||
|
|
BIN
content/waffle_apfelmus.jpg
(Stored with Git LFS)
Normal file
BIN
content/waffle_apfelmus.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
|
@ -6,3 +6,10 @@ button_label = Zutat verarbeitungsmöglichkeit
|
|||
label = describe the processing of this item
|
||||
type = string
|
||||
description = Examples: whole, diced, minced, steamed, raw
|
||||
width = 2/3
|
||||
|
||||
[fields.short]
|
||||
type = boolean
|
||||
label = Kurzbeschreibung
|
||||
description = Ankreuzen wenn es hier ausschließlich eine kurzbeschreibung gibt
|
||||
width = 1/3
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
|
||||
{%- include "zutaten/zutaten.html" -%}
|
||||
|
||||
{%- else -%}
|
||||
<p>ungültige Rezeptangaben</p>
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{{- '\n ' -}} </div>
|
||||
|
|
|
@ -1,117 +1,90 @@
|
|||
{%- 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>
|
||||
{#-
|
||||
|
||||
Hier wird eine Zutaten tabelle gerendert.
|
||||
Zusammen mit einem Link auf den Verarbeitungshinweis
|
||||
oder eine Notiz zur Zutat.
|
||||
Der Text zum Hinweis oder der Notiz wird hier nicht gerendert.
|
||||
|
||||
-#}
|
||||
{%- if child.ingredients.blocks != [] -%}
|
||||
{%- for ing in child.ingredients.blocks -%}
|
||||
{%- 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 != [] -%}
|
||||
{#-
|
||||
|
||||
Wenn eine Zutat-Menge definiert ist, wird diese im folgenden for loop gerendert.
|
||||
Sollte es unterschiedliche Teig-Mengen geben, ist die reinfolge der Zutatenmenge relevant.
|
||||
Wenn also ein Rezept für 2 größen definiert ist, wird für die erste größe die erste Zutat genommen.
|
||||
Und für die zweite größe die andere.
|
||||
|
||||
ABER, wenn eine der Zutat Null bzw. 0 ist, dann wird diese eine Zutat nicht gerendert.
|
||||
|
||||
-#}
|
||||
{%- 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' and amt.amount != 'Null' -%}
|
||||
{{- '\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>
|
||||
{#-
|
||||
Hier wird eine kurznotiz zur verarbeitung gerendert
|
||||
oder ein Link zur Verarbeitungsnotiz.
|
||||
-#}
|
||||
{%- if ing.processing is defined and ing.processing != "" and ing.processing.blocks is defined and ing.processing.blocks != "" -%}
|
||||
{%- if ing.processing.blocks != [] -%}
|
||||
{%- for prc in ing.processing.blocks -%}
|
||||
{%- if loop.index == 1 -%}
|
||||
{%- if prc.short|default(False) -%}
|
||||
{{- ' ' -}}
|
||||
<i>({{ prc.process }})</i>
|
||||
{%- else -%}
|
||||
{{- ' ' -}}
|
||||
<i>(<a href="#processing_{{- ing.ingredient | string -}}"_ class="processing">Angaben zur Verarbeitung von {{ ing.ingredient }} beachten</a>)</i>
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{{- '\n ' -}} </li>
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- if ing.substitutions is defined and ing.substitutions != "" -%}
|
||||
{%- if ing.substitutions.blocks is defined and ing.substitutions.blocks != "" -%}
|
||||
{%- if ing.substitutions.blocks != [] -%}
|
||||
{%- 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' -%}
|
||||
{{- ' ' -}}<i><span
|
||||
{%- if sst.usda_num is defined and sst.usda_num != "" -%}
|
||||
{{- ' id=' -}}"usda_{{- sst.usda_num -}}"
|
||||
{%- endif -%}
|
||||
>(alternativ {{ sst.ingredient }})</span></i>
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{{- '\n ' -}} </li>
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endfor -%}
|
||||
{%- else -%}
|
||||
{#-
|
||||
|
||||
Wenn eine Zutat keine klare Menge hat, wird diese ohne genaue größenangabe gerendert.
|
||||
|
||||
-#}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
{#-
|
||||
Hier werden die Zutaten für das Rezept gerendert...
|
||||
Hier werden die einzelnen
|
||||
Zutaten für das Rezept gerendert...
|
||||
|
||||
Und falls vorhanden noch der Hinweis auf Angaben zur Zutat.
|
||||
-#}
|
||||
{%- for prt in child.servings.blocks -%}
|
||||
{#-
|
||||
|
@ -22,6 +25,10 @@
|
|||
{%- if child.ingredients.blocks != [] -%}
|
||||
{{- '\n ' -}} <ul>
|
||||
|
||||
{#-
|
||||
Hier wird nun die konkrete Zutat angegeben.
|
||||
Also zB. Eier: 4 Stück.
|
||||
-#}
|
||||
{%- include "zutaten/zutat_menge.html" -%}
|
||||
|
||||
{{- '\n ' -}} </ul>
|
||||
|
|
Loading…
Reference in a new issue