mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-31 20:00:00 -04:00
Merge pull request #3717 from alphagov/fix-nesting-in-content-page-sub-nav
Fix nesting in content page sub nav
This commit is contained in:
@@ -179,6 +179,12 @@
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
||||
ol,
|
||||
ul {
|
||||
margin-top: govuk-spacing(2);
|
||||
border-top: 1px $grey-3 solid;
|
||||
}
|
||||
}
|
||||
|
||||
&__item {
|
||||
@@ -199,6 +205,11 @@
|
||||
|
||||
ol ol & {
|
||||
padding-left: govuk-spacing(6);
|
||||
|
||||
&:last-of-type {
|
||||
border-bottom: none;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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