Have got post creation working.
This commit is contained in:
parent
63b19a249a
commit
8e0ffb6c24
20 changed files with 479 additions and 11 deletions
|
|
@ -1 +0,0 @@
|
|||
<h1>Site {{.site.Title}}</h1>
|
||||
15
templates/sites/posts.html
Normal file
15
templates/sites/posts.html
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<h1>Site {{.site.Title}}</h1>
|
||||
|
||||
<form method="post" action="/sites/{{.site.ID}}/posts">
|
||||
<textarea name="body"></textarea>
|
||||
<input type="submit" value="Post">
|
||||
</form>
|
||||
|
||||
{{range .posts}}
|
||||
<div class="post">
|
||||
{{.Body}}
|
||||
</div>
|
||||
<hr>
|
||||
{{else}}
|
||||
<p>No posts yet</p>
|
||||
{{end}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue