Sha256: 6df289f20b3f0d1f9288bf5635ce170f72d5cd0768188f304b31879534d1a3d8
Contents?: true
Size: 1.41 KB
Versions: 112
Compression:
Stored size: 1.41 KB
Contents
{#- If an id 'prefix' is not passed, fall back to using the name attribute instead. We need this for error messages and hints as well -#} {% set idPrefix = params.idPrefix if params.idPrefix %} <div {%- if params.id %} id="{{params.id}}"{% endif %} class="govuk-tabs {%- if params.classes %} {{ params.classes }}{% endif %}" {%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %} data-module="tabs"> <h2 class="govuk-tabs__title"> {{ params.title | default ("Contents") }} </h2> {% if(params.items) %} <ul class="govuk-tabs__list"> {% for item in params.items %} {% set id = item.id if item.id else idPrefix + "-" + loop.index %} <li class="govuk-tabs__list-item"> <a class="govuk-tabs__tab{% if loop.index == 1 %} govuk-tabs__tab--selected{% endif %}" href="#{{ id }}" {%- for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}> {{ item.label }} </a> </li> {% endfor %} </ul> {% endif %} {% for item in params.items %} {% set id = item.id if item.id else idPrefix + "-" + loop.index %} <section class="govuk-tabs__panel{% if loop.index > 1 %} govuk-tabs__panel--hidden{% endif %}" id="{{ id }}"{% for attribute, value in item.panel.attributes %} {{attribute}}="{{value}}"{% endfor %}> {{ item.panel.html | safe if item.panel.html else item.panel.text }} </section> {% endfor %} </div>
Version data entries
112 entries across 112 versions & 1 rubygems