
{{ $baseUrl := .Site.BaseURL }}
<nav class="main-menu menu-colors">
    <ul class="menu menu-colors no-list-float">
        <li><a href="{{ $baseUrl }}"><i class="fa fa-home fa-2x"></i></a></li>
        <li>
            <a href="#!"><i class="fa fa-bars fa-2x"></i></a>

            <!-- NOTE: Only support two levels of menus at the moment! -->
            <ul class="menu flexible-width menu-colors no-list-float">
                {{ $currentNode := . }}
                {{ range .Site.Menus.Main }}
                    <li {{ if or ($currentNode.IsMenuCurrent "Main" .) ($currentNode.HasMenuCurrent "Main" .) }}class="active"{{ end }}>
                    {{ if .HasChildren }}
                        <a href="#!">
                            {{ .Pre }}
                            <span>{{ .Name }}</span>
                            <span class="drop-right"></span>
                            <!-- <i class="fa fa-caret-right"></i> -->
                        </a>
                        <ul class="menu flexible-width menu-colors no-list-float">
                            {{ range .Children }}
                                <li {{ if $currentNode.IsMenuCurrent "Main" . }} class="active" {{ end }}>
                                    <a href="{{ $baseUrl }}{{ .URL }}">{{ .Name }}</a>
                                </li>
                            {{ end }}
                        </ul>
                    {{ else }}
                        <a href="{{ $baseUrl }}{{ .URL }}">
                            {{ .Pre }}
                            <span>{{ .Name }}</span>
                        </a>
                    {{ end }}
                    </li>
                {{ end }}
            </ul>
        </li>
        <li><a href="#!" data-lightbox-id="searchbox"><i class="fa fa-search fa-2x"></i></a></li>
        {{ with .Site.Params.Footer }}
            <li class="blue-grey-text" style="border-top: 1px solid;"><!-- Separator --></li>
            {{ range .List }}
                <li>
                    <a href="{{ .icon_link }}">
                        <i class="fa fa-{{ .icon_class }} fa-2x"></i>
                    </a>
                </li>
            {{ end }}
            <li><a href="irc://chat.freenode.net/lupine"><i class="fa fa-hashtag fa-2x"></i></a></li>
        {{ end }}
        <li class="blue-grey-text" style="border-top: 1px solid;"><!-- Separator --></li>
        <li>
            <a href="{{ .RSSLink }}" type="application/rss+xml" target="_blank">
                <i class="fa fa-rss fa-2x"></i>
            </a>
        </li>
    </ul>
</nav>

{{ partial "core/search-lightbox.html" . }}

