webseite/templates/macros/rezept.html
2021-08-08 23:35:54 +02:00

24 lines
757 B
HTML

{%- macro render_rezept_post(post, from_index=false, section_class='-odd') -%}
{{- '\n ' -}} <section class="content {{ section_class }}">
{%- if post.orf | default(false) -%}
{#-
Render recepie based on open recipe format
defined in zutaten.yml
-#}
{%- for child in post.children -%}
{%- if child._template == 'zutaten.yaml' -%}
{%- if from_index -%}
{{ '\n ' -}} <p>{{ child.recipe_name }}</p>
{%- else -%}
{%- include "zutaten/rezept.html" -%}
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{%- include "macros/rezept_body.html" -%}
{%- else -%}
{%- include "macros/rezept_body.html" -%}
{%- endif %}
{{- '\n ' -}} </section>
{%- endmacro -%}