mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-16 08:24:28 -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
{% macro sub_navigation_item(item) %}
|
|
<li class="sub-navigation__item {% if item['link'] == request.endpoint %} sub-navigation__item--active {% endif %}"
|
|
itemprop="itemListElement"
|
|
itemscope
|
|
itemtype="http://schema.org/ListItem"
|
|
>
|
|
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for(item['link']) }}" itemprop="item">
|
|
<span itemprop="name">{{item['name']}}</span>
|
|
</a>
|
|
</li>
|
|
{% endmacro %}
|
|
|
|
{% macro sub_navigation(
|
|
item_set
|
|
) %}
|
|
<nav class="sub-navigation">
|
|
<ol itemscope itemtype="http://schema.org/ItemList">
|
|
{% for item in item_set %}
|
|
{{ sub_navigation_item(item) }}
|
|
{% if item.sub_navigation_items %}
|
|
<ol itemscope itemtype="http://schema.org/ItemList">
|
|
{% for sub_item in item.sub_navigation_items %}
|
|
{{ sub_navigation_item(sub_item) }}
|
|
{% endfor %}
|
|
</ol>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ol>
|
|
</nav>
|
|
{% endmacro %}
|