{# Vertical sub-tab macros — reusable across any settings pane. Usage: {% from '_stab.html' import stab_shell, stab_pane %} {% call stab_shell('my-shell-id', [ {'id': 'overview', 'label': _('Overview'), 'icon': '✦'}, {'id': 'settings', 'label': _('Settings'), 'icon': '⚙'}, ]) %} {% call stab_pane('overview') %}

Overview content…

{% endcall %} {% call stab_pane('settings') %}

Settings content…

{% endcall %} {% endcall %} Tabs are switched by sub-tabs.js (looks for .stab-shell elements). Hidden panes use visibility:hidden so form fields inside still submit. Active tab is persisted in localStorage keyed by shell id. data-stab-goto="tab-id" on any element inside the shell navigates to that tab. #} {% macro stab_shell(shell_id, tabs) %}
{{ caller() }}
{% endmacro %} {% macro stab_pane(tab_id) %}
{{ caller() }}
{% endmacro %}