2020-04-25 08:49:47 +00:00
|
|
|
{% assign posts=site.posts | where:"ref", page.ref | sort: 'lang' %}
|
|
|
|
{% assign newpages=site.pages | where:"ref", page.ref | sort: 'lang' %}
|
|
|
|
|
2020-08-16 09:52:49 +00:00
|
|
|
<div class="nav-group">
|
|
|
|
{% if posts.size > 1 %}
|
|
|
|
{% for post in posts %}
|
|
|
|
{% if post.lang != page.lang %}
|
|
|
|
<a href="{{ site.base-url }}{{ post.url }}" class="lang lang--{{ page.lang }}">
|
|
|
|
{% if page.lang == 'en' %}
|
|
|
|
{{ include.fr-text }}
|
|
|
|
{% else %}
|
|
|
|
{{ include.en-text }}
|
|
|
|
{% endif %}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2020-04-25 08:49:47 +00:00
|
|
|
|
2020-08-16 09:52:49 +00:00
|
|
|
{% elsif newpages.size > 1 %}
|
|
|
|
{% for pege in newpages %}
|
|
|
|
{% if pege.lang != page.lang and page.ref != '' %}
|
|
|
|
{% if page.lang == 'en' %}
|
|
|
|
<a href="{{ pege.url }}" class="lang lang--{{ page.lang }}">{{ include.fr-text }}</a>
|
|
|
|
{% else %}
|
|
|
|
<a href="{{ pege.url }}" class="lang lang--{{ page.lang }}">{{ include.en-text }} </a>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2020-04-25 08:49:47 +00:00
|
|
|
|
|
|
|
|
2020-08-16 09:52:49 +00:00
|
|
|
{% elsif page.lang == 'en' %}
|
|
|
|
<a href="{{ site.baseurl }}/fr" class="lang lang--{{ page.lang }}">{{ include.fr-text }}</a>
|
|
|
|
{% else %}
|
|
|
|
<a href="{{ site.baseurl }}/" class="lang lang--{{ page.lang }}">{{ include.en-text }} </a>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2020-04-25 08:49:47 +00:00
|
|
|
|
|
|
|
|