{% macro modal(id, title='', body=None, class_name='modal hidden', attrs=None) -%} {% set _attrs = attrs or {} %}

{{ title }}

{% if body %} {{ body }} {% endif %} {% if caller %} {{ caller() }} {% endif %}
{%- endmacro %} {% macro loading_spinner(label=None) -%}
{{ label or _("Loading...") }}
{%- endmacro %} {% macro card(title=None, description=None, footer=None) -%}
{% if title %}

{{ title }}

{% endif %} {% if description %}

{{ description }}

{% endif %} {% if caller %}
{{ caller() }}
{% endif %} {% if footer %}
{{ footer }}
{% endif %}
{%- endmacro %} {% macro numbered_pagination(current_page, total_pages, on_click_fn='paginateTo') -%} {# Renders a numbered pagination component with ellipsis for many pages Example: 1, 2, 3, 4, 5, ..., 9 (shows first 5 and last page when > 6 pages) Args: current_page: The current active page (1-indexed) total_pages: Total number of pages on_click_fn: JavaScript function to call with page number (default: 'paginateTo') #} {% if total_pages > 1 %} {% endif %} {%- endmacro %}