{% macro print_recipe(recipe) %}
{% set_global image = "../static/temp.jpg" %} {% for asset in recipe.assets %} {% if asset is matching("[img.](jpg|png)$") %} {% set_global image = asset %} {% break %} {% endif %} {% endfor %} {% set image = resize_image(path=image, width=300, height=300, op="fill") %}
{{ recipe.title }}
{% if recipe.date %}{{ recipe.date | date(format="%d.%m.%Y") }}{% endif %}
{% endmacro print_recipe %} {% macro pagination() %} {% if paginator.previous %} {% else %} {% endif %} {{ paginator.current_index }} / {{ paginator.number_pagers }} {% if paginator.next %} {% else %} {% endif %} {% endmacro pagination %} {% macro subnav() %} {% endmacro subnav %} {% macro tags_in_category() %} {% set_global tags = [] %} {% for page in term.pages %} {% for tag in page.taxonomies.tagy %} {% set_global tags = tags | concat(with=tag) %} {% endfor %} {% endfor %} {% set_global tags = tags | sort | unique %} {% for tag in tags %} {{ tag }} {% endfor %} {% endmacro tags_in_category %} {% macro recipe_image() %} {% for asset in page.assets %} {% if asset is matching("[img.](jpg|png)$") %} {% set image = resize_image(path=asset, width=900, height=400, op="fill") %} Náhled {% break %} {% endif %} {% endfor %} {% endmacro recipe_image %} {% macro recipe_meta() %} {% if page.extra.portions %}{{ page.extra.portions }}{% endif %} {% if page.extra.time %}{{ page.extra.time }} min{% endif %} {% if page.extra.source %}{{ page.extra.source }}{% endif %} {% endmacro recipe_meta %} {% macro recipe_taxonomies() %} {% if page.taxonomies.kategorie %} {% set categories = page.taxonomies.kategorie %}
Kategorie –  {% for term in categories %} {{ term | capitalize() }} {% endfor %}
{% endif %} {% if page.taxonomies.tagy %} {% set tags = page.taxonomies.tagy %}
Tagy –  {% for term in tags %} {{ term | capitalize() }} {% endfor %}
{% endif %} {% endmacro recipe_taxonomies %} {% macro list_terms() %} {% if terms %} {% endif %} {% endmacro list_terms %}