hacks-guide-minimal-mistake.../_includes/masthead.html
2016-03-10 21:13:01 -05:00

19 lines
692 B
HTML

<div class="masthead">
<div class="site-name">
<a href="{{ base_path }}/">{{ site.title }}</a>
</div><!-- /.site-name -->
<div class="masthead__menu">
<nav id="site-nav">
<ul>
{% for link in site.data.navigation %}
{% 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>
</nav>
</div><!-- /.top-navigation -->
</div><!-- /.navigation-wrapper -->