dash-website/_includes/nav-desktop.html
Perry Woodin 01c297d5e7 Blog section
The blog is driven by the _posts directory nested in each language.
2016-07-14 14:05:47 -04:00

51 lines
2 KiB
HTML

{% assign base = '' %}
{% assign depth = page.url | split: '/' | size | minus: 1 %}
{% if depth == -1 %}{% assign base = '.' %}
{% elsif depth == 1 %}{% assign base = '..' %}
{% elsif depth == 2 %}{% assign base = '../..' %}
{% elsif depth == 3 %}{% assign base = '../../..' %}
{% elsif depth == 4 %}{% assign base = '../../../..' %}{% endif %}
{% if site.lang != "en" %}
{% assign base = base | prepend: '../' %}
{% endif %}
{% capture basenav %}{{ base }}{% if site.lang != "en" %}/{{ site.lang }}{% endif %}{% endcapture %}
<!--
To change the logo color, pass the parameter in the include.
include nav-desktop.html logo-color="blue"
-->
{% assign logo-color = 'white' %}
{% if include.logo-color %}
{% assign logo-color = include.logo-color %}
{% endif %}
<div id="top" class="content">
<a href="#"><img src="{{ base }}/assets/img/logo-{{ logo-color }}.png" alt="Dash" class="logo"></a>
<nav class="desktop">
<ul class="menu">
<li><a href="{{ basenav }}/">{% t nav.what-is-dash %}</a></li>
<li><a href="{{ basenav }}/get-dash/">{% t nav.get-dash %}</a></li>
<li><a href="{{ basenav }}/participate/">{% t nav.participate %}</a></li>
<li><a href="{{ basenav }}/currency/">{% t nav.currency %}</a></li>
<li><a href="{{ basenav }}/community/">{% t nav.community %}</a></li>
<li><a href="{{ basenav }}/blog/">{% t nav.blog %}</a></li>
<li><a href="{{ basenav }}">{% t nav.project %}</a></li>
<li><a href="{{ base }}{{ page.url }}">{% t global.english %}</a></li>
<li><a href="{{ base }}/es{{ page.url }}">{% t global.spanish %}</a></li>
<li><a href="{{ basenav }}" title="{% t nav.search %}">S</a></li>
</ul>
</nav>
<div class="button_container" id="toggle">
<span class="top"></span>
<span class="middle"></span>
<span class="bottom"></span>
</div>
<span class="clear"></span>
</div>