<header class=“site-header”>

<div class="wrapper">
  {% if site.brand %}
    {%- if page.title -%}
      <p class="site-title">
        <a href="{{- site.brand.url -}}">
          {{- site.brand.title | split: " " | first -}}
        </a>
      </p>
    {%- else -%}
      <h1 class="site-title">
        <a href="{{- site.brand.url -}}">
          {{- site.brand.title | split: " " | first -}}
        </a>
      </h1>
    {%- endif -%}
  {% else %}
    {%- if page.title -%}
      <p class="site-title">
        <a href="{{- site.url -}}">
          {{- site.title | split: " " | first -}}
        </a>
      </p>
    {%- else -%}
      <h1 class="site-title">
        <a href="{{- site.url -}}">
          {{- site.title | split: " " | first -}}
        </a>
      </h1>
    {%- endif -%}
  {% endif %}

  {%- assign current_language = page.lang | default: site.lang -%}
  {%- assign main_menu = site.data.menus.main[current_language] -%}

  {%- if main_menu -%}
    <nav class="site-menu">
      <input id="main-menu-trigger" type="checkbox" />
      <label for="main-menu-trigger" class="menu-trigger">
        <svg class="svg-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16">
          <title>Menu</title>
          <path fill-rule="evenodd" d="M11.41 9H.59C0 9 0 8.59 0 8c0-.59 0-1 .59-1H11.4c.59 0 .59.41.59 1 0 .59 0 1-.59 1h.01zm0-4H.59C0 5 0 4.59 0 4c0-.59 0-1 .59-1H11.4c.59 0 .59.41.59 1 0 .59 0 1-.59 1h.01zM.59 11H11.4c.59 0 .59.41.59 1 0 .59 0 1-.59 1H.59C0 13 0 12.59 0 12c0-.59 0-1 .59-1z" />
        </svg>
      </label>

      <ul class="main-menu">
        {%- for menu_item in main_menu -%}
          <li class="menu-item">
            <a href="{{- menu_item.url -}}" {%- if menu_item.external %} target="_blank" rel="external"{%- endif -%}>
              {{ menu_item.title }}
            </a>
          </li>
        {%- endfor -%}
      </ul>
    </nav>
  {%- endif -%}
</div>

</header>