{# Embeddable Panel Component Base panel/callout layout with overridable blocks. Use with {% embed %}. Blocks: - icon: Icon area (defaults to variant-specific icon) - title: Panel title (optional) - body: Main panel content (required) - actions: Action buttons/links (optional) Args (via context): - variant: Panel type - 'info' | 'warning' | 'danger' | 'success' | 'tip' (default: 'info') - collapsible: Make panel collapsible (default: false) - open: If collapsible, start expanded (default: true) Example: {% embed 'partials/_embeds/panel.html' %} {% block title %}Important Note{% end %} {% block body %}
This is critical information.
{% end %} {% end %} Example with variant: {% with variant='warning' %} {% embed 'partials/_embeds/panel.html' %} {% block title %}Warning{% end %} {% block body %}Be careful!
{% end %} {% block actions %} Safety Guide → {% end %} {% end %} {% end %} #} {% let panel_variant = variant ?? 'info' %} {% let panel_collapsible = collapsible ?? false %} {% let panel_open = open ?? true %} {% let icons = {'info': 'info', 'warning': 'warning', 'danger': 'x-circle', 'success': 'check-circle', 'tip': 'lightbulb'} %} {% let default_icon = icons[panel_variant] ?? 'info' %} {% if panel_collapsible %} {% else %} {% end %}