webseite/templates/zutaten/rezept.html

116 lines
4.6 KiB
HTML
Raw Normal View History

2021-07-31 18:48:28 +02:00
{#-
HTML Rendering des Rezept aus dem zutaten.yaml template
für die Detailseite des Rezepts.
-#}
{%- for child in post.children -%}
{%- if child._template == 'zutaten.yaml' -%}
{{- '\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.html" -%}
{%- endif -%}
{%- endif -%}
{{- '\n ' -}} </div>
{{- '\n ' -}} </div>
{%- endif -%}
{#-
Rezept Schritte...
-#}
{%- 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 != [] -%}
{{- '\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>
{%- endif -%}
{%- endif -%}
{%- 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 -%}
{#-
{%- 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" -#}
{%- endfor -%}