mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 01:23:11 -04:00
Indent sub navigation items
This commit is contained in:
@@ -108,6 +108,10 @@
|
|||||||
a:active {
|
a:active {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ol ol & {
|
||||||
|
padding-left: $gutter;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__item--active {
|
&__item--active {
|
||||||
|
|||||||
@@ -3,18 +3,20 @@ def features_nav():
|
|||||||
{
|
{
|
||||||
"name": "Features",
|
"name": "Features",
|
||||||
"link": "main.features",
|
"link": "main.features",
|
||||||
},
|
"sub_navigation_items": [
|
||||||
{
|
{
|
||||||
"name": "Emails",
|
"name": "Emails",
|
||||||
"link": "main.features_email",
|
"link": "main.features_email",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Text messages",
|
"name": "Text messages",
|
||||||
"link": "main.features_sms",
|
"link": "main.features_sms",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Letters",
|
"name": "Letters",
|
||||||
"link": "main.features_letters",
|
"link": "main.features_letters",
|
||||||
|
},
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Roadmap",
|
"name": "Roadmap",
|
||||||
|
|||||||
@@ -1,18 +1,29 @@
|
|||||||
|
{% 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 href="{{ url_for(item['link']) }}" itemprop="item">
|
||||||
|
<span itemprop="name">{{item['name']}}</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% 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 %}
|
||||||
<li class="sub-navigation__item {% if item['link'] == request.endpoint %} sub-navigation__item--active {% endif %}"
|
{{ sub_navigation_item(item) }}
|
||||||
itemprop="itemListElement"
|
{% if item.sub_navigation_items %}
|
||||||
itemscope
|
<ol itemscope itemtype="http://schema.org/ItemList">
|
||||||
itemtype="http://schema.org/ListItem"
|
{% for sub_item in item.sub_navigation_items %}
|
||||||
>
|
{{ sub_navigation_item(sub_item) }}
|
||||||
<a href="{{ url_for(item['link']) }}" itemprop="item">
|
{% endfor %}
|
||||||
<span itemprop="name">{{item['name']}}</span>
|
</ol>
|
||||||
</a>
|
{% endif %}
|
||||||
</li>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ol>
|
</ol>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
Reference in New Issue
Block a user