19 lines
No EOL
605 B
HTML
19 lines
No EOL
605 B
HTML
{{ $slug := ((.Context).Value "params").Slug }}
|
|
{{ $page := ((.Context).Value "adapter").GetPage $slug }}
|
|
{{ $editMode := ((.Context).Value "adapter").EditMode }}
|
|
{{ $editModes := (.Context).Value "edit-modes" }}
|
|
|
|
{{ template "header" . }}
|
|
|
|
<form method="POST" action="/save/{{$slug}}">
|
|
<textarea name="title">{{($page).Title}}</textarea>
|
|
<span>last edited {{($page).Edited}}</span>
|
|
{{ if eq $editMode 0 }}
|
|
<textarea name="content">{{($page).Content}}</textarea>
|
|
{{ else }}
|
|
<div contenteditable>{{($page).Content}}</div>
|
|
{{ end }}
|
|
<input type="submit" value="Save"/>
|
|
</form>
|
|
|
|
{{ template "footer" . }} |