14 lines
		
	
	
		
			446 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			446 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">
 | |
|     <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>
 |