Final changes (hopefully) for adding posts to profile

This commit is contained in:
FM1337 2017-06-22 12:13:55 -03:00
parent f6e5b6da08
commit 7743a01925
3 changed files with 2 additions and 2 deletions

View File

@ -13,4 +13,4 @@ component PostableList(postables []arn.Postable)
.post-likes= len(post.Likes()) .post-likes= len(post.Likes())
a.post-tool.post-permalink.ajax(href=post.Link(), title="Permalink") a.post-tool.post-permalink.ajax(href=post.Link(), title="Permalink")
Icon("link") Icon("link")
a.post-link.side-note.title.ajax(href="/posts/" + post.ID())= post.Title() a.post-link.side-note.ajax(href=post.Link())= post.Title()

View File

@ -21,6 +21,7 @@ func GetPostsByUser(ctx *aero.Context) string {
posts := user.Posts() posts := user.Posts()
arn.SortPostsLatestLast(posts) arn.SortPostsLatestLast(posts)
var postables []arn.Postable var postables []arn.Postable
if len(posts) >= postLimit { if len(posts) >= postLimit {

View File

@ -46,7 +46,6 @@ func Profile(ctx *aero.Context, viewUser *arn.User) string {
if len(posts) > maxPosts { if len(posts) > maxPosts {
posts = posts[:maxPosts] posts = posts[:maxPosts]
} }
}) })
return ctx.HTML(components.Profile(viewUser, user, animeList, threads, posts)) return ctx.HTML(components.Profile(viewUser, user, animeList, threads, posts))