rf-web/_includes/common/navigation.html
2020-08-17 22:11:19 +02:00

28 lines
1.5 KiB
HTML

<nav class="menu page-content">
{% for item in site.data.menu %}
{% if item.items %}
<div class="nav-group" tabindex="0">
<a class="nav-link colour-{{ item.colour | default: 'black' }} {{ item.case }}">{{ item[page.lang].name }}</a>
{% for sublink in item.items %}
{% if page.lang == 'en' %}
<a class="sub-nav-link colour-{{ sublink.colour | default: 'black' }} {{ sublink.case }}" href="{{ site.baseurl | append: sublink[page.lang].url }}">{{ sublink[page.lang].name }}</a>
{% else %}
<a class="sub-nav-link colour-{{ sublink.colour | default: 'black' }} {{ sublink.case }}" 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 colour-{{ item.colour | default: 'black' }} {{ item.case }}" href="{{ site.baseurl | append: item[page.lang].url }}">{{ item[page.lang].name }}</a>
</div>
{% else %}
<div class="nav-group">
<a class="nav-link colour-{{ item.colour | default: 'black' }} {{ item.case }}" 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" %}
</nav>