mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-23 20:01:01 -05:00
Nest child lists inside list items
It's not valid HTML for <ol> or <ul> tags to have <ol> or <ul>'s as direct children. See: https://www.w3.org/TR/html52/grouping-content.html#the-ol-element https://www.w3.org/TR/html52/grouping-content.html#the-ul-element
This commit is contained in:
@@ -7,22 +7,32 @@
|
||||
<a class="govuk-link govuk-link--no-visited-state" 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) %}
|
||||
<ol itemscope itemtype="http://schema.org/ItemList">
|
||||
{% for sub_item in item.sub_navigation_items %}
|
||||
{{ sub_navigation_item(sub_item) }}
|
||||
{% endfor %}
|
||||
</ol>
|
||||
{% 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>
|
||||
{% call sub_navigation_item(item) %}
|
||||
{{ sub_navigation_item_sub_navigation(item) }}
|
||||
{% endcall %}
|
||||
{% else %}
|
||||
{{ sub_navigation_item(item) }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ol>
|
||||
|
||||
Reference in New Issue
Block a user