webseite/templates/zutaten/steps.yaml
L3D fd742c7049 redesign website (!1)
Co-authored-by: L3D <l3d@see-base.de>
Reviewed-on: https://backwesen.de/c3woc/webseite/pulls/1
2022-05-18 00:35:37 +02:00

30 lines
1.1 KiB
YAML

{#-
Recipe Steps for loop
-#}
{%- if this.steps is defined and this.steps.blocks is defined and this.steps != "" -%}
{%- if this.steps.blocks is defined and this.steps.blocks != "" and this.steps.blocks != [] -%}
{{- '\n\nsteps:' -}}
{%- for stp in this.steps.blocks -%}
{%- if stp.step is defined and stp.step != "" -%}
{{- '\n - step: ' -}} "{{- stp.step -}}"
{%- if stp.haccp_type is defined and stp.haccp_type != "" and stp.haccp_string is defined and stp.haccp_string != "" -%}
{{- '\n haccp:' -}}
{{- '\n ' -}} {{- stp.haccp_type|lower -}}: "{{- stp.haccp_string -}}"
{%- endif %}
{%- if stp.notes is defined and stp.notes != "" and stp.notes.blocks is defined %}
{%- for nde in stp.notes.blocks %}
{%- if loop.index == 1 -%}
{{- '\n notes:' -}}
{%- endif -%}
{{- '\n - ' -}} "{{ nde.note }}"
{%- endfor %}
{%- endif %}
{%- endif %}
{%- endfor -%}
{{- '\n' -}}
{%- else -%}
{{- '\nsteps: []' -}}
{%- endif -%}
{%- else -%}
{{- '\n\nsteps: []' -}}
{%- endif -%}