{% macro plot_grid(array_element, subitem, active_subitem, rows, cols, plot_titles, max_plots_row) %}

<div id="page-content-wrapper">
    <div class="container-flex px-3 xyz">
        <h4>Welcome to the 'naked' {{ array_element }} '{{ subitem }}' page</h4>
        <p>Here there should be several {{ subitem }} plots etc.</p>

        {% for title in plot_titles %}
        {% set idx = loop.index0 %}
        {% if idx % max_plots_row == 0 %}
        <div class="row mb-3">
            {% endif %}

            <div class={% if cols<=2 %}"col-lg-6 col-md-12 mb-3"{% endif %} {% if cols>2 %}"col-xl-4 col-lg-6 col-md-12
                mb-3"{% endif %}>
                <div class="badger" data-badger-left="{{ array_element }} {{ subitem }} plot {{ title }}"
                    data-badger-right="CRITERIA">
                    <div id="plot-{{ active_subitem }}_{{ title }}" style="height: 300px;">
                        <h5 class="card-text">
                            Placeholder for {{ array_element }} {{ subitem }} plot {{ title
                            }}
                        </h5>
                    </div>
                </div>
            </div>
            {% if idx % max_plots_row == max_plots_row - 1 %}
        </div> {% endif %}
        {% endfor %}

    </div>
</div>

{% endmacro %}
