{% set statsClasses = 'stats--' ~ settings.view %}
{% for stat in stats %}
{% include 'elementstats/widgets/stats/_item.html' with {
stat: stat,
total: totals[stat.handle],
itemClass: loop.last ? 'last',
} %}
{% endfor %}
{# Can we please use CSS grid layout already... #}
{% for i in 1..10 %}
{% endfor %}
{% endif %}
{% if not stats %}
{{ 'No stat has been selected yet.'|t }}
{% endif %}
{% if error %}
{{ 'There was an error while generating the stats.'|t }}