Add subnav behavior to SidenavItem module
This commit is contained in:
@@ -1,11 +1,24 @@
|
||||
<div class="global-navigation sidenav global-navigation__context--{{context}}">
|
||||
<ul>
|
||||
{% if dev() %}
|
||||
{% module SidenavItem("Styleguide", href="/styleguide", icon="visible", active=matchesPath('/styleguide')) %}
|
||||
{% module SidenavItem("Styleguide",
|
||||
href="/styleguide",
|
||||
icon="visible",
|
||||
active=matchesPath('/styleguide'),
|
||||
subnav=[
|
||||
{"label":"Subnav 1", "href":"/styleguide?subnav1", "icon": "plus", "active": matchesPath('/styleguide?subnav1')},
|
||||
{"label":"Subnav 2", "href":"/styleguide?subnav2", "active": matchesPath('/styleguide?subnav2')},
|
||||
]) %}
|
||||
{% end %}
|
||||
|
||||
{% module SidenavItem("Requests", href="/requests", icon="document", active=matchesPath('/requests')) %}
|
||||
{% module SidenavItem("+ New Request", href="/requests/new", icon="", active=matchesPath('/requests/new')) %}
|
||||
{% module SidenavItem("Requests",
|
||||
href="/requests",
|
||||
icon="document",
|
||||
active=matchesPath('/requests'),
|
||||
subnav=[
|
||||
{"label":"New Request", "href":"/requests/new", "icon": "plus", "active": matchesPath('/requests/new')},
|
||||
]
|
||||
) %}
|
||||
{% module SidenavItem("Workspaces", href="/workspaces", icon="cloud", active=matchesPath('/workspaces')) %}
|
||||
</ul>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user