aboutsummaryrefslogtreecommitdiff
path: root/templates/wiki-edit.html
blob: ed896d2dec980c5c494e6b8861044b6d3c57aefd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{{define "title"}}Edit {{.Data.Page}} - {{.Data.Path}} - {{.Site}}{{end}}
{{define "main"}}
<h2>Edit wiki{{with .Data.Page}} <span class="dim">{{.}}</span>{{end}}</h2>

{{with .Data.Preview}}
<h3>Preview</h3>
<article>{{.}}</article>
<hr>
{{end}}

<form method="post" action="/{{.Data.Path}}/wiki/{{.Data.Page}}">
<input type="hidden" name="csrf" value="{{.CSRF}}">
<input type="hidden" name="base" value="{{.Data.Base}}">
<p>
<label for="body">{{.Data.File}}, markdown</label>
<textarea id="body" name="body" rows="24">{{.Data.Body}}</textarea>
</p>
<p>
<button type="submit" name="action" value="save">Save</button>
<button type="submit" name="action" value="preview">Preview</button>
</p>
</form>
<p class="dim">
Links between pages are plain relative markdown links, and a subdirectory's
index.md is served at the subdirectory itself.
</p>
{{end}}