{# CSS-only tabs shortcode. Uses radio buttons for tab switching. Parameters: labels (comma-separated tab labels) Body: tab content panels separated by markers #} {% set tab_labels = labels | split(pat=",") %} {% set tab_contents = body | split(pat="") %} {% set uid = labels | slugify %}
{# Radio inputs at the top level so sibling selectors work #} {% for label in tab_labels %} {% endfor %}
{% for label in tab_labels %} {% endfor %}
{% for label in tab_labels %}
{% if tab_contents[loop.index0] is defined %} {{ tab_contents[loop.index0] | safe }} {% endif %}
{% endfor %}