hacks-guide-minimal-mistake.../_includes/navigation

20 lines
706 B
Text
Raw Normal View History

<div class="navigation-wrapper">
<div class="site-name">
<a href="{{ base_path }}/">{{ 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 = base_path %}
{% 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 -->