Threaded comments
This commit is contained in:
13
pages/post/newpostarea.go
Normal file
13
pages/post/newpostarea.go
Normal file
@ -0,0 +1,13 @@
|
||||
package post
|
||||
|
||||
import (
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/utils"
|
||||
)
|
||||
|
||||
// NewPostArea renders a new post area.
|
||||
func NewPostArea(ctx *aero.Context) string {
|
||||
user := utils.GetUser(ctx)
|
||||
return ctx.HTML(components.NewPostArea(user, "Reply"))
|
||||
}
|
@ -14,8 +14,6 @@ func Get(ctx *aero.Context) string {
|
||||
id := ctx.Get("id")
|
||||
user := utils.GetUser(ctx)
|
||||
post, err := arn.GetPost(id)
|
||||
// a := 0
|
||||
// a++
|
||||
|
||||
if err != nil {
|
||||
return ctx.Error(http.StatusNotFound, "Post not found", err)
|
||||
|
@ -1,7 +1,7 @@
|
||||
component Post(post *arn.Post, user *arn.User)
|
||||
.thread
|
||||
.posts
|
||||
Postable(post, user, "", "")
|
||||
Postable(post, user, true, "", "")
|
||||
|
||||
.side-note-container.mountable
|
||||
a.side-note(href=post.Parent().Link())= post.Parent().TitleByUser(user)
|
||||
|
Reference in New Issue
Block a user