{% extends 'partials/base.html.twig' %} {% block extra_css %} {% endblock %} {% block extra_js %} {% endblock %} {% macro imagegrid(images, dummy_start, count) %}
{% if images|length > 0 %} {% for img in images|slice(0, count) %}
{% endfor %} {% else %} {% for i in dummy_start..(dummy_start + count - 1) %}
{% endfor %} {% endif %}
{% endmacro %} {% import _self as gallery %} {% block content %} {% set section1_images = (page.header.section1_images ?? [])|map(item => page.media[item.image] ?? null)|filter(img => img is not null) %} {% set section2_images = (page.header.section2_images ?? [])|map(item => page.media[item.image] ?? null)|filter(img => img is not null) %}
Concept: tekst + 2 foto's / 2 foto's + tekst
{{ gallery.imagegrid(section1_images, 1, 2) }}

{{ page.title }}

{% if page.header.intro %}{{ page.header.intro|markdown }}{% endif %} {% if page.header.section1_heading %}

{{ page.header.section1_heading }}

{% endif %} {{ page.header.section1_text|markdown }}
{% if page.header.section2_heading %}

{{ page.header.section2_heading }}

{% endif %} {{ page.header.section2_text|markdown }}
{{ gallery.imagegrid(section2_images, 5, 2) }}
{% endblock %}