mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-23 20:01:01 -05:00
Includes: - turning off :visited styles to match existing design - swapping heading classes used to make links bold for the GOVUK Frontend bold override class - adding visually hidden text to some links to make them work when isolated from their context We may need to revisit whether some links, such as those for documentation and features, may benefit from having some indication that their target has been visited.
31 lines
977 B
HTML
31 lines
977 B
HTML
{% from 'components/big-number.html' import big_number %}
|
|
|
|
{% macro pill(
|
|
items=[],
|
|
current_value=None,
|
|
big_number_args={'smaller': True},
|
|
show_count=True
|
|
) %}
|
|
<ul role='tablist' class='pill'>
|
|
{% for label, option, link, count in items %}
|
|
{% if current_value == option %}
|
|
<li aria-selected='true' role='tab'>
|
|
<div class='pill-selected-item{% if not show_count %} pill-centered-item{% endif %}' tabindex='0'>
|
|
{% else %}
|
|
<li aria-selected='false' role='tab'>
|
|
<a class="govuk-link govuk-link--no-visited-state" href="{{ link }}">
|
|
{% endif %}
|
|
{% if show_count %}
|
|
{{ big_number(count, **big_number_args) }}
|
|
{% endif %}
|
|
<div class="pill-label{% if not show_count %} pill-centered-item{% endif %}">{{ label }}</div>
|
|
{% if current_value == option %}
|
|
</div>
|
|
{% else %}
|
|
</a>
|
|
{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endmacro %}
|