diff options
Diffstat (limited to 'templates/wiki-edit.html')
| -rw-r--r-- | templates/wiki-edit.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/templates/wiki-edit.html b/templates/wiki-edit.html new file mode 100644 index 0000000..ed896d2 --- /dev/null +++ b/templates/wiki-edit.html @@ -0,0 +1,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}} |