<!-- Nav -->
{{ $data := index .Site.Data .Site.Language.Lang }}
{{ $currentPage := .Page }}
<nav id="nav">
    <ul class="links">
        <li class="{{ if eq ($currentPage.RelPermalink) (`/`) }}active{{end}}"><a href='{{ "/" | relLangURL }}'>{{ .Site.Title }}</a></li>
        {{- with $data.nav.items -}}
            {{- range $i, $e := . -}}
                <li class="{{ if eq ($currentPage.RelPermalink) (print .url `/`) }}active{{end}}"><a href='{{ .url | relLangURL }}'>{{- .title -}}</a></li>
            {{- end -}}
        {{- end -}}
        {{ with $data.contactinfo }}
        <li><a href='{{ "#footer" | relLangURL }}'>{{ i18n "NAV_CONTACT" . }}</a></li>
        {{ end }}
        {{ if .IsTranslated }}
        {{ range .AllTranslations }}
        <li {{if eq ($.Site.Language) (.Language)}}class="active"{{end}}><a href='{{ .Permalink }}'>{{ .Language.LanguageName }}</a></li>
        {{ end }}
        {{ end }}
    </ul>
    {{ with $data.social }}
    <ul class="icons">
        {{ with .telegram }}
        <li><a href="{{ . }}" class="icon fa-telegram"><span class="label">Telegram</span></a></li>
        {{ end }}
        {{ with .youtube }}
        <li><a href="{{ . }}" class="icon fa-youtube"><span class="label">Youtube</span></a></li>
        {{ end }}
    </ul>
    {{ end }}
</nav>
