diff options
Diffstat (limited to 'ui/html/pages/post.tmpl.html')
| -rw-r--r-- | ui/html/pages/post.tmpl.html | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/ui/html/pages/post.tmpl.html b/ui/html/pages/post.tmpl.html index eefbd82..d3b78f0 100644 --- a/ui/html/pages/post.tmpl.html +++ b/ui/html/pages/post.tmpl.html @@ -5,4 +5,40 @@ <div class="card"> {{.Post.Content}} </div> + <div class="card"> + <h3>Leave Comment</h3> + <form action="/comments/post?id={{.Post.Id}}" method="POST"> + <label for="comment"></label> + <textarea name="comment" id="comment" rows="5" class="w100" required></textarea><br><br> + <div class="flex-between"> + <label for="name">Name:</label> + <input type="text" name="name" id="name" required> + <input type="submit" value="Post"> + </div> + </form> + </div> + {{range .Comments}} + {{if .IsVerified}} + <div class="card"> + <h3>{{.Name}} - {{.FormattedTime}}</h3> + {{if $.IsAuth}} + <div class="nav_tag right"> + <a href="/comments/delete?id={{.Id}}" class="nav_tag right">Delete</a> + </div> + {{end}} + <p><pre>{{.Content}}</pre></p> + </div> + {{else}} + {{if $.IsAuth}} + <div class="card"> + <h3>{{.Name}} - {{.FormattedTime}}</h3> + <div class="nav_tag right"> + <a href="/comments/verify?id={{.Id}}" class="nav_tag right">Verify</a> + <a href="/comments/delete?id={{.Id}}" class="nav_tag right">Delete</a> + </div> + <p><pre>{{.Content}}</pre></p> + </div> + {{end}} + {{end}} + {{end}} {{end}} |
