wiki/templates/view.html

43 lines
1.0 KiB
HTML
Raw Normal View History

2018-11-24 12:34:51 +00:00
{{ define "content" }}
<h1 class="title is-1">{{ .Title }}</h1>
<div class="content">
{{ .Content }}
</div>
2020-05-07 13:20:36 +00:00
<div class="backrefs content">
2020-05-07 13:20:36 +00:00
<h3>Backrefs</h3>
<ul>
{{ range $ref := .Backrefs }}
<li><a href="/{{ $ref.Name }}">{{ $ref.Title }}</a>
<ul>
<li>{{ $ref.Line }}</li>
</ul>
</li>
2020-05-07 13:20:36 +00:00
{{ end }}
</ul>
</div>
2018-11-24 12:34:51 +00:00
{{ end }}
{{ define "navbar" }}
{{ if $.Session.LoggedIn }}
<a href="/edit/{{ .Name }}" class="navbar-item">Edit</a>
<a href="/history/{{ .Name }}" class="navbar-item">History</a>
2019-02-18 19:47:31 +00:00
<a href="/recent/" class="navbar-item">Recent Changes</a>
2018-11-24 12:34:51 +00:00
<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;
}
2018-11-24 12:34:51 +00:00
</style>
{{ end }}