{{- $params := .Site.Params }}
{{- $centerLogo := $params.centerLogo }}
{{ $logo := $params.logo }}
<header id="top-navbar" class="nav_header" >
  <nav class="nav">
    <a href='{{ absLangURL "" }}' class="nav_brand nav_item{{ if eq $centerLogo true }} nav_hide{{ end }}">
      {{- with $logo }}
      <img alt="{{ $params.Title }}" src="{{ absURL . }}" class="logo">
        <span class="site-title">{{ $params.Title }}</span>
      {{- else }}
        <span class="site-title">{{ .Site.Title }}</span>
      {{- end }}
      <div class="nav_close">
        <div>
          {{ partial "sprite" (dict "icon" "open-menu") }}
          {{ partial "sprite" (dict "icon" "closeme") }}
        </div>
      </div>
    </a>
    <div class='nav_body nav_body_{{ .Site.Params.mobileNavigation }}'>
      {{ $context := . }}
      {{ $menuData := .Site.Data.menu }}
      {{ with $menuData }}
        {{ partial "nav" (dict "context" $context "menu" $menuData) }}
      {{- else }}
        {{ partial "nav" (dict "context" . "menu" .Site.Menus.main) }}
      {{- end }}
      {{ if .Site.IsMultiLingual }}
      <div class="nav_parent">
        <a href="#" class="nav_item">{{ .Site.Params.languageMenuName }}</a>
        <div class="nav_sub">
          <span class="nav_child"></span>
          {{ range .Site.Home.AllTranslations }}
          <a href="{{ .Permalink }}" class="nav_child nav_item">{{ .Language.LanguageName }}</a>
          {{ end }}
        </div>
      </div>
      {{ end }}

      {{- if eq $centerLogo true }}
      <a href='{{ absLangURL "" }}' class="nav_brand nav_center nav_item">
        <img alt="{{ $params.Title }}" src="{{ absURL $logo }}" class="logo">
      </a>
      {{- end }}
      {{- partial "follow" . }}
    </div>
  </nav>
</header>
