mirror of
https://github.com/monero-project/monero-site.git
synced 2024-12-23 12:09:49 +00:00
Header: Refactor navigation menu to use i18n plugin
This commit is contained in:
parent
045e994510
commit
4bafdcc15f
2 changed files with 101 additions and 32 deletions
15
_i18n/en.yml
15
_i18n/en.yml
|
@ -25,7 +25,6 @@ global:
|
||||||
titles:
|
titles:
|
||||||
index: Home
|
index: Home
|
||||||
whatismonero: What is Monero (XMR)?
|
whatismonero: What is Monero (XMR)?
|
||||||
using: Using Monero
|
|
||||||
accepting: Accepting Monero
|
accepting: Accepting Monero
|
||||||
contributing: Improving Monero
|
contributing: Improving Monero
|
||||||
mining: Mining Monero
|
mining: Mining Monero
|
||||||
|
@ -34,7 +33,6 @@ titles:
|
||||||
allposts: All Blog Posts
|
allposts: All Blog Posts
|
||||||
team: Monero Team
|
team: Monero Team
|
||||||
hangouts: Hangouts
|
hangouts: Hangouts
|
||||||
events: Events
|
|
||||||
sponsorships: Sponsorships
|
sponsorships: Sponsorships
|
||||||
merchants: Merchants & Services
|
merchants: Merchants & Services
|
||||||
about: About Monero
|
about: About Monero
|
||||||
|
@ -50,6 +48,19 @@ titles:
|
||||||
blogbytag: Blog
|
blogbytag: Blog
|
||||||
library: Library
|
library: Library
|
||||||
|
|
||||||
|
navigation:
|
||||||
|
getstarted: Get Started
|
||||||
|
whatis: What is Monero?
|
||||||
|
accepting: Accepting
|
||||||
|
contributing: Contributing
|
||||||
|
mining: Mining
|
||||||
|
community: Community
|
||||||
|
team: Team
|
||||||
|
merchants: Merchants
|
||||||
|
resources: Resources
|
||||||
|
about: About
|
||||||
|
mrl: Research Lab
|
||||||
|
|
||||||
index:
|
index:
|
||||||
page_title: "Monero - secure, private, untraceable"
|
page_title: "Monero - secure, private, untraceable"
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,59 @@
|
||||||
{%assign counter=0%}
|
|
||||||
<div class="mob-nav">
|
<div class="mob-nav">
|
||||||
<input class="burger-check" id="mobile-burger" type="checkbox"><label for="mobile-burger" class="burger"></label>
|
<input class="burger-check" id="mobile-burger" type="checkbox"><label for="mobile-burger" class="burger"></label>
|
||||||
|
|
||||||
<div class="slide-in-nav">
|
<div class="slide-in-nav">
|
||||||
<div class="container slide-in">
|
<div class="container slide-in">
|
||||||
{% for item in site.data.lang[site.lang].navigation %}
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 dropdown text-center nav-item">
|
<div class="col-xs-12 dropdown text-center nav-item">
|
||||||
{% if item.subfolderitems %}
|
<label for="drop1">{% t navigation.getstarted %}<div class="arrow-down"></div></label>
|
||||||
{%assign counter=counter | plus: 1%}
|
<input class="burger-checkdropdown" id="drop1" type="checkbox" tabindex="0">
|
||||||
<label for="drop{{counter}}">{{item.title}}<div class="arrow-down"></div></label>
|
|
||||||
<input class="burger-checkdropdown" id="drop{{counter}}" type="checkbox" tabindex="0">
|
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
{% for entry in item.subfolderitems %}
|
<a href="{{ site.baseurl }}/get-started/what-is-monero/">{% t navigation.whatis %}</a>
|
||||||
<a href="{{site.baseurl}}/{{ entry.url }}">{{ entry.page }}</a>
|
<a href="{{ site.baseurl }}/get-started/accepting/">{% t navigation.accepting %}</a>
|
||||||
{% endfor %}
|
<a href="{{ site.baseurl }}/get-started/contributing/">{% t navigation.contributing %}</a>
|
||||||
</div>
|
<a href="{{ site.baseurl }}/get-started/mining/">{% t navigation.mining %}</a>
|
||||||
{% else %}
|
<a href="{{ site.baseurl }}/get-started/faq/">{% t titles.faq %}</a>
|
||||||
<a href="{{site.baseurl}}/{{item.url}}">{{item.title}}</a>
|
</div>
|
||||||
{% endif %}
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 dropdown nav-item">
|
||||||
|
<a href="{{ site.baseurl }}/downloads/">{% t titles.downloads %}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 dropdown nav-item">
|
||||||
|
<a href="{{ site.baseurl }}/blog/">{% t titles.blogbytag %}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 dropdown text-center nav-item">
|
||||||
|
<label for="drop2">{% t navigation.community %}<div class="arrow-down"></div></label>
|
||||||
|
<input class="burger-checkdropdown" id="drop2" type="checkbox" tabindex="0">
|
||||||
|
<div class="dropdown-content">
|
||||||
|
<a href="{{ site.baseurl }}/community/team/">{% t navigation.team %}</a>
|
||||||
|
<a href="{{ site.baseurl }}/community/hangouts/">{% t titles.hangouts %}</a>
|
||||||
|
<a href="{{ site.baseurl }}/community/sponsorships/">{% t titles.sponsorships %}</a>
|
||||||
|
<a href="{{ site.baseurl }}/community/merchants/">{% t navigation.merchants %}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 dropdown text-center nav-item">
|
||||||
|
<label for="drop3">{% t navigation.resources %}<div class="arrow-down"></div></label>
|
||||||
|
<input class="burger-checkdropdown" id="drop3" type="checkbox" tabindex="0">
|
||||||
|
<div class="dropdown-content">
|
||||||
|
<a href="{{ site.baseurl }}/resources/about/">{% t navigation.about %}</a>
|
||||||
|
<a href="{{ site.baseurl }}/resources/roadmap/">{% t titles.roadmap %}</a>
|
||||||
|
<a href="{{ site.baseurl }}/resources/research-lab/">{% t navigation.mrl %}</a>
|
||||||
|
<a href="{{ site.baseurl }}/resources/moneropedia/">{% t titles.moneropedia %}</a>
|
||||||
|
<a href="{{ site.baseurl }}/resources/user-guides/">{% t titles.userguides %}</a>
|
||||||
|
<a href="{{ site.baseurl }}/resources/developer-guides/">{% t titles.developerguides %}</a>
|
||||||
|
<a href="{{ site.baseurl }}/library/">{% t titles.library %}</a>
|
||||||
|
<a href="{{ site.baseurl }}/press-kit/">{% t titles.presskit %}</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="text-center nav-item mob">
|
<div class="text-center nav-item mob">
|
||||||
|
@ -93,21 +125,47 @@
|
||||||
<div class="botnav white-nav">
|
<div class="botnav white-nav">
|
||||||
<input class="burger-check" id="burger-check" type="checkbox"><label for="burger-check" class="burger"></label>
|
<input class="burger-check" id="burger-check" type="checkbox"><label for="burger-check" class="burger"></label>
|
||||||
<div class="row between-xs nav-items">
|
<div class="row between-xs nav-items">
|
||||||
{% for item in site.data.lang[site.lang].navigation %}
|
|
||||||
<div class="col dropdown nav-item">
|
<div class="col dropdown nav-item">
|
||||||
{% if item.subfolderitems %}
|
<label for="desktopdrop1">{% t navigation.getstarted %}<div class="arrow-down"></div></label>
|
||||||
<label for="desktopdrop1">{{item.title}}<div class="arrow-down"></div></label>
|
|
||||||
<input class="burger-checkdropdown" id="desktopdrop1" type="checkbox" tabindex="0">
|
<input class="burger-checkdropdown" id="desktopdrop1" type="checkbox" tabindex="0">
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
{% for entry in item.subfolderitems %}
|
<a href="{{ site.baseurl }}/get-started/what-is-monero/">{% t navigation.whatis %}</a>
|
||||||
<a href="{{site.baseurl}}/{{ entry.url }}">{{ entry.page }}</a>
|
<a href="{{ site.baseurl }}/get-started/accepting/">{% t navigation.accepting %}</a>
|
||||||
{% endfor %}
|
<a href="{{ site.baseurl }}/get-started/contributing/">{% t navigation.contributing %}</a>
|
||||||
|
<a href="{{ site.baseurl }}/get-started/mining/">{% t navigation.mining %}</a>
|
||||||
|
<a href="{{ site.baseurl }}/get-started/faq/">{% t titles.faq %}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col dropdown nav-item">
|
||||||
|
<a href="{{ site.baseurl }}/downloads/">{% t titles.downloads %}</a>
|
||||||
|
</div>
|
||||||
|
<div class="col dropdown nav-item">
|
||||||
|
<a href="{{ site.baseurl }}/blog/">{% t titles.blogbytag %}</a>
|
||||||
|
</div>
|
||||||
|
<div class="col dropdown nav-item">
|
||||||
|
<label for="desktopdrop2">{% t navigation.community %}<div class="arrow-down"></div></label>
|
||||||
|
<input class="burger-checkdropdown" id="desktopdrop2" type="checkbox" tabindex="0">
|
||||||
|
<div class="dropdown-content">
|
||||||
|
<a href="{{ site.baseurl }}/community/team/">{% t navigation.team %}</a>
|
||||||
|
<a href="{{ site.baseurl }}/community/hangouts/">{% t titles.hangouts %}</a>
|
||||||
|
<a href="{{ site.baseurl }}/community/sponsorships/">{% t titles.sponsorships %}</a>
|
||||||
|
<a href="{{ site.baseurl }}/community/merchants/">{% t navigation.merchants %}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col dropdown nav-item">
|
||||||
|
<label for="desktopdrop3">{% t navigation.resources %}<div class="arrow-down"></div></label>
|
||||||
|
<input class="burger-checkdropdown" id="desktopdrop3" type="checkbox" tabindex="0">
|
||||||
|
<div class="dropdown-content">
|
||||||
|
<a href="{{ site.baseurl }}/resources/about/">{% t navigation.about %}</a>
|
||||||
|
<a href="{{ site.baseurl }}/resources/roadmap/">{% t titles.roadmap %}</a>
|
||||||
|
<a href="{{ site.baseurl }}/resources/research-lab/">{% t navigation.mrl %}</a>
|
||||||
|
<a href="{{ site.baseurl }}/resources/moneropedia/">{% t titles.moneropedia %}</a>
|
||||||
|
<a href="{{ site.baseurl }}/resources/user-guides/">{% t titles.userguides %}</a>
|
||||||
|
<a href="{{ site.baseurl }}/resources/developer-guides/">{% t titles.developerguides %}</a>
|
||||||
|
<a href="{{ site.baseurl }}/library/">{% t titles.library %}</a>
|
||||||
|
<a href="{{ site.baseurl }}/press-kit/">{% t titles.presskit %}</a>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
|
||||||
<a href="{{site.baseurl}}/{{item.url}}">{{item.title}}</a>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
Loading…
Reference in a new issue