@@ -6,4 +6,19 @@
|
||||
|
||||
<span class="sidenav__link-label">{{label}}</span>
|
||||
</a>
|
||||
|
||||
{% if subnav and active %}
|
||||
<ul>
|
||||
{% for item in subnav %}
|
||||
<li>
|
||||
<a class="sidenav__link {% if item["active"] %}sidenav__link--active{% end %}" href="{{item["href"]}}" title="{{item["label"]}}">
|
||||
{% if "icon" in item %}
|
||||
{% module Icon(item["icon"], classes="sidenav__link-icon") %}
|
||||
{% end %}
|
||||
<span class="sidenav__link-label">{{item["label"]}}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% end %}
|
||||
</ul>
|
||||
{% end %}
|
||||
</li>
|
||||
|
@@ -1,10 +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("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