2023-09-29 04:03:51 +02:00
|
|
|
{% capture logo_path %}{{ site.logo }}{% endcapture %}
|
|
|
|
|
|
|
|
<div class="masthead">
|
|
|
|
<div class="masthead__inner-wrap">
|
|
|
|
<div class="masthead__menu">
|
|
|
|
<nav id="site-nav" class="greedy-nav">
|
|
|
|
{% unless logo_path == empty %}
|
|
|
|
<a class="site-logo" href="{{ '/' | relative_url }}"><img src="{{ logo_path | relative_url }}" alt="{{ site.masthead_title | default: site.title }}"></a>
|
|
|
|
{% endunless %}
|
2023-09-30 18:45:32 +02:00
|
|
|
<!-- hacks-guide change start: disable default masthead title -->
|
|
|
|
<!--
|
|
|
|
<a class="site-title" href="{{ '/' | relative_url }}">
|
2023-09-29 04:03:51 +02:00
|
|
|
{{ site.masthead_title | default: site.title }}
|
|
|
|
{% if site.subtitle %}<span class="site-subtitle">{{ site.subtitle }}</span>{% endif %}
|
|
|
|
</a>
|
|
|
|
-->
|
2023-09-30 18:45:32 +02:00
|
|
|
<!-- hacks-guide change end -->
|
2023-09-29 04:03:51 +02:00
|
|
|
<ul class="visible-links">
|
2023-09-30 18:45:32 +02:00
|
|
|
<!-- hacks-guide change start: multi-language configuration -->
|
2023-09-29 04:03:51 +02:00
|
|
|
{% assign split_path = page.path | split: "/" %}
|
|
|
|
{% assign locale = split_path[1] %}
|
|
|
|
{% assign titles = site.data.navigation[locale].main %}
|
|
|
|
{% if locale == 'en_US' %}
|
|
|
|
{% assign locale_var = '/' %}
|
|
|
|
{% else %}
|
|
|
|
{% assign locale_var = locale | prepend:'/' | append:'/' %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% for link in site.data.navigation[locale].main %}
|
|
|
|
{% if link.url == "/" %}
|
|
|
|
<li class="masthead__menu-item masthead__menu-item--lg"><a href="{{ domain }}{{ locale_var }}">{{ link.title }}</a></li>
|
|
|
|
{% else %}
|
|
|
|
<li class="masthead__menu-item"><a href="{{ domain }}{{ locale_var }}{{ link.url }}">{{ link.title }}</a></li>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2023-09-30 18:45:32 +02:00
|
|
|
<!-- hacks-guide change end -->
|
2023-09-29 04:03:51 +02:00
|
|
|
</ul>
|
|
|
|
{% if site.search == true %}
|
|
|
|
<button class="search__toggle" type="button">
|
|
|
|
<span class="visually-hidden">{{ site.data.ui-text[site.locale].search_label | default: "Toggle search" }}</span>
|
|
|
|
<i class="fas fa-search"></i>
|
|
|
|
</button>
|
|
|
|
{% endif %}
|
2023-09-30 18:45:32 +02:00
|
|
|
<!-- hacks-guide change start: Add language selector -->
|
2023-09-29 04:03:51 +02:00
|
|
|
<ul class="hidden-links links-menu hidden"></ul>
|
|
|
|
<ul class="hidden-links lang-menu hidden">
|
|
|
|
{% assign split_url = page.url | split: "/" %}
|
|
|
|
{% if split_url.size == 3 %}
|
|
|
|
{% assign langless_url = split_url[2] %}
|
|
|
|
{% else %}
|
|
|
|
{% assign langless_url = split_url[1] %}
|
|
|
|
{% endif %}
|
|
|
|
{% if langless_url == "index.html" %}
|
|
|
|
{% assign langless_url = "" %}
|
|
|
|
{% endif %}
|
|
|
|
<li class="masthead__menu-item"><a href="{{ site.url }}/{{ langless_url }}">English</a></li>
|
2023-12-19 21:59:00 +01:00
|
|
|
<li class="masthead__menu-item"><a href="{{ site.url }}/it_IT/{{ langless_url }}">Italiano</a></li>
|
2023-09-29 04:03:51 +02:00
|
|
|
</ul>
|
|
|
|
<button class="greedy-nav__toggle hidden" type="button">
|
|
|
|
<span class="visually-hidden">{{ site.data.ui-text[site.locale].menu_label | default: "Toggle menu" }}</span>
|
|
|
|
<div class="navicon"></div>
|
|
|
|
</button>
|
|
|
|
<button class="greedy-nav__toggle_lang" type="button"><div class="langicon"><i class="fa fa-language fa-lg" aria-hidden="true"></i></div></button>
|
2023-09-30 18:45:32 +02:00
|
|
|
<!-- hacks-guide change end -->
|
2023-09-29 04:03:51 +02:00
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|