{# Table component with dark theme styling. Usage: {% from "components/table.html" import table, table_row %} {% call table(columns=["Name", "Status", "Actions"]) %} {% for item in items %} {{ table_row([item.name, item.status, actions_html]) }} {% endfor %} {% endcall %} #} {% macro table(columns, class="", id="") %}
{% for col in columns %} {% endfor %} {{ caller() }}
{{ col }}
{% endmacro %} {% macro table_row(cells, class="", href=None) %} {% for cell in cells %} {% if href and loop.first %} {{ cell }} {% else %} {{ cell | safe }} {% endif %} {% endfor %} {% endmacro %} {% macro empty_row(colspan, message="No items found") %} {{ message }} {% endmacro %}