2026-02-24 11:21:26 +00:00
|
|
|
{{ $isPublished := ne .post.State 1 }}
|
2026-02-20 23:22:10 +00:00
|
|
|
<main class="flex-grow-1 position-relative">
|
2026-02-24 11:21:26 +00:00
|
|
|
<form action="/sites/{{.site.ID}}/posts" method="post" class="container-fluid post-form p-2"
|
|
|
|
|
data-controller="postedit"
|
|
|
|
|
data-action="keydown.meta+s->postedit#save keydown.meta+enter->postedit#publish"
|
|
|
|
|
data-postedit-save-action-value="{{ if $isPublished }}Update{{ else }}Save Draft{{ end }}">
|
2026-02-21 23:09:34 +00:00
|
|
|
<input type="hidden" name="guid" value="{{ .post.GUID }}">
|
2026-02-20 23:22:10 +00:00
|
|
|
<div class="mb-2">
|
2026-02-21 23:09:34 +00:00
|
|
|
<input type="text" name="title" class="form-control" placeholder="Title" value="{{ .post.Title }}">
|
2026-02-20 23:22:10 +00:00
|
|
|
</div>
|
|
|
|
|
<div>
|
2026-02-21 23:09:34 +00:00
|
|
|
<textarea name="body" class="form-control" rows="3">{{.post.Body}}</textarea>
|
2026-02-20 23:22:10 +00:00
|
|
|
</div>
|
|
|
|
|
<div>
|
2026-02-24 11:21:26 +00:00
|
|
|
{{ if $isPublished }}
|
|
|
|
|
<input type="submit" name="action" class="btn btn-primary mt-2" value="Update">
|
|
|
|
|
{{ else }}
|
|
|
|
|
<input type="submit" name="action" class="btn btn-primary mt-2" value="Publish">
|
|
|
|
|
<input type="submit" name="action" class="btn btn-secondary mt-2" value="Save Draft">
|
|
|
|
|
{{ end }}
|
2026-02-20 23:22:10 +00:00
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</main>
|