pstuifzand/ekster

View on GitHub
templates/settings.html

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Ekster</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>

            {{ if .Session.LoggedIn }}
            {{ end }}

            <h2 class="subtitle">Channels</h2>

            <div class="channels">
                {{ range .Channels }}
                    <div class="channel box">
                        <div class="name">
                            <a href="/settings/channel?uid={{ .UID }}">
                                {{ .Name }}
                            </a>
                        </div>
                    </div>
                {{ else }}
                    <div class="no-channels">No channels</div>
                {{ end }}
            </div>
        </div>
    </section>
</body>
</html>