forked from WhiteHouse/datacenters
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsidenav.html
executable file
·31 lines (30 loc) · 975 Bytes
/
sidenav.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<ul class="usa-sidenav-list">
{% for link in include.links %}
{% assign _href = link.href %}
{% assign _current = false %}
{% if link.href == page.url or link.href == page.permalink %}
{% assign _current = true %}
{% endif %}
<li>
<a href="{% if link.external == true %}{{ link.href }}{% else %}{{ link.href | relative_url }}{% endif %}"
class="
{% if _current %}usa-current{% endif %}
{% if link.class %}link.class{% endif %}
{% if link.external %}link-external{% endif %}
">
{% if link.iconbefore %}<span aria-hidden
class="fa fa-{{ link.iconbefore }}"></span>
{% endif %}
{{ link.text }}
{% if link.iconafter %}<span aria-hidden
class="fa fa-{{ link.iconafter }}"></span>
{% endif %}
</a>
{% if link.subnav %}
<ul class="usa-sidenav-sub_list">
{% include subnav.html links=link.subnav %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>