updated menu

This commit is contained in:
Benjamin Jones 2020-08-16 11:52:49 +02:00
parent a5e1be9465
commit 245112c463
4 changed files with 89 additions and 40 deletions

View File

@ -1,19 +1,49 @@
- about: - about:
en: en:
name: call for participants name: about
url: /about url: /about
fr: fr:
name: à propos name: à propos
url: /a-propos url: /a-propos
- participate: - conference:
en: en:
name: submit a proposal name: ReclimFutures conference 2020
url: "/how-to-participate"
fr: fr:
name: soumettre une proposition name: ReclimFutures conference 2020
url: /participer items:
- program:
en:
name: program
url: "/rf2020/program"
fr:
name: programme
url: /rf2020/programme
- participants:
en:
name: participants
url: "/rf2020/participants"
fr:
name: participants
url: /rf2020/participants
- donate:
colour: red
en:
name: donate
url: "/donate"
fr:
name: faire un don
url: /donate
# - participate:
# en:
# name: submit a proposal
# url: "/how-to-participate"
# fr:
# name: soumettre une proposition
# url: /participer
# - attend: # - attend:
# en: # en:

View File

@ -19,6 +19,7 @@
<link rel="icon" type="image/png" sizes="16x16" href="{{ site.baseurl }}/assets/favicons/favicon-16x16.png"> <link rel="icon" type="image/png" sizes="16x16" href="{{ site.baseurl }}/assets/favicons/favicon-16x16.png">
<link rel="apple-touch-icon" sizes="180x180" href="{{ site.baseurl }}/assets/favicons/apple-touch-icon.png"> <link rel="apple-touch-icon" sizes="180x180" href="{{ site.baseurl }}/assets/favicons/apple-touch-icon.png">
<link rel="manifest" href="{{ site.baseurl }}/assets/favicons/site.webmanifest"> <link rel="manifest" href="{{ site.baseurl }}/assets/favicons/site.webmanifest">
<link rel="icon" href="{{ site.baseurl }}/assets/favicons/svg-favi.svg">
<link rel="mask-icon" href="{{ site.baseurl }}/assets/favicons/safari-pinned-tab.svg" color="#5bbad5"> <link rel="mask-icon" href="{{ site.baseurl }}/assets/favicons/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#0ddfe7"> <meta name="msapplication-TileColor" content="#0ddfe7">

View File

@ -1,38 +1,39 @@
{% assign posts=site.posts | where:"ref", page.ref | sort: 'lang' %} {% assign posts=site.posts | where:"ref", page.ref | sort: 'lang' %}
{% assign newpages=site.pages | where:"ref", page.ref | sort: 'lang' %} {% assign newpages=site.pages | where:"ref", page.ref | sort: 'lang' %}
<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 %}
{% if posts.size > 1 %} {% elsif newpages.size > 1 %}
{% for post in posts %} {% for pege in newpages %}
{% if post.lang != page.lang %} {% if pege.lang != page.lang and page.ref != '' %}
<a href="{{ site.base-url }}{{ post.url }}" class="lang lang--{{ page.lang }}"> {% if page.lang == 'en' %}
{% if page.lang == 'en' %} <a href="{{ pege.url }}" class="lang lang--{{ page.lang }}">{{ include.fr-text }}</a>
{{ include.fr-text }} {% else %}
{% else %} <a href="{{ pege.url }}" class="lang lang--{{ page.lang }}">{{ include.en-text }} </a>
{{ include.en-text }} {% endif %}
{% endif %} {% endif %}
</a> {% endfor %}
{% endif %}
{% endfor %}
{% 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 %}
{% elsif page.lang == 'en' %} {% elsif page.lang == 'en' %}
<a href="{{ site.baseurl }}/fr" class="lang lang--{{ page.lang }}">{{ include.fr-text }}</a> <a href="{{ site.baseurl }}/fr" class="lang lang--{{ page.lang }}">{{ include.fr-text }}</a>
<span class="poop">{{ site.data.menu[page.ref]}}</span> <span class="poop">{{ site.data.menu[page.ref]}}</span>
{% else %} {% else %}
<a href="{{ site.baseurl }}/" class="lang lang--{{ page.lang }}">{{ include.en-text }} </a> <a href="{{ site.baseurl }}/" class="lang lang--{{ page.lang }}">{{ include.en-text }} </a>
<span class="poop">{{ site.data.menu[page.ref]}}</span> <span class="poop">{{ site.data.menu[page.ref]}}</span>
{% endif %} {% endif %}
</div>

View File

@ -2,13 +2,30 @@
<nav> <nav>
<div class="menu"> <div class="menu">
{% for item in site.data.menu %} {% for item in site.data.menu %}
{% if page.lang == 'en' %} {% if item.items %}
<a class="nav-link" href="{{ site.baseurl | append: item[page.lang].url }}">{{ item[page.lang].name }}</a> <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 %} {% else %}
<a class="nav-link" href="{{ site.baseurl }}/{{ page.lang | append: item[page.lang].url }}">{{ item[page.lang].name }}</a> {% 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 %} {% endif %}
{% endfor %} {% endfor %}
</div>
{% include common/lang-selector.html en-text="/english" fr-text="/français" %} {% include common/lang-selector.html en-text="/english" fr-text="/français" %}
</div>
</nav> </nav>