hugo-cms/templates/posts/new.html

13 lines
503 B
HTML

{{- $postTarget := printf "/sites/%v/posts" .site.ID -}}
{{- if (ne .post.ID 0) -}}
{{- $postTarget = printf "/sites/%v/posts/%v" .site.ID .post.ID -}}
{{- end -}}
<form method="post" action="{{$postTarget}}" class="post-form">
<div class="main-area">
<input name="title" type="text" placeholder="Title" value="{{.post.Title}}">
<textarea name="body">{{.post.Body}}</textarea>
</div>
<div class="bottom-area">
<input type="submit" value="Post">
</div>
</form>