mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04: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">
|
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for(item['link']) }}" itemprop="item">
|
||||||
<span itemprop="name">{{item['name']}}</span>
|
<span itemprop="name">{{item['name']}}</span>
|
||||||
</a>
|
</a>
|
||||||
|
{% if caller %}
|
||||||
|
{{ caller() }}
|
||||||
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
{% endmacro %}
|
{% 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(
|
{% macro sub_navigation(
|
||||||
item_set
|
item_set
|
||||||
) %}
|
) %}
|
||||||
<nav class="sub-navigation">
|
<nav class="sub-navigation">
|
||||||
<ol itemscope itemtype="http://schema.org/ItemList">
|
<ol itemscope itemtype="http://schema.org/ItemList">
|
||||||
{% for item in item_set %}
|
{% for item in item_set %}
|
||||||
{{ sub_navigation_item(item) }}
|
|
||||||
{% if item.sub_navigation_items %}
|
{% if item.sub_navigation_items %}
|
||||||
<ol itemscope itemtype="http://schema.org/ItemList">
|
{% call sub_navigation_item(item) %}
|
||||||
{% for sub_item in item.sub_navigation_items %}
|
{{ sub_navigation_item_sub_navigation(item) }}
|
||||||
{{ sub_navigation_item(sub_item) }}
|
{% endcall %}
|
||||||
{% endfor %}
|
{% else %}
|
||||||
</ol>
|
{{ sub_navigation_item(item) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ol>
|
</ol>
|
||||||
|
|||||||
Reference in New Issue
Block a user