{{define "title"}}{{if .Data.post.ID}}{{t "Edit post"}}{{else}}{{t "New post"}}{{end}} ยท {{.Blog.Title}}{{end}} {{define "content"}}

{{if .Data.post.ID}}{{t "Edit post"}}{{else}}{{t "New post"}}{{end}}

{{if .Data.allTags}}
{{tf "Your tags (%d)" (len .Data.allTags)}}

{{range .Data.allTags}}{{.Name}} {{end}}

{{end}}

{{t "Tags on hidden posts are not shown on the blog; a tag nobody uses disappears."}}

{{template "editor" (dict "name" "body" "value" .Data.post.BodyMD "format" .Data.post.Format "rows" 24 "tall" true "upload" (print "/b/" .Blog.Subdomain "/files/upload") "preview" (print "/b/" .Blog.Subdomain "/preview") "csrf" .CSRF)}} {{template "imagepick" (dict "name" "image" "current" .Data.post.Image "sub" .Blog.Subdomain "images" .Data.images "names" .Data.imageNames "label" (t "Featured image") "hint" (t "Optional. A thumbnail on listings, and on the post page where the Design tab puts it."))}}

{{if .Data.post.ID}}{{t "View post"}} ↗{{end}} {{t "Back to posts"}}

{{template "imagelib" (dict "sub" .Blog.Subdomain "count" .Data.imageCount)}} {{end}}