<!-- Header -->
<header id="header" {{- if .IsHome -}}class="alt"{{- end -}}>
    <h1>{{ with .Site.Data.globalheader.title }}{{ . | markdownify }}{{else}}{{ .Site.Title }}{{end}}</h1>
    <nav id="nav">
        <ul>
            {{ $button_news := .Site.Data.globalheader.button_news }}
            {{ if $button_news.enable }}
            <li><a href="{{ $button_news.link }}" class="button">{{ $button_news.title }}</a></li>
            {{ end }}
            {{ $button_map := .Site.Data.globalheader.button_map }}
            {{ if $button_map.enable }}
            <li><a href="{{ $button_map.link }}" class="button">{{ $button_map.title }}</a></li>
            {{ end }}
            {{ $button_firmware := .Site.Data.globalheader.button_firmware }}
            {{ if $button_firmware.enable }}
            <li><a href="{{ $button_firmware.link }}" class="button">{{ $button_firmware.title }}</a></li>
            {{ end }}
            {{ $button_calendar := .Site.Data.globalheader.button_calendar }}
            {{ if $button_calendar.enable }}
            <li><a href="{{ $button_calendar.link }}" class="button">{{ $button_calendar.title }}</a></li>
            {{ end }}
            <li>
                <a href="#" class="icon solid fa-angle-down">Layouts</a>
                <ul>
                    {{- range .Site.Menus.main -}}
                        {{- if .HasChildren -}}
                        <li>
                            <a href="{{ .URL }}">{{ .Name }}</a>
                            <ul>
                                {{- range .Children -}}
                                <li><a href="{{ .URL }}">{{ .Name }}</a></li>
                                {{- end -}}
                            </ul>
                        </li>
                        {{- else -}}
                        <li><a href="{{ .URL }}">{{ .Name }}</a></li>
                        {{- end -}}
                    {{- end -}}
                </ul>
            </li>
        </ul>
    </nav>
</header>