mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-04-30 23:00:30 +00:00
e9e8c8d218
Build and push containers / metadata (push) Has been cancelled
Build and push containers / build-push-containers (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Build distribution 📦 (push) Has been cancelled
ChangeDetection.io Container Build Test / Build linux/amd64 (alpine) (push) Has been cancelled
ChangeDetection.io Container Build Test / Build linux/arm64 (alpine) (push) Has been cancelled
ChangeDetection.io Container Build Test / Build linux/amd64 (main) (push) Has been cancelled
ChangeDetection.io Container Build Test / Build linux/arm/v7 (main) (push) Has been cancelled
ChangeDetection.io Container Build Test / Build linux/arm/v8 (main) (push) Has been cancelled
ChangeDetection.io Container Build Test / Build linux/arm64 (main) (push) Has been cancelled
ChangeDetection.io App Test / lint-code (push) Has been cancelled
ChangeDetection.io App Test / lint-translations (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Test the built package works basically. (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to PyPI (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-10 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-11 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-12 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-13 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-14 (push) Has been cancelled
48 lines
1.5 KiB
HTML
48 lines
1.5 KiB
HTML
{#
|
|
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') %}
|
|
<p>Overview content…</p>
|
|
{% endcall %}
|
|
{% call stab_pane('settings') %}
|
|
<p>Settings content…</p>
|
|
{% 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) %}
|
|
<div class="stab-shell" id="{{ shell_id }}">
|
|
<nav class="stab-nav" aria-label="{{ _('Settings sections') }}">
|
|
{%- for tab in tabs %}
|
|
<button class="stab-btn" type="button" data-stab="{{ tab.id }}" aria-controls="stab-pane-{{ tab.id }}">
|
|
{%- if tab.get('icon') %}<span class="stab-icon" aria-hidden="true">{{ tab.icon }}</span>{% endif -%}
|
|
{{ tab.label }}
|
|
</button>
|
|
{%- endfor %}
|
|
</nav>
|
|
<div class="stab-body">
|
|
{{ caller() }}
|
|
</div>
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
|
|
{% macro stab_pane(tab_id) %}
|
|
<div class="stab-pane" data-stab="{{ tab_id }}" id="stab-pane-{{ tab_id }}" role="tabpanel">
|
|
{{ caller() }}
|
|
</div>
|
|
{% endmacro %}
|