rf-web/_includes/common/navigation.html

31 lines
1.2 KiB
HTML
Raw Normal View History

<nav>
<div class="menu">
{% for item in site.data.menu %}
2020-08-16 09:52:49 +00:00
{% 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 %}
2020-08-16 09:52:49 +00:00
{% 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" %}
2020-08-16 09:52:49 +00:00
</div>
</nav>