hacks-guide-minimal-mistake.../_includes/navigation.html
2016-02-22 16:16:15 -05:00

19 lines
659 B
HTML

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