hacks-guide-minimal-mistake.../_includes/masthead.html
Michael Rose 678aecdd61 Build navigation list include helper
- Update navigation.yml to support multiple navigations and levels
- Optional include navigation into left sidebar
2016-03-25 14:12:03 -04:00

22 lines
760 B
HTML

<div class="masthead">
<div class="site-name">
<a href="{{ base_path }}/">{{ site.title }}</a>
</div>
<div class="masthead__menu">
<nav id="site-nav" class="greedy-nav">
<button><div class="navicon"></div></button>
<ul class="visible-links">
{% for link in site.data.navigation.main %}
{% if link.url contains 'http' %}
{% assign domain = '' %}
{% else %}
{% assign domain = base_path %}
{% endif %}
<li class="masthead__menu-item"><a href="{{ domain }}{{ link.url }}" {% if link.url contains 'http' %}target="_blank"{% endif %}>{{ link.title }}</a></li>
{% endfor %}
</ul>
<ul class="hidden-links hidden"></ul>
</nav>
</div>
</div>