rf-web/_includes/common/navigation.html
Benjamin Jones 245112c463 updated menu
2020-08-16 11:52:49 +02:00

31 lines
1.2 KiB
HTML

<nav>
<div class="menu">
{% for item in site.data.menu %}
{% if item.items %}
<div class="nav-group">
<a class="nav-link">{{ item[page.lang].name }}</a>
{% for sublink in item.items %}
{% if page.lang == 'en' %}
<a class="sub-nav-link" href="{{ site.baseurl | append: sublink[page.lang].url }}" style=" color: {{ sublink.colour }}">{{ sublink[page.lang].name }}</a>
{% else %}
<a class="sub-nav-link" href="{{ site.baseurl }}/{{ page.lang | append: sublink[page.lang].url }}">{{ sublink[page.lang].name }}</a>
{% endif %}
{% endfor %}
</div>
{% else %}
{% if page.lang == 'en' %}
<div class="nav-group">
<a class="nav-link" href="{{ site.baseurl | append: item[page.lang].url }}">{{ item[page.lang].name }}</a>
</div>
{% else %}
<div class="nav-group">
<a class="nav-link" href="{{ site.baseurl }}/{{ page.lang | append: item[page.lang].url }}">{{ item[page.lang].name }}</a>
</div>
{% endif %}
{% endif %}
{% endfor %}
{% include common/lang-selector.html en-text="/english" fr-text="/français" %}
</div>
</nav>