rf-web/_includes/common/navigation.html

28 lines
1.5 KiB
HTML
Raw Normal View History

<nav class="menu page-content">
{% for item in site.data.menu %}
2020-08-16 09:52:49 +00:00
{% 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>
2020-08-16 09:52:49 +00:00
{% 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>
2020-08-16 09:52:49 +00:00
{% 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>
2020-08-16 09:52:49 +00:00
{% endif %}
{% endfor %}
</div>
{% else %}
2020-08-16 09:52:49 +00:00
{% 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>
2020-08-16 09:52:49 +00:00
</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>
2020-08-16 09:52:49 +00:00
</div>
{% endif %}
{% endif %}
{% endfor %}
{% include common/lang-selector.html en-text="/english" fr-text="/français" %}
</nav>