<div id="header">
    <h1 class="full_text"><a href="{{ .Site.BaseURL }}" id="logo">
        {{ with .Site.Data.globalheader.title }}{{ . | markdownify }}{{ else }}{{ .Site.Title }}{{ end }}
    </a></h1>
    <h1 class="short_text"><a href="{{ .Site.BaseURL }}" id="logop">
        {{ with .Site.Data.globalheader.short_title }}{{ . | markdownify }}{{ else }}{{ .Site.Title }}{{ end }}
    </a></h1>

    <nav id="nav">
        <ul>
            {{- range .Site.Menus.main }}
                <li class="{{ if or ($.Page.IsMenuCurrent "main" .) ($.Page.HasMenuCurrent "main" .) }}current{{ end }}">
                    <a href="{{ .URL | default "#" }}">{{ .Name }}</a>
                    {{- if .HasChildren -}}
                    <ul>
                        {{- range .Children }}
                        <li class="{{ if or ($.Page.IsMenuCurrent "main" .) ($.Page.HasMenuCurrent "main" .) }}current{{ end }}">
                            <a href="{{ .URL | default "#" }}">{{ .Name }}</a>
                            {{- if .HasChildren -}}
                            <ul>
                                {{- range .Children }}
                                <li class="{{ if or ($.Page.IsMenuCurrent "main" .) ($.Page.HasMenuCurrent "main" .) }}current{{ end }}">
                                    {{/* aoeu fix 'current' thing */}}
                                    <a href="{{ .URL | default "#" }}">{{ .Name }}</a>
                                {{- end }}
                            </ul>
                            {{- end -}}
                        {{- end }}
                    </ul>
                    {{- end -}}
            {{- end }}
        </ul>
    </nav>
</div>
