wiki/templates/view.html
Peter Stuifzand 6c04d9871f
All checks were successful
continuous-integration/drone/push Build is passing
improve backrefs for view and edit
2020-05-08 17:21:39 +02:00

39 lines
968 B
HTML

{{ define "content" }}
<h1 class="title is-1">{{ .Title }}</h1>
<div class="content">
{{ .Content }}
</div>
<div class="backrefs">
<h3>Backrefs</h3>
<ul>
{{ range $ref := .Backrefs }}
<li><a href="/{{ $ref.Name }}">{{ $ref.Title }}</a></li>
{{ end }}
</ul>
</div>
{{ end }}
{{ define "navbar" }}
{{ if $.Session.LoggedIn }}
<a href="/edit/{{ .Name }}" class="navbar-item">Edit</a>
<a href="/history/{{ .Name }}" class="navbar-item">History</a>
<a href="/recent/" class="navbar-item">Recent Changes</a>
<a href="/auth/logout" class="navbar-item">Logout</a>
<span class="navbar-item"><b>{{ $.Session.Me }}</b></span>
{{ else }}
<a href="/auth/login" class="navbar-item">Login</a>
{{ end }}
{{ end }}
{{ define "content_head" }}
<style>
.edit {
color: red;
}
.tag {
color: #444;
}
</style>
{{ end }}