Skip to content

Instantly share code, notes, and snippets.

@bradfrost
Created May 17, 2017 21:28
Show Gist options
  • Save bradfrost/064782a1cae7e1b84e51855033c44592 to your computer and use it in GitHub Desktop.
Save bradfrost/064782a1cae7e1b84e51855033c44592 to your computer and use it in GitHub Desktop.
Primary nav with dropdown
<nav id="nav" class="c-primary-nav" role="navigation">
<ul class="c-primary-nav__list">
{{# navItems }}
<li class="c-primary-nav__item {{ styleModifier }}">
<a href="{{ url }}" class="c-primary-nav__link {{# currentPage }}is-current {{/ currentPage }}{{# navChild }} c-primary-nav__link--has-children js-nav-dropdown-trigger{{/ navChild }}">
{{ label }}
</a><!--end c-primary-nav__link-->
{{# navChild }}
<ul class="c-primary-nav__sublist js-nav-dropdown">
{{# navChildList }}
<li class="c-primary-nav__subitem">
<a href="{{ url}}" class="c-primary-nav__sublink">{{ label }}</a>
</li><!-- end c-nav__sublist__item -->
{{/ navChildList }}
</ul><!-- end c-nav__sublist -->
{{/ navChild }}
</li><!-- end c-nav__list__item -->
{{/ navItems }}
</ul><!-- end c-nav__list -->
</nav><!-- end c-nav -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment