Threaded comments
This commit is contained in:
@ -21,11 +21,5 @@ func Get(ctx *aero.Context) string {
|
||||
return ctx.Error(http.StatusNotFound, "Thread not found", err)
|
||||
}
|
||||
|
||||
// Fetch posts
|
||||
posts := thread.Posts()
|
||||
|
||||
// Sort posts
|
||||
arn.SortPostsLatestLast(posts)
|
||||
|
||||
return ctx.HTML(components.Thread(thread, posts, user))
|
||||
return ctx.HTML(components.Thread(thread, user))
|
||||
}
|
||||
|
@ -1,12 +1,9 @@
|
||||
component Thread(thread *arn.Thread, posts []*arn.Post, user *arn.User)
|
||||
component Thread(thread *arn.Thread, user *arn.User)
|
||||
h1.thread-title= thread.Title
|
||||
|
||||
#thread.thread(data-id=thread.ID)
|
||||
.posts
|
||||
Postable(thread, user, "", thread.Creator().ID)
|
||||
|
||||
each post in posts
|
||||
Postable(post, user, "", thread.Creator().ID)
|
||||
Postable(thread, user, true, "", thread.Creator().ID)
|
||||
|
||||
//- Reply
|
||||
if user != nil
|
||||
|
@ -14,18 +14,23 @@
|
||||
.post-author
|
||||
margin-bottom 0.25rem
|
||||
|
||||
.post-content
|
||||
[data-highlight="true"]
|
||||
.post-content
|
||||
border 2px solid post-highlight-color
|
||||
border 2px solid post-highlight-color
|
||||
|
||||
// [data-pro="true"]
|
||||
// .post-content
|
||||
// border 2px solid pro-color
|
||||
.post-parent
|
||||
vertical
|
||||
|
||||
.replies
|
||||
margin-top 0.75rem
|
||||
margin-left content-padding
|
||||
|
||||
> 600px
|
||||
.post
|
||||
horizontal
|
||||
margin-bottom 0.75rem
|
||||
margin-bottom 0
|
||||
|
||||
.post-author
|
||||
margin-bottom 0
|
||||
margin-bottom 0
|
||||
|
||||
.post-parent
|
||||
horizontal
|
Reference in New Issue
Block a user