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,8 +1,8 @@
{% 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 %} {% if posts.size > 1 %}
{% for post in posts %} {% for post in posts %}
{% if post.lang != page.lang %} {% if post.lang != page.lang %}
<a href="{{ site.base-url }}{{ post.url }}" class="lang lang--{{ page.lang }}"> <a href="{{ site.base-url }}{{ post.url }}" class="lang lang--{{ page.lang }}">
@ -15,7 +15,7 @@
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% elsif newpages.size > 1 %} {% elsif newpages.size > 1 %}
{% for pege in newpages %} {% for pege in newpages %}
{% if pege.lang != page.lang and page.ref != '' %} {% if pege.lang != page.lang and page.ref != '' %}
{% if page.lang == 'en' %} {% if page.lang == 'en' %}
@ -27,12 +27,13 @@
{% endfor %} {% 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 item.items %}
<div class="nav-group">
<a class="nav-link">{{ item[page.lang].name }}</a>
{% for sublink in item.items %}
{% if page.lang == 'en' %} {% if page.lang == 'en' %}
<a class="nav-link" href="{{ site.baseurl | append: item[page.lang].url }}">{{ item[page.lang].name }}</a> <a class="sub-nav-link" href="{{ site.baseurl | append: sublink[page.lang].url }}" style=" color: {{ sublink.colour }}">{{ sublink[page.lang].name }}</a>
{% else %} {% else %}
<a class="nav-link" href="{{ site.baseurl }}/{{ page.lang | append: item[page.lang].url }}">{{ item[page.lang].name }}</a> <a class="sub-nav-link" href="{{ site.baseurl }}/{{ page.lang | append: sublink[page.lang].url }}">{{ sublink[page.lang].name }}</a>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</div> </div>
{% else %}
{% 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" %} {% include common/lang-selector.html en-text="/english" fr-text="/français" %}
</div>
</nav> </nav>