<!DOCTYPE html>
<html lang="en">
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta charset="utf-8">
        <link rel="icon" href="/favicon.ico" type="image/x-icon" />

        <title>{{ .Runtime.Flags.Title }}</title>
        {{ .Runtime.Flags.Assets.Styles }}
    </head>

    <body>
        <nav class="top-menu pure-toggle-menu closed">
            <div class="pure-u-1 pure-menu pure-menu-horizontal">
                <span class="pure-menu-heading custom-brand" role="banner">
                    <img src="/logo.svg" class="logo" alt="WissKI Distillery Logo">
                </span>
    
                <!-- large screen and sticky menu -->
                <ul class="pure-menu-list" role="menubar">
                    {{ range $item := .Runtime.Menu }}
                        <li class="pure-menu-item{{ if $item.Active }} pure-menu-selected{{ end }}{{ if not $item.Sticky }} u-md-show{{ end }}" role="menuitem">
                            <a href="{{ $item.Path }}" class="pure-menu-link">{{ $item.Title }}</a>
                        </li>
                    {{ end }}
                </ul>
                
                <a href="#" class="u-md-hide toggle"><s class="bar"></s><s class="bar"></s></a>
            </div>

            <!-- small non-sticky menu -->
            <div class="pure-menu u-md-hide pure-toggle-hide">
                <ul class="pure-menu-list">
                    {{ range $item := .Runtime.Menu }}
                        {{ if not $item.Sticky }}
                            <li class="pure-menu-item{{ if $item.Active }} pure-menu-selected{{ end }}" role="menuitem">
                                <a href="{{ $item.Path }}" class="pure-menu-link">{{ .Title }}</a>
                            </li>
                        {{ end }}
                    {{ end }}
                </ul>
            </div>
        </nav>

        
        <nav class="breadcrumbs" role="navigation" aria-label="Breadcrumbs">
            {{ range .Runtime.Flags.Crumbs }}
                <a class="{{ if .Active }}active{{ end }}" href="{{ .Path }}">{{ .Title }}</a>
            {{ end }}
        </nav>

        <header>
            <h1 id="top">{{ .Runtime.Flags.Title }}</h1>
            {{ if .Runtime.Flags.Actions }}
                <div class="pure-button-group" role="group" aria-label="Actions">
                    {{ range .Runtime.Flags.Actions }}
                        <a href="{{ .Path }}" class="pure-button{{ if eq .Priority -1 }} pure-button-small{{end}}">{{ .Title }}</a>
                    {{ end }}
                </div>
            {{ end }}
        </header>
        <main>
            {{ if .Runtime.Flags.Tabs }}
                <nav class="tabs-menu pure-menu">
                    <ul class="pure-menu-list">
                        {{ range .Runtime.Flags.Tabs }}
                            <li class="pure-menu-item {{ if .Active }}pure-menu-selected{{ end }}">
                                <a href="{{ .Path }}" class="pure-menu-link">{{ .Title }}</a>
                            </li>
                        {{ end }}
                    </ul>
                </nav>
            {{ end }}
            <div class="pure-g" id="main">
                {{ .Main }}
            </div>
            <div class="spacer"></div>
        </main>

        <footer>
            {{ .Footer }}
        </footer>

        {{ .Runtime.Flags.Assets.Scripts }}
    </body>

</html>