diff --git a/content/rezept/contents.lr b/content/rezept/contents.lr index 6240846..dd67388 100644 --- a/content/rezept/contents.lr +++ b/content/rezept/contents.lr @@ -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: diff --git a/templates/macros/rezept.html b/templates/macros/rezept.html index 12f54e6..12613eb 100644 --- a/templates/macros/rezept.html +++ b/templates/macros/rezept.html @@ -8,7 +8,7 @@ {%- for child in post.children -%} {%- if child._template == 'zutaten.yaml' -%} {%- if from_index -%} - {{ '\n ' -}} {{ child.recipe_name }} + {%- include "zutaten/rezept_from_index.html" -%} {%- else -%} {%- include "zutaten/rezept.html" -%} {%- endif -%} diff --git a/templates/zutaten/rezept.html b/templates/zutaten/rezept.html index 6027ff3..a4a6e55 100644 --- a/templates/zutaten/rezept.html +++ b/templates/zutaten/rezept.html @@ -34,7 +34,7 @@ {%- endif -%} {{- '\n ' -}} {{- '\n ' -}} - {#- + {#- 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" -%} {#- diff --git a/templates/zutaten/rezept_from_index.html b/templates/zutaten/rezept_from_index.html new file mode 100644 index 0000000..26e6b4e --- /dev/null +++ b/templates/zutaten/rezept_from_index.html @@ -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 ' -}}
+ {{- '\n ' -}}
+ {{- '\n ' -}} + {%- if child.recipe_uuid is defined and child.recipe_uuid != "" -%} +

+ {%- else -%} +

+ {%- endif -%} + {%- if child.recipe_name and child.recipe_name != "" -%} + {{ child.recipe_name }}

+ {%- else -%} + {{ child.title }} + {%- endif -%} + {%- if child.servings is defined and child.servings != "" -%} + {%- if child.servings.blocks != [] -%} + + {%- include "zutaten/zutaten_short.html" -%} + + {%- else -%} +

ungültige Rezeptangaben

+ {%- endif -%} + {%- endif -%} + {{- '\n ' -}}
+ {{- '\n ' -}}
+ {#- + + 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 -%} diff --git a/templates/zutaten/zubereitung.html b/templates/zutaten/zubereitung.html index 13e0734..7f4c5de 100644 --- a/templates/zutaten/zubereitung.html +++ b/templates/zutaten/zubereitung.html @@ -9,14 +9,14 @@ {%- if stp.step is defined and stp.step != "" -%} {{- '\n ' -}}
  • {{- '\n ' -}} {{ stp.step }} - {%- 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 ' -}} {%- 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 ' -}}