nirvash/templates/cms_edit.html

18 lines
663 B
HTML
Raw Normal View History

2022-06-03 04:56:38 +00:00
{{ $slug := ((.Context).Value "params").Slug }}
{{ $page := ((.Context).Value "adapter").GetPage $slug }}
2022-06-05 04:34:20 +00:00
{{ $editableSlugs := ((.Context).Value "adapter").EditableSlugs }}
2022-06-03 04:56:38 +00:00
{{ template "header" . }}
2022-06-05 04:34:20 +00:00
<a href="/">&laquo;</a>
<form method="POST" action="/save/{{($page).Slug}}">
<input hidden name="oldSlug" value="{{($page).Slug}}">
{{ if $editableSlugs }}
<input type="text" name="slug" value="{{($page).Slug}}">
{{ end }}
<textarea name="title">{{($page).Title}}</textarea>
<span>last edited {{($page).Edited}}</span>
2022-06-03 04:56:38 +00:00
<textarea name="content">{{($page).Content}}</textarea>
2022-06-05 04:34:20 +00:00
<input type="submit" value="Save"/>
2022-06-03 04:56:38 +00:00
</form>
{{ template "footer" . }}