40 lines
1.5 KiB
HTML
40 lines
1.5 KiB
HTML
<nav class="navbar" role="navigation" aria-label="main navigation">
|
|
<div id="navbarBasicExample" class="navbar-menu">
|
|
<div class="navbar-brand">
|
|
<a class="navbar-item" href="/">
|
|
<b>{{ .app.config.AppName }}</b>
|
|
</a>
|
|
</div>
|
|
{{ if .username -}}
|
|
<div class="navbar-start">
|
|
{{ range .app.modules -}}
|
|
<a href="/{{ .Name }}/" class="navbar-item">{{ .FriendlyName }}</a>
|
|
{{- end }}
|
|
</div>
|
|
<div class="navbar-end">
|
|
<div class="navbar-item">
|
|
<div class="buttons">
|
|
<a class="button is-light" href="/logout">
|
|
<span>Log out <b>{{ .username }}</b></span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{- else -}}
|
|
<div class="navbar-end">
|
|
<div class="navbar-item">
|
|
<div class="buttons">
|
|
<a class="button is-light" href="/login">
|
|
Log in
|
|
</a>
|
|
{{ if .config.AllowRegistration -}}
|
|
<a class="button is-light" href="/register">
|
|
Register
|
|
</a>
|
|
{{- end }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{- end }}
|
|
</div>
|
|
</nav>
|