Update rezept zusammenfassung
This commit is contained in:
parent
9be29c26ef
commit
07ea84e89e
8 changed files with 104 additions and 10 deletions
|
@ -40,4 +40,4 @@ trailer:
|
|||
Du kennst noch weitere Möglichkeiten ein Waffeleisen zu verwenden? Wir freuen uns sehr, wenn du uns deine Rezepte und Ideen weiter gibst.
|
||||
Das geht per E-Mail. Alternativ kannst du es selbst hier veröffentlichen. Denn diese Webseite kannst du [auf GitHub](https://github.com/c3woc/c3woc-website.git) bearbeiten!
|
||||
---
|
||||
body: hello world
|
||||
body:
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
{%- for child in post.children -%}
|
||||
{%- if child._template == 'zutaten.yaml' -%}
|
||||
{%- if from_index -%}
|
||||
{{ '\n ' -}} <a href="{{ child|url }}/../">{{ child.recipe_name }}</a>
|
||||
{%- include "zutaten/rezept_from_index.html" -%}
|
||||
{%- else -%}
|
||||
{%- include "zutaten/rezept.html" -%}
|
||||
{%- endif -%}
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
{%- endif -%}
|
||||
{{- '\n ' -}} </div>
|
||||
{{- '\n ' -}} </div>
|
||||
{#-
|
||||
{#-
|
||||
|
||||
Nachdem die Zutaten des Rezept nun angegeben sind,
|
||||
folgt die Zubereitung der waffelfähigen Teigprodukte...
|
||||
|
@ -43,7 +43,7 @@
|
|||
{%- 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 != [] -%}
|
||||
{%- include "zutaten/zubereitung.html" -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- include "zutaten/hinweise.html" -%}
|
||||
{#-
|
||||
|
|
50
templates/zutaten/rezept_from_index.html
Normal file
50
templates/zutaten/rezept_from_index.html
Normal file
|
@ -0,0 +1,50 @@
|
|||
{#-
|
||||
HTML Rendering des Rezept aus dem zutaten.yaml template
|
||||
für die Übersichtsseite /rezept nur das nötigste...
|
||||
-#}
|
||||
|
||||
{%- for child in post.children -%}
|
||||
{%- if child._template == 'zutaten.yaml' -%}
|
||||
{#-
|
||||
|
||||
Zunächst werden die Zutaten des Rezept definiert...
|
||||
|
||||
-#}
|
||||
{{- '\n ' -}} <div class="content__box">
|
||||
{{- '\n ' -}} <div class="content__inner_box">
|
||||
{{- '\n ' -}}
|
||||
{%- if child.recipe_uuid is defined and child.recipe_uuid != "" -%}
|
||||
<h1 id="{{ child.recipe_uuid }}">
|
||||
{%- else -%}
|
||||
<h1>
|
||||
{%- endif -%}
|
||||
{%- if child.recipe_name and child.recipe_name != "" -%}
|
||||
{{ child.recipe_name }}</h1>
|
||||
{%- else -%}
|
||||
{{ child.title }}</h1>
|
||||
{%- endif -%}
|
||||
{%- if child.servings is defined and child.servings != "" -%}
|
||||
{%- if child.servings.blocks != [] -%}
|
||||
|
||||
{%- include "zutaten/zutaten_short.html" -%}
|
||||
|
||||
{%- else -%}
|
||||
<p>ungültige Rezeptangaben</p>
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{{- '\n ' -}} </div>
|
||||
{{- '\n ' -}} </div>
|
||||
{#-
|
||||
|
||||
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.blocks is defined and child.steps.blocks != "" and child.steps.blocks != [] -%}
|
||||
{%- set only_render_steps = true -%}
|
||||
{%- include "zutaten/zubereitung.html" -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
|
@ -9,14 +9,14 @@
|
|||
{%- 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 != "" -%}
|
||||
{%- if stp.haccp_type is defined and stp.haccp_type != "" and stp.haccp_string is defined and stp.haccp_string != "" and not only_render_steps | default(false) -%}
|
||||
{{- '\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 is defined and stp.notes != "" and stp.notes.blocks is defined and not only_render_steps | default(false) -%}
|
||||
{%- if stp.notes.blocks != [] -%}
|
||||
{{- '\n ' -}} <ul>
|
||||
{%- for nde in stp.notes.blocks -%}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
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 is defined and ing.processing != "" and ing.processing.blocks is defined and ing.processing.blocks != "" and not hide_recepie_processing | default(false) -%}
|
||||
{%- if ing.processing.blocks != [] -%}
|
||||
{%- for prc in ing.processing.blocks -%}
|
||||
{%- if loop.index == 1 -%}
|
||||
|
@ -40,7 +40,7 @@
|
|||
{#-
|
||||
Render alternativzutat, wenn verfügbar!
|
||||
-#}
|
||||
{%- if ing.substitutions is defined and ing.substitutions != "" -%}
|
||||
{%- if ing.substitutions is defined and ing.substitutions != "" and not hide_recepie_substitutions | default(false) -%}
|
||||
{%- if ing.substitutions.blocks is defined and ing.substitutions.blocks != "" -%}
|
||||
{%- if ing.substitutions.blocks != [] -%}
|
||||
{%- for sst in ing.substitutions.blocks -%}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
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 is defined and ing.processing != "" and ing.processing.blocks is defined and ing.processing.blocks != "" and not hide_recepie_processing | default(false) -%}
|
||||
{%- if ing.processing.blocks != [] -%}
|
||||
{%- for prc in ing.processing.blocks -%}
|
||||
{%- if loop.index == 1 -%}
|
||||
|
@ -32,7 +32,7 @@
|
|||
{#-
|
||||
Render alternativzutat, wenn verfügbar!
|
||||
-#}
|
||||
{%- if ing.substitutions is defined and ing.substitutions != "" -%}
|
||||
{%- if ing.substitutions is defined and ing.substitutions != "" and not hide_recepie_substitutions | default(false) -%}
|
||||
{%- if ing.substitutions.blocks is defined and ing.substitutions.blocks != "" -%}
|
||||
{%- if ing.substitutions.blocks != [] -%}
|
||||
{%- for sst in ing.substitutions.blocks -%}
|
||||
|
|
44
templates/zutaten/zutaten_short.html
Normal file
44
templates/zutaten/zutaten_short.html
Normal file
|
@ -0,0 +1,44 @@
|
|||
{#-
|
||||
Hier werden die einzelnen
|
||||
Zutaten für die kurzfassung des Rezept gerendert...
|
||||
-#}
|
||||
{%- 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
|
||||
|
||||
-#}
|
||||
{%- set prt_loop = 1 -%}
|
||||
{%- set hide_recepie_processing = true -%}
|
||||
{%- set hide_recepie_substitutions = true -%}
|
||||
{%- if loop.index == 1 -%}
|
||||
{#-
|
||||
in der prt_loop variable speichern wir in welchem loop index die zutat steht.
|
||||
Wir wollen hier nur die erste angabe (loop.index == 1) rendern.
|
||||
-#}
|
||||
{%- if child.ingredients is defined and child.ingredients != "" %}
|
||||
{%- 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>
|
||||
{%- else -%}
|
||||
{{- '\n ' -}} <ul>
|
||||
{{- '\n ' -}} <span>Keine Zutaten definiert</span>
|
||||
{{- '\n ' -}} </ul>
|
||||
{%- endif -%}
|
||||
{%- else -%}
|
||||
{{- '\n ' -}} <ul>
|
||||
{{- '\n ' -}} <span>Keine Zutaten definiert</span>
|
||||
{{- '\n ' -}} </ul>
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
||||
|
||||
{%- endfor -%}
|
Loading…
Reference in a new issue