pstuifzand/ekster

View on GitHub
templates/base.html

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{{template "title" .}}</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css">
</head>
<body>
<section class="section">
    <div class="container">
        <nav class="navbar" role="navigation" aria-label="main navigation">
            <div class="navbar-brand">
                <a class="navbar-item" href="/">
                    Ekster
                </a>

                <a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="menu">
                    <span aria-hidden="true"></span>
                    <span aria-hidden="true"></span>
                    <span aria-hidden="true"></span>
                </a>
            </div>

            {{ if .Session.LoggedIn }}
                <div id="menu" class="navbar-menu">
                    <a class="navbar-item" href="/settings">
                        Settings
                    </a>
                    <a class="navbar-item" href="/logs">
                        Logs
                    </a>
                    <a class="navbar-item" href="{{ .Session.Me }}">
                        Profile
                    </a>
                </div>
            {{ end }}
        </nav>

        <h1 class="title">Ekster - Microsub server</h1>

        {{template "content" .}}
    </div>
</section>
</body>
</html>
{{define "header"}}{{end}}
{{define "content"}}{{end}}
{{define "footer"}}{{end}}