Files
notifications-admin/app/templates/components/sub-navigation.html
Jonathan Bobel 348e29fb40 - Removed links to the gov uk stylesheets
- Deleted /stylesheets folder
- Removed sass build from gulpfile
- Changed gov links to usa links
- Changed other govuk styles, like breadcrumbs
- Changed name of uk_components file to us_components
- Fixed a few tests that broke on account of the changes
2023-08-08 16:19:17 -04:00

41 lines
1.2 KiB
HTML

{% macro sub_navigation_item(item) %}
<li class="usa-sidenav__item" href="{{ url_for(item['link']) }}"
itemprop="itemListElement"
itemscope
itemtype="http://schema.org/ListItem"
>
<a class="{% if item['link'] == request.endpoint %} usa-current {% endif %}" href="{{ url_for(item['link']) }}" itemprop="item">
<span itemprop="name">{{item['name']}}</span>
</a>
{% if caller %}
{{ caller() }}
{% endif %}
</li>
{% endmacro %}
{% macro sub_navigation_item_sub_navigation(item) %}
<ul class="usa-sidenav__sublist" itemscope itemtype="http://schema.org/ItemList">
{% for sub_item in item.sub_navigation_items %}
{{ sub_navigation_item(sub_item) }}
{% endfor %}
</ul>
{% endmacro %}
{% macro sub_navigation(
item_set
) %}
<nav aria-label="Side navigation,">
<ul class="usa-sidenav" itemtype="http://schema.org/ItemList">
{% for item in item_set %}
{% if item.sub_navigation_items %}
{% call sub_navigation_item(item) %}
{{ sub_navigation_item_sub_navigation(item) }}
{% endcall %}
{% else %}
{{ sub_navigation_item(item) }}
{% endif %}
{% endfor %}
</ul>
</nav>
{% endmacro %}