You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
2.1 KiB
HTML

<nav class="w3-bar w3-large">
{# --- home button --- -#}
<a href="/" class="w3-bar-item w3-button {% if current_path %}{% if current_path == "/" %} active{% endif %}{% endif %}"><img alt="" class="icon" src="{{config.extra.logo}}"/> {{config.extra.name}}</a>
{%- set index = get_section(path="_index.md") -%}
{%- set team = get_section(path=config.extra.theme.team_folder ~ "/_index.md") -%}
{# --- main links --- -#}
{%- for p in index.pages %}
{%- if not p.extra.hide -%}
<a href="{{ p.permalink }}" class="w3-bar-item w3-button
{%- if current_path %}{% if current_path == p.path %} active{% endif %}{% endif -%}
">{{p.title}}</a>
{%- endif -%}
{% endfor %}
{# --- langage dropdown --- -#}
<div class="w3-dropdown-hover w3-dropdown-click w3-right">
<button class="w3-button" style="font-size: 1.6em; padding: 0 10px;">{{config.extra.flag}}</button>
<div class="w3-dropdown-content w3-bar-block w3-light-grey" style="min-width: 29px;">
{%- for ltag,lcfg in config.extra.translations %}
<a href="{{lcfg.base_url}}" title="{{ltag}} website" style="font-size: 1.6em; padding: 0 10px;">{{lcfg.flag}}</a>
{%- endfor %}
</div>
</div>
{# --- useful links --- -#}
<div class="w3-dropdown-hover w3-dropdown-click w3-right">
<button class="w3-button">{{config.extra.theme.links_label}} <i class="fa fa-caret-down"></i></button>
<div class="w3-dropdown-content w3-bar-block w3-light-grey">
{% for link in config.extra.nav.link -%}
<a href="{{link.url}}" class="w3-bar-item w3-button"><img alt="{{link.name}}" class="icon" src="{{link.img}}"/> {{link.name}}</a>
{%- endfor %}
</div>
</div>
{# --- right links --- -#}
{%- for s in index.subsections | reverse -%}
{%- set subsection = get_section(path=s) -%}
{%- if not subsection.extra.hide -%}
<a href="{{ subsection.permalink }}" class="w3-bar-item w3-button w3-right
{%- if current_path %}{% if current_path is starting_with(subsection.path) %} active{% endif %}{% endif -%}
">{{subsection.title}}</a>
{%- endif -%}
{%- endfor -%}
</nav>