wiki/templates/edit.html
Peter Stuifzand 5cc4e65638
All checks were successful
continuous-integration/drone/push Build is passing
Add blocks backend
2020-10-21 20:49:23 +02:00

53 lines
1.7 KiB
HTML

{{ define "navbar" }}
<a href="/edit/{{ .TodayPage }}" class="navbar-item">Today</a>
<a href="/{{ .Name }}" class="navbar-item">Back</a>
{{ end }}
{{define "content"}}
<div class="columns">
<div class="column">
<nav class="breadcrumb">
<ol>
{{ range $p := .Parents }}
<li><a href="/edit/{{ $p.ID }}">{{ $p.Text }}</a></li>
{{ end }}
</ol>
</nav>
<h1 class="title">{{ .Title }}</h1>
<form action="/save/" method="post">
<input type="hidden" name="p" value="{{ .Name }}"/>
{{ .Editor }}
</form>
{{ if .Backrefs }}
<div class="backrefs content">
<h3>Linked references</h3>
<ul>
{{ range $name, $refs := .Backrefs }}
<li><a href="/edit/{{ $name }}">{{ (index $refs 0).Title }}</a>
<ul>
{{ range $ref := $refs }}
<li>{{ $ref.LineEditHTML }}</li>
{{ end }}
</ul>
</li>
{{ end }}
</ul>
</div>
{{ end }}
</div>
<div class="column is-hidden graph-view">
{{ if .ShowGraph }}
<div class="graph-network" data-name="{{ .Name }}" style="height:80vh; top:0; position: sticky"></div>
{{ end }}
</div>
</div>
{{ end }}
{{ define "content_head" }}
{{ end }}
{{ define "footer_scripts" }}
{{ end }}