hacks-guide-minimal-mistake.../_includes/_navigation.html
2014-12-22 12:25:03 -05:00

19 lines
No EOL
683 B
HTML

<div class="navigation-wrapper">
<div class="site-name">
<a href="{{ site.url }}/">{{ site.title }}</a>
</div><!-- /.site-name -->
<div class="top-navigation">
<nav role="navigation" id="site-nav" class="nav">
<ul>
{% for link in site.data.navigation %}
{% if link.url contains 'http' %}
{% assign domain = '' %}
{% else %}
{% assign domain = site.url %}
{% endif %}
<li><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 -->