Threaded comments

This commit is contained in:
2018-11-05 19:05:36 +09:00
parent e74253df96
commit 08497f0c37
13 changed files with 109 additions and 217 deletions

13
pages/post/newpostarea.go Normal file
View 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"))
}

View File

@ -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)

View File

@ -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)