{% set weekdays = ['Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So'] %} {% set rows = [ {label: 'Preis', key: 'hasPrice', color: 'bg-brand-mid', legend: 'Preiskonfigurationen'}, {label: 'Verpfl.', key: 'hasBoard', color: 'bg-emerald-600', legend: 'Verpflegungsleistungen'}, {label: 'Zusatzl.', key: 'hasAdditional', color: 'bg-amber-500', legend: 'optionale Zusatzleistungen'}, {label: 'n. v.', key: 'isBlocked', color: 'bg-red-700', legend: 'nicht verfügbar'}, ] %}
{% for month in months %} {% set totalCols = month.firstDow + (month.days | length) %}

{{ month.label }}

{% for col in 0..(totalCols - 1) %} {% set dow = col % 7 %}
{{ weekdays[dow] }}
{% endfor %}
{% if month.firstDow > 0 %} {% for i in 1..month.firstDow %}
{% endfor %} {% endif %} {% for dayNum, day in month.days %}
{{ dayNum }}
{% endfor %}
{% for row in rows %}
{{ row.label }}
{% if month.firstDow > 0 %} {% for i in 1..month.firstDow %}
{% endfor %} {% endif %} {% for dayNum, day in month.days %}
{% endfor %}
{% endfor %}
{% endfor %}
{% for row in rows %}
{{ row.legend }}
{% endfor %}