14 lines
439 B
HTML
14 lines
439 B
HTML
|
{{- $postTarget := printf "/sites/%v/posts" .site.ID -}}
|
||
|
{{- if .post.ID -}}
|
||
|
{{- $postTarget = printf "/sites/%v/posts/%v" .site.ID .post.ID -}}
|
||
|
{{- end -}}
|
||
|
<form method="post" action="{{$postTarget}}" class="post-form">
|
||
|
<input name="title" placeholder="Title" value="{{.post.Title}}">
|
||
|
|
||
|
<textarea name="body">{{.post.Body}}</textarea>
|
||
|
|
||
|
<div class="bottom-bar">
|
||
|
<input type="submit" value="Post">
|
||
|
</div>
|
||
|
</form>
|