webseite/templates/macros/rezept.html

40 lines
1.4 KiB
HTML
Raw Normal View History

2021-06-24 23:44:12 +02:00
{%- macro render_rezept_post(post, from_index=false, section_class='-odd') -%}
{{- '\n ' -}} <section class="content {{ section_class }}">
{{- '\n ' -}} <div class="content__box -heading">
{{- '\n ' -}} <div class="content__inner_box">
{%- if from_index -%}
{{- '\n ' -}} <h2><a class="content__blog_link {{ section_class }}" href="{{ post|url }}">{{ post.title }}</a></h2>
{%- else -%}
{{- '\n ' -}} <h2>{{ post.title }}</h2>
{% endif %}
{{- '\n ' -}} <hr class="{{ section_class }}">
{{- '\n ' -}} <p class="content__meta">
2021-07-31 21:13:24 +02:00
{{- '\n ' -}} <i>Ein Waffelrezept von {{ post.author }}</i>
2021-06-24 23:44:12 +02:00
{{- '\n ' -}} </p>
{{- '\n ' -}} </div>
{{- '\n ' -}} </div>
2021-07-31 18:48:28 +02:00
{%- if post.orf | default(false) -%}
{#-
Render recepie based on open recipe format
defined in zutaten.yml
-#}
2021-06-24 23:44:12 +02:00
{%- for child in post.children -%}
{%- if child._template == 'zutaten.yaml' -%}
2021-07-31 18:48:28 +02:00
{%- if from_index -%}
{{ '\n ' -}} <p>{{ child.recipe_name }}</p>
2021-06-24 23:44:12 +02:00
{%- else -%}
2021-07-29 01:15:36 +02:00
2021-07-31 18:48:28 +02:00
{%- include "zutaten/rezept.html" -%}
2021-07-29 01:15:36 +02:00
2021-06-24 23:44:12 +02:00
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{%- endif %}
{{- '\n ' -}} <div class="content__box">
{{- '\n ' -}} <div class="content__inner_box">
{{- '\n ' -}} {{- post.body -}}
{{- '\n ' -}} </div>
{{- '\n ' -}} </div>
{{- '\n ' -}} </section>
{%- endmacro -%}