webseite/templates/macros/rezept.html
2021-08-11 01:21:25 +02:00

25 lines
874 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 ' -}} <a href="{{ child|url }}/../">{{ child.recipe_name }}</a>
{%- else -%}
{%- include "zutaten/rezept.html" -%}
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{%- include "macros/rezept_body.html" -%}
{%- if not from_index -%}
{%- include "zutaten/hygiene.html" -%}
{%- endif %}
{%- else -%}
{%- include "macros/rezept_body.html" -%}
{%- endif %}
{{- '\n ' -}} </section>
{%- endmacro -%}