{% macro data_table(id, headers=[], rows=[], sortable=true, pagination=true, searchable=true, items_per_page=10) %}
{% if searchable and rows|length > 7 %}
{% endif %}
{% for header in headers %} {% endfor %} {% for row in rows %} {% for cell in row %} {% endfor %} {% endfor %}
{{ header }} {% if sortable %} {% endif %}
{{ cell }}
{% if pagination and rows|length > items_per_page %}
Page 1 of {{ (rows|length / items_per_page)|round(0, 'ceil')|int }}
{% endif %} {% if sortable or pagination or searchable %} {% endif %}
{% endmacro %}