{# Layout Components Macros: page_header, section_card, info_item, info_grid, collapsible #} {% macro page_header(title, back_url="", description="") %} {# Page header with optional back arrow, title, and action buttons area. Args: title: Page title (h1) back_url: URL for back arrow (empty = no arrow) description: Optional subtitle text Usage: {% call page_header("Pipeline Details", back_url="/ci") %} {% endcall %} #}
{% if back_url %} {% endif %}

{{ title }}

{% if description %}

{{ description }}

{% endif %}
{{ caller() }}
{% endmacro %} {% macro section_card(title, subtitle="", icon="") %} {# Card with header bar and content. Content has NO padding — caller controls it. Use for tables, lists, editors that need to go edge-to-edge inside the card. Args: title: Section title in header subtitle: Optional right-aligned text in header icon: Optional Lucide icon before title Usage: {% call section_card("Run History") %} ...
{% endcall %} #}
{% if icon %} {% endif %}

{{ title }}

{% if subtitle %} {{ subtitle }} {% endif %}
{{ caller() }}
{% endmacro %} {% macro info_item(label, value, mono=false) %} {# Single label+value card cell for use inside info_grid. Args: label: Top label text value: Value to display mono: Use monospace font for value #}
{{ label }}
{{ value }}
{% endmacro %} {% macro info_grid(cols=4) %} {# Grid container for info_item cards. Args: cols: Number of columns (2, 3, or 4) Usage: {% call info_grid(4) %} {{ info_item("Branch", "main", mono=true) }} {{ info_item("Stages", "3 stages") }} {% endcall %} #}
{{ caller() }}
{% endmacro %} {% macro collapsible(title, expanded=true, id="") %} {# Collapsible section with Alpine.js toggle and chevron animation. Args: title: Section header text expanded: Start expanded or collapsed id: Optional DOM id Usage: {% call collapsible("Full Log", expanded=false) %}
...
{% endcall %} #}

{{ title }}

{{ caller() }}
{% endmacro %}