webseite/templates/zutaten/rezept_from_index.html

50 lines
1.6 KiB
HTML
Raw Normal View History

2021-08-11 21:42:40 +02:00
{#-
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 ' -}}
2021-09-05 01:54:19 +02:00
<h1 id="{{- child.parent._gid[:8] -}}-{{- child.parent._gid[-6:-2] -}}-{{- child._gid[-8:-4] }}-{{- child._gid[-4:] -}}-{{- child._gid[:12] -}}">
2021-12-23 23:49:35 +01:00
<a href="{{ child.parent | url }}">
2021-08-11 21:42:40 +02:00
{%- if child.recipe_name and child.recipe_name != "" -%}
{{ child.recipe_name }}</h1>
{%- else -%}
2021-12-23 23:49:35 +01:00
{{ child.title }}
2021-08-11 21:42:40 +02:00
{%- endif -%}
2021-12-23 23:49:35 +01:00
</a>
</h1>
2021-08-11 21:42:40 +02:00
{%- 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 -%}